X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d84afea9d1ec41ee4e2ebb3bf6b87926cf5f04d1..15b41e900b5bb946cc885b87ed0edd8f745bf22a:/src/mac/carbon/font.cpp diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index d30015eaf9..402293c36b 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -58,6 +58,7 @@ void wxFontRefData::Init(int pointSize, m_macFontSize = 0; m_macFontStyle = 0; m_fontId = 0; + m_noAA = FALSE; } wxFontRefData::~wxFontRefData() @@ -89,6 +90,10 @@ void wxFontRefData::MacFindFont() ::GetFNum( "\pMonaco" , &m_macFontNum) ; break ; } + Str255 name ; + GetFontName( m_macFontNum , name ) ; + CopyPascalStringToC( name , (char*) name ) ; + m_faceName = (char*) name ; } else { @@ -121,6 +126,10 @@ void wxFontRefData::MacFindFont() //sequence in order to degrade gracefully while trying to maintain most of the style //information, meanwhile we just take the normal font and apply the features after OSStatus status = ::ATSUFONDtoFontID(m_macFontNum, normal /*qdStyle*/, (UInt32*)&m_macATSUFontID); + /* + status = ATSUFindFontFromName ( (Ptr) m_faceName , strlen( m_faceName ) , + kFontFullName, kFontMacintoshPlatform, kFontRomanScript , kFontNoLanguage , (UInt32*)&m_macATSUFontID ) ; + */ wxASSERT_MSG( status == noErr , "couldn't retrieve font identifier" ) ; } @@ -250,6 +259,15 @@ void wxFont::SetUnderlined(bool underlined) RealizeResource(); } +void wxFont::SetNoAntiAliasing( bool no ) +{ + Unshare(); + + M_FONTDATA->SetNoAntiAliasing( no ); + + RealizeResource(); +} + // ---------------------------------------------------------------------------- // accessors // ---------------------------------------------------------------------------- @@ -292,3 +310,8 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->m_encoding; } +bool wxFont::GetNoAntiAliasing() +{ + return M_FONTDATA->m_noAA; +} +