]> 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 402293c36bc73e0a27bd9e30c97a8f07aabfa584..49a96bdc56b561e987b0f8b72ac355abba94584e 100644 (file)
@@ -103,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);
                }
        }