wxFont can now raelly use the native fonts

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-12-22 03:31:48 +00:00
parent 7c349adb6e
commit a9249b2eb2
3 changed files with 321 additions and 132 deletions

View File

@@ -423,19 +423,29 @@ wxString wxNativeFontInfo::ToUserString() const
// we don't distinguish between the two for now anyhow...
case wxFONTSTYLE_ITALIC:
case wxFONTSTYLE_SLANT:
desc << _("italic ");
desc << _("italic");
break;
}
if ( !facename.empty() )
wxString face = GetFaceName();
if ( !face.empty() )
{
desc << facename << _T(' ');
desc << _T(' ') << face;
}
if ( pointsize != wxNORMAL_FONT->GetPointSize() )
int size = GetPointSize();
if ( size != wxNORMAL_FONT->GetPointSize() )
{
desc << pointsize;
desc << _T(' ') << size;
}
wxFontEncoding enc = GetEncoding();
if ( enc != wxFONTENCODING_DEFAULT && enc != wxFONTENCODING_SYSTEM )
{
desc << _T(' ') << wxTheFontMapper->GetEncodingName(enc);
}
return desc;
}
bool wxNativeFontInfo::FromUserString(const wxString& s)
@@ -478,7 +488,7 @@ bool wxNativeFontInfo::FromUserString(const wxString& s)
}
else if ( token.ToULong(&size) )
{
pointsize = (int)size;
SetPointSize(size);
}
else if ( (encoding = wxTheFontMapper->CharsetToEncoding(token, FALSE))
!= wxFONTENCODING_DEFAULT )