diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 402293c36b..49a96bdc56 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -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); } } diff --git a/src/mac/font.cpp b/src/mac/font.cpp index 402293c36b..49a96bdc56 100644 --- a/src/mac/font.cpp +++ b/src/mac/font.cpp @@ -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); } }