X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82545b58f4de558abbe45379b3175a94dc6fc410..37b8e6798782278fdfe4f3c1291aaff55cdbb8c9:/src/common/fontmap.cpp diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 05b1edd2ab..56f3461d2d 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -498,10 +498,13 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info, + const wxString& facename, bool interactive) { wxCHECK_MSG( info, FALSE, wxT("bad pointer in GetAltForEncoding") ); + info->facename = facename; + if ( encoding == wxFONTENCODING_DEFAULT ) { encoding = wxFont::GetDefaultEncoding(); @@ -609,3 +612,28 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, return FALSE; } + + + +bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, + wxFontEncoding *alt_encoding, + const wxString& facename, + bool interactive) +{ + wxNativeEncodingInfo info; + bool r = GetAltForEncoding(encoding, &info, facename, interactive); + *alt_encoding = info.encoding; + return r; +} + + + +bool wxFontMapper::IsEncodingAvailable(wxFontEncoding encoding, + const wxString& facename) +{ + wxNativeEncodingInfo info; + + wxGetNativeFontEncoding(encoding, &info); + info.facename = facename; + return wxTestFontEncoding(info); +}