]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/font.cpp
process pending wx events before sending idle events
[wxWidgets.git] / src / mac / carbon / font.cpp
index 98ce6d7bbdbe7bf40b395cd901abff6fe9855fed..0fcdd8ad72ffca1844a475b9d2d6381ad763957d 100644 (file)
@@ -254,6 +254,7 @@ void wxFontRefData::MacFindFont()
                         break ;
 
                     case wxMODERN :
+                    case wxTELETYPE:
                         m_faceName =  wxT("Monaco");
                         break ;
 
@@ -266,7 +267,7 @@ void wxFontRefData::MacFindFont()
                 m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
                 if ( m_macFontFamily == kInvalidFontFamily )
                 {
-                    wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
+                    wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName.c_str() );
                     m_macFontFamily = GetAppFont();
                 }
 #endif
@@ -289,9 +290,12 @@ void wxFontRefData::MacFindFont()
             {
                 wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
                 ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
-                if ( atsfamily == (ATSFontFamilyRef) -1 )
+                
+                // ATSFontFamilyRef is an unsigned type, so check against max
+                // for an invalid value, not -1.
+                if ( atsfamily == 0xffffffff  )
                 {
-                    wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
+                    wxLogDebug( wxT("ATSFontFamilyFindFromName failed for ") + m_faceName );
                     m_macFontFamily = GetAppFont();
                 }
                 else
@@ -551,7 +555,7 @@ wxSize wxFont::GetPixelSize() const
     dc->GetTextExtent( wxT("g"), &width, &height, NULL, NULL);
     return wxSize((int)width, (int)height);
 #else
-    wxFontBase::GetPixelSize();
+    return wxFontBase::GetPixelSize();
 #endif
 }