X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8cde57b8367b4e853fbe45d88ee23cea4a301e9..80a24267cbc17d85e278e1f10cdfdaea12199639:/src/os2/fontutil.cpp diff --git a/src/os2/fontutil.cpp b/src/os2/fontutil.cpp index d36dbb08f5..a3444c5765 100644 --- a/src/os2/fontutil.cpp +++ b/src/os2/fontutil.cpp @@ -17,6 +17,10 @@ // headers // ---------------------------------------------------------------------------- +#ifdef __GNUG__ + #pragma implementation "fontutil.h" +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -42,12 +46,18 @@ // ---------------------------------------------------------------------------- // convert to/from the string representation: format is -// facename[;charset] +// encodingid;facename[;charset] bool wxNativeEncodingInfo::FromString(const wxString& s) { wxStringTokenizer tokenizer(s, _T(";")); + wxString encid = tokenizer.GetNextToken(); + long enc; + if ( !encid.ToLong(&enc) ) + return FALSE; + encoding = (wxFontEncoding)enc; + facename = tokenizer.GetNextToken(); if ( !facename ) return FALSE; @@ -74,7 +84,10 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) wxString wxNativeEncodingInfo::ToString() const { - wxString s(facename); + wxString s; + + s << (long)encoding << _T(';') << facename; + // TODO: what is this for OS/2? /* if ( charset != ANSI_CHARSET )