]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/font.cpp
added WXTRACE env. variable
[wxWidgets.git] / src / mgl / font.cpp
index 4deda242cf47a7bab3ebb2026e4aa4734943a126..3120a1d59f097a0c2ff4b6c1a99f1f6095930e88 100644 (file)
     #pragma implementation "font.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
 #include "wx/font.h"
 #include "wx/fontutil.h"
 #include "wx/cmndata.h"
@@ -26,8 +33,7 @@
 #include "wx/gdicmn.h"
 #include "wx/tokenzr.h"
 #include "wx/settings.h"
-
-#include <strings.h>
+#include "wx/mgl/private.h"
 
 // ----------------------------------------------------------------------------
 // wxFontRefData
@@ -150,12 +156,6 @@ wxFontRefData::~wxFontRefData()
 
 IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
 
-void wxFont::Init()
-{
-    if (wxTheFontList)
-        wxTheFontList->Append(this);
-}
-
 bool wxFont::Create(const wxNativeFontInfo& info)
 {
     return Create(info.pointSize, info.family, info.style, info.weight,
@@ -177,7 +177,6 @@ bool wxFont::Create(int pointSize,
 
 struct font_t *wxFont::GetMGLfont_t(float scale, bool antialiased)
 {
-    // FIXME_MGL -- no antialiasing for fonts smaller than certain treshold!
     if ( !M_FONTDATA->m_valid )
     {
         wxMGLFontLibrary *old = M_FONTDATA->m_library;
@@ -207,12 +206,6 @@ void wxFont::Unshare()
     }
 }
 
-wxFont::~wxFont()
-{
-    if (wxTheFontList)
-        wxTheFontList->DeleteObject(this);
-}
-
 // ----------------------------------------------------------------------------
 // accessors
 // ----------------------------------------------------------------------------
@@ -267,6 +260,13 @@ wxFontEncoding wxFont::GetEncoding() const
     return M_FONTDATA->m_encoding;
 }
 
+bool wxFont::IsFixedWidth() const
+{
+    wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
+
+    return (bool)(M_FONTDATA->m_library->GetFamily()->GetInfo()->isFixed);
+}
+
 
 // ----------------------------------------------------------------------------
 // change font attributes