]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/font.cpp
m_font may not have been set yet. Default to letting GetTextExtent
[wxWidgets.git] / src / x11 / font.cpp
index 773246bbe6ca62777a88e4ce9249ac6ad312d51a..4eaee81f00b6781b7356924922cab9006fb38b69 100644 (file)
@@ -752,7 +752,7 @@ bool wxFont::GetNoAntiAliasing()
     return M_FONTDATA->m_noAA;
 }
 
-wxNativeFontInfo *wxFont::GetNativeFontInfo() const
+const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
 {
     wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
 
@@ -762,7 +762,7 @@ wxNativeFontInfo *wxFont::GetNativeFontInfo() const
         GetInternalFont();
 #endif
 
-    return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
+    return &(M_FONTDATA->m_nativeFontInfo);
 }
 
 bool wxFont::IsFixedWidth() const
@@ -770,6 +770,7 @@ bool wxFont::IsFixedWidth() const
     wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
 
 #if wxUSE_UNICODE
+   return wxFontBase::IsFixedWidth();
 #else
     // Robert, is this right? HasNativeFont doesn't exist.
     if ( TRUE )
@@ -781,9 +782,10 @@ bool wxFont::IsFixedWidth() const
 
         return spacing.Upper() == _T('M');
     }
+   // Unreaceable code for now
+   // return wxFontBase::IsFixedWidth();
 #endif
 
-    return wxFontBase::IsFixedWidth();
 }
 
 // ----------------------------------------------------------------------------