]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/font.cpp
Use GetFont not m_font for GetCharHeight
[wxWidgets.git] / src / mgl / font.cpp
index e3ac9a29d20addb52e0c0c2109f733622e3f0e6b..6bb8af4e47233fd740d05fafc259b213b0d27af3 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "font.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -74,6 +70,8 @@ private:
     wxMGLFontLibrary *m_library;
     bool              m_valid;
 
+    wxNativeFontInfo  m_info;
+
     friend class wxFont;
 };
 
@@ -264,6 +262,14 @@ bool wxFont::IsFixedWidth() const
     return (bool)(M_FONTDATA->m_library->GetFamily()->GetInfo()->isFixed);
 }
 
+const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
+{
+    wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
+
+    M_FONTDATA->m_info.InitFromFont(*this);
+
+    return &(M_FONTDATA->m_info);
+}
 
 // ----------------------------------------------------------------------------
 // change font attributes