desc << _T(' ') << size;
}
+#if wxUSE_FONTMAP
wxFontEncoding enc = GetEncoding();
if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM )
{
desc << _T(' ') << wxTheFontMapper->GetEncodingName(enc);
}
+#endif // wxUSE_FONTMAP
return desc;
}
wxString face;
unsigned long size;
+
+#if wxUSE_FONTMAP
wxFontEncoding encoding;
+#endif // wxUSE_FONTMAP
while ( tokenizer.HasMoreTokens() )
{
{
SetPointSize(size);
}
+#if wxUSE_FONTMAP
else if ( (encoding = wxTheFontMapper->CharsetToEncoding(token, FALSE))
!= wxFONTENCODING_DEFAULT )
{
SetEncoding(encoding);
}
+#endif // wxUSE_FONTMAP
else // assume it is the face name
{
if ( !face.empty() )
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;
}
- 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;