X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/493bdcc72ab4360b41897193ee9def744d24988f..1c405bb51093fc7812fb66e7d47faac5707e02b5:/src/mgl/font.cpp diff --git a/src/mgl/font.cpp b/src/mgl/font.cpp index 85e934c02c..3120a1d59f 100644 --- a/src/mgl/font.cpp +++ b/src/mgl/font.cpp @@ -18,6 +18,13 @@ #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 +#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, @@ -206,12 +206,6 @@ void wxFont::Unshare() } } -wxFont::~wxFont() -{ - if (wxTheFontList) - wxTheFontList->DeleteObject(this); -} - // ---------------------------------------------------------------------------- // accessors // ---------------------------------------------------------------------------- @@ -266,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