all encodings are available in GTK+ 2 (because we always convert to UTF-8 anyhow)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -322,27 +322,12 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& WXUNUSED(info))
|
|||||||
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
|
bool wxGetNativeFontEncoding(wxFontEncoding encoding,
|
||||||
wxNativeEncodingInfo *info)
|
wxNativeEncodingInfo *info)
|
||||||
{
|
{
|
||||||
|
// all encodings are available in GTK+ 2 because we translate text in any
|
||||||
|
// encoding to UTF-8 internally anyhow
|
||||||
info->facename.clear();
|
info->facename.clear();
|
||||||
|
info->encoding = encoding;
|
||||||
|
|
||||||
switch ( encoding )
|
return true;
|
||||||
{
|
|
||||||
// we *must* return true for default encodings as otherwise wxFontMapper
|
|
||||||
// considers that we can't load any font and aborts with wxLogFatalError!
|
|
||||||
case wxFONTENCODING_DEFAULT:
|
|
||||||
case wxFONTENCODING_SYSTEM:
|
|
||||||
info->encoding = wxFONTENCODING_SYSTEM;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case wxFONTENCODING_ISO8859_1:
|
|
||||||
case wxFONTENCODING_UTF8:
|
|
||||||
// these are always supported by GTK+ 2
|
|
||||||
info->encoding = encoding;
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// everything else must be converted to UTF-8
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // GTK+ 1.x
|
#else // GTK+ 1.x
|
||||||
|
Reference in New Issue
Block a user