]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/font.cpp
compilation fix for wxUSE_RESOURCE_LOADING_IN_MSW == 0
[wxWidgets.git] / src / mac / font.cpp
index d1b4798cc40e0bf630f2eabf58f5409118611bc7..49a96bdc56b561e987b0f8b72ac355abba94584e 100644 (file)
@@ -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;
+}
+