wxOSX: Remove encoding from font display name in wxFontPickerCtrl

Trim off font encoding on Mac and match Windows behavior.

Closes #25580.
This commit is contained in:
Will Cosgrove
2025-06-29 01:32:25 +02:00
committed by Vadim Zeitlin
parent f2a019b572
commit d3da0e8ea2
+2 -2
View File
@@ -78,8 +78,8 @@ bool wxFontPickerCtrl::Create( wxWindow *parent, wxWindowID id,
wxString wxFontPickerCtrl::Font2String(const wxFont &f)
{
wxString ret = f.GetNativeFontInfoUserDesc();
#ifdef __WXMSW__
// on wxMSW the encoding of the font is appended at the end of the string;
#if defined(__WXMSW__) || defined(__WXOSX__)
// on wxMSW and wxOSX the encoding of the font is appended at the end of the string;
// since encoding is not very user-friendly we remove it.
wxFontEncoding enc = f.GetEncoding();
if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM )