]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/font.cpp
Added Mac OS X resource file handling:
[wxWidgets.git] / src / gtk1 / font.cpp
index a4e761d20cabac877ff64b24a237bdc293f28231..1da01a2ed06703f39d210b8fafc7a90524da35fc 100644 (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(_T("%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)