X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..f0834140313212fc54d09e28d21a95476d6545f2:/src/mac/font.cpp diff --git a/src/mac/font.cpp b/src/mac/font.cpp index d1b4798cc4..49a96bdc56 100644 --- a/src/mac/font.cpp +++ b/src/mac/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() @@ -102,13 +103,9 @@ void wxFontRefData::MacFindFont() m_macFontNum = ::GetAppFont() ; else { -#if TARGET_CARBON - c2pstrcpy( (StringPtr) wxBuffer, m_faceName ) ; -#else - strcpy( (char *) wxBuffer, m_faceName ) ; - c2pstr( (char *) wxBuffer ) ; -#endif - ::GetFNum( (StringPtr) wxBuffer, &m_macFontNum); + Str255 fontname ; + wxMacStringToPascal( m_faceName , fontname ) ; + ::GetFNum( fontname, &m_macFontNum); } } @@ -258,6 +255,15 @@ void wxFont::SetUnderlined(bool underlined) RealizeResource(); } +void wxFont::SetNoAntiAliasing( bool no ) +{ + Unshare(); + + M_FONTDATA->SetNoAntiAliasing( no ); + + RealizeResource(); +} + // ---------------------------------------------------------------------------- // accessors // ---------------------------------------------------------------------------- @@ -300,3 +306,8 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->m_encoding; } +bool wxFont::GetNoAntiAliasing() +{ + return M_FONTDATA->m_noAA; +} +