X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1089fc00cdf589ba187f3ae8d8c8cc0cb33da7f9..c18353e5613042ac89a72d9762f481fb0ed6e5d2:/src/mac/carbon/fontenum.cpp diff --git a/src/mac/carbon/fontenum.cpp b/src/mac/carbon/fontenum.cpp index 564d76de69..355b4abcbb 100644 --- a/src/mac/carbon/fontenum.cpp +++ b/src/mac/carbon/fontenum.cpp @@ -88,7 +88,6 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) void wxFontEnumeratorHelper::DoEnumerate() { MenuHandle menu; - Str255 p_name; short lines; menu = NewMenu( 32000, "\pFont" ); @@ -97,8 +96,19 @@ void wxFontEnumeratorHelper::DoEnumerate() for ( int i = 1; i < lines + 1; i ++ ) { + wxString c_name ; +#if TARGET_API_MAC_CARBON + CFStringRef menutext ; + c_name = wxEmptyString ; + if ( CopyMenuItemTextAsCFString (menu, i, &menutext) == noErr ) + { + c_name = wxMacCFStringHolder(menutext).AsString(wxLocale::GetSystemEncoding()); + } +#else + Str255 p_name; GetMenuItemText( menu, i, p_name ); - wxString c_name = wxMacMakeStringFromPascal( p_name ); + c_name = wxMacMakeStringFromPascal( p_name ); +#endif #if 0 if ( m_fixedOnly )