X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..7520f3da332d64a676b6f7d27a56004fabf2db36:/src/mgl/font.cpp diff --git a/src/mgl/font.cpp b/src/mgl/font.cpp index d044a439ce..b47e45b322 100644 --- a/src/mgl/font.cpp +++ b/src/mgl/font.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp +// Name: src/mgl/font.cpp // Author: Vaclav Slavik // Id: $Id$ // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) @@ -14,10 +14,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #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; }; @@ -216,7 +214,7 @@ int wxFont::GetPointSize() const wxString wxFont::GetFaceName() const { - wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") ); + wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") ); return M_FONTDATA->m_faceName; } @@ -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