applied wxNativeFontInfo patch #103089

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-01-24 17:16:04 +00:00
parent b92fd37cb0
commit 09fcd88955
7 changed files with 312 additions and 89 deletions

View File

@@ -152,13 +152,29 @@ wxFontRefData::~wxFontRefData()
bool wxNativeFontInfo::FromString(const wxString& s)
{
xFontName = s;
wxStringTokenizer tokenizer(s, _T(";"));
wxString token = tokenizer.GetNextToken();
//
// Ignore the version for now
//
xFontName = tokenizer.GetNextToken();
if(!xFontName)
return FALSE;
return TRUE;
}
wxString wxNativeFontInfo::ToString() const
{
return xFontName;
wxString s;
s.Printf("%d;%s",
0, // version
xFontName.c_str());
return s;
}
// ----------------------------------------------------------------------------
@@ -177,7 +193,7 @@ wxFont::wxFont(const wxNativeFontInfo& info)
{
Init();
Create(info.ToString());
Create(info.xFontName);
}
bool wxFont::Create(const wxNativeFontInfo& info)