X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7ae4a62645d369fbd6b8b5f3f0e12ee86536da1..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/mgl/fontmgr.cpp diff --git a/src/mgl/fontmgr.cpp b/src/mgl/fontmgr.cpp index 4bcae31029..63449e2739 100644 --- a/src/mgl/fontmgr.cpp +++ b/src/mgl/fontmgr.cpp @@ -16,6 +16,10 @@ #pragma hdrstop #endif +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + #include "wx/private/fontmgr.h" #include "wx/sysopt.h" @@ -36,7 +40,7 @@ wxFontInstance::wxFontInstance(float ptSize, bool aa, font_lib_t *fontLib) { m_font = MGL_loadFontInstance(fontLib, ptSize, 0.0, 0.0, aa); - wxASSERT_MSG( m_font, _T("cannot create font instance") ); + wxASSERT_MSG( m_font, wxT("cannot create font instance") ); } wxFontInstance::~wxFontInstance() @@ -55,7 +59,7 @@ void wxFontFace::Acquire() if ( m_refCnt == 1 ) { - wxCHECK_RET( m_fontLib == NULL, _T("font lib already created") ); + wxCHECK_RET( m_fontLib == NULL, wxT("font lib already created") ); wxLogTrace("mgl_font", "opening library '%s'", m_fileName.mb_str()); m_fontLib = MGL_openFontLib(m_fileName.fn_str()); @@ -68,7 +72,7 @@ void wxFontFace::Release() if ( m_refCnt == 0 ) { - wxCHECK_RET( m_fontLib != NULL, _T("font lib not created") ); + wxCHECK_RET( m_fontLib != NULL, wxT("font lib not created") ); wxLogTrace("mgl_font", "closing library '%s'", m_fileName.mb_str()); MGL_closeFontLib(m_fontLib); @@ -90,7 +94,7 @@ wxFontInstance *wxFontFace::GetFontInstance(float ptSize, bool aa) } // Small characters don't look good when antialiased with the algorithm - // that FreeType uses (mere 2x2 supersampling), so lets disable AA + // that FreeType uses (mere 2x2 supersampling), so let's disable AA // completely for small fonts. Bitmap fonts are not antialiased either. if ( ptSize <= gs_antialiasingThreshold || m_fontLib->fontLibType == MGL_BITMAPFONT_LIB ) @@ -103,7 +107,7 @@ wxFontInstance *wxFontFace::GetFontInstance(float ptSize, bool aa) wxFontInstance *wxFontFace::CreateFontInstance(float ptSize, bool aa) { - wxASSERT_MSG( m_fontLib, _T("font library not loaded!") ); + wxASSERT_MSG( m_fontLib, wxT("font library not loaded!") ); return new wxFontInstance(ptSize, aa, m_fontLib); } @@ -132,6 +136,17 @@ wxFontBundle::wxFontBundle(const font_info_t *info) info->boldFace, info->boldItalicFace); } +wxString wxFontBundle::GetName() const +{ + return wxString::FromAscii(m_fontInfo->familyName); +} + +bool wxFontBundle::IsFixed() const +{ + return m_fontInfo->isFixed; +} + + // ---------------------------------------------------------------------------- // wxFontsManager // ---------------------------------------------------------------------------- @@ -141,14 +156,14 @@ wxString wxFontsManager::GetDefaultFacename(wxFontFamily family) const switch ( family ) { case wxSCRIPT: - return _T("Script"); + return wxT("Script"); case wxDECORATIVE: - return _T("Charter"); + return wxT("Charter"); case wxROMAN: - return _T("Times"); + return wxT("Times"); case wxTELETYPE: case wxMODERN: - return _T("Courier"); + return wxT("Courier"); case wxSWISS: case wxDEFAULT: default: