git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13251
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
desc << _T(' ') << size;
}
desc << _T(' ') << size;
}
wxFontEncoding enc = GetEncoding();
if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM )
{
desc << _T(' ') << wxTheFontMapper->GetEncodingName(enc);
}
wxFontEncoding enc = GetEncoding();
if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM )
{
desc << _T(' ') << wxTheFontMapper->GetEncodingName(enc);
}
wxString face;
unsigned long size;
wxString face;
unsigned long size;
while ( tokenizer.HasMoreTokens() )
{
while ( tokenizer.HasMoreTokens() )
{
else if ( (encoding = wxTheFontMapper->CharsetToEncoding(token, FALSE))
!= wxFONTENCODING_DEFAULT )
{
SetEncoding(encoding);
}
else if ( (encoding = wxTheFontMapper->CharsetToEncoding(token, FALSE))
!= wxFONTENCODING_DEFAULT )
{
SetEncoding(encoding);
}
else // assume it is the face name
{
if ( !face.empty() )
else // assume it is the face name
{
if ( !face.empty() )
if ( !wxGetNativeFontEncoding(encoding, &info) )
{
#if wxUSE_FONTMAP
if ( !wxGetNativeFontEncoding(encoding, &info) )
{
#if wxUSE_FONTMAP
- if ( !wxTheFontMapper->GetAltForEncoding(encoding, &info) )
+ if ( wxTheFontMapper->GetAltForEncoding(encoding, &info) )
+ {
+ if ( !info.facename.empty() )
+ {
+ // if we have this encoding only in some particular facename, use
+ // the facename - it is better to show the correct characters in a
+ // wrong facename than unreadable text in a correct one
+ SetFaceName(info.facename);
+ }
+ }
+ else
#endif // wxUSE_FONTMAP
{
// unsupported encoding, replace with the default
info.charset = ANSI_CHARSET;
}
#endif // wxUSE_FONTMAP
{
// unsupported encoding, replace with the default
info.charset = ANSI_CHARSET;
}
- else if ( !info.facename.empty() )
- {
- // if we have this encoding only in some particular facename, use
- // the facename - it is better to show the correct characters in a
- // wrong facename than unreadable text in a correct one
- SetFaceName(info.facename);
- }
}
lf.lfCharSet = info.charset;
}
lf.lfCharSet = info.charset;