X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3b17ee74390803c2743455f5f3c744a2dd392ea..3039af96f6ebff4588f9ebf8a864d2c0e43d8697:/src/osx/carbon/font.cpp?ds=sidebyside diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index aaf764a566..f8c6f5f347 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -28,11 +28,6 @@ #include "wx/osx/private.h" -#if wxOSX_USE_ATSU_TEXT && !wxOSX_USE_CARBON -// include theming support -#include -#endif - #include #include @@ -66,10 +61,6 @@ public: virtual ~wxFontRefData(); - void SetNoAntiAliasing( bool no = true ) { m_noAA = no; } - - bool GetNoAntiAliasing() const { return m_noAA; } - void SetPointSize( int size ) { if( GetPointSize() != size ) @@ -159,7 +150,6 @@ protected: #if wxOSX_USE_CORE_TEXT // void Init( CTFontRef font ); #endif - bool m_noAA; // No anti-aliasing public: bool m_fontValid; #if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT @@ -189,7 +179,6 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data) { Init(); m_info = data.m_info; - m_noAA = data.m_noAA; m_fontValid = data.m_fontValid; #if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT m_macThemeFontID = data.m_macThemeFontID; @@ -224,7 +213,6 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data) void wxFontRefData::Init() { - m_noAA = false; #if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT m_macThemeFontID = kThemeCurrentPortFont ; #endif @@ -399,6 +387,8 @@ void wxFontRefData::MacFindFont() if ( m_fontValid ) return; + wxCHECK_RET( m_info.m_pointSize > 0, wxT("Point size should not be zero.") ); + m_info.EnsureValid(); #if wxOSX_USE_CORE_TEXT @@ -477,7 +467,8 @@ void wxFontRefData::MacFindFont() WXSIZEOF(atsuTags), atsuTags, atsuSizes, atsuValues); - wxASSERT_MSG( status == noErr , wxT("couldn't modify ATSU style") ); + wxASSERT_MSG( status == noErr , wxString::Format(wxT("couldn't modify ATSU style. Status was %d"), (int) status).c_str() ); + if ( m_cgFont.get() == NULL ) { ATSFontRef fontRef = FMGetATSFontRefFromFont(m_info.m_atsuFontID); @@ -658,13 +649,6 @@ void wxFont::SetUnderlined(bool underlined) M_FONTDATA->SetUnderlined( underlined ); } -void wxFont::SetNoAntiAliasing( bool no ) -{ - AllocExclusive(); - - M_FONTDATA->SetNoAntiAliasing( no ); -} - // ---------------------------------------------------------------------------- // accessors // ---------------------------------------------------------------------------- @@ -735,13 +719,6 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->GetEncoding() ; } -bool wxFont::GetNoAntiAliasing() const -{ - wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") ); - - return M_FONTDATA->GetNoAntiAliasing(); -} - #if wxOSX_USE_ATSU_TEXT && wxOSX_USE_CARBON short wxFont::MacGetFontNum() const