+#if !defined(__WXGTK__) && !defined(__WXMSW__)
+
+// ----------------------------------------------------------------------------
+// wxNativeFontInfo
+// ----------------------------------------------------------------------------
+
+// These are the generic forms of FromString()/ToString.
+//
+// convert to/from the string representation: format is
+// version;pointsize;family;style;weight;underlined;facename;encoding
+
+bool wxNativeFontInfo::FromString(const wxString& s)
+{
+ long l;
+
+ wxStringTokenizer tokenizer(s, _T(";"));
+
+ wxString token = tokenizer.GetNextToken();
+ //
+ // Ignore the version for now
+ //
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ pointSize = (int)l;
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ family = (int)l;
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ style = (int)l;
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ weight = (int)l;
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ underlined = l != 0;
+
+ faceName = tokenizer.GetNextToken();
+ if( !faceName )
+ return FALSE;
+
+ token = tokenizer.GetNextToken();
+ if ( !token.ToLong(&l) )
+ return FALSE;
+ encoding = (wxFontEncoding)l;
+
+ return TRUE;
+}
+
+wxString wxNativeFontInfo::ToString() const
+{
+ wxString s;
+
+ s.Printf(_T("%d;%d;%d;%d;%d;%d;%s;%d"),
+ 0, // version
+ pointSize,
+ family,
+ style,
+ weight,
+ underlined,
+ faceName.GetData(),
+ (int)encoding);
+
+ return s;
+}
+
+#endif // generic wxNativeFontInfo implementation
+