X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b0eebc537c0f96eab28295b4ae2c4e978a435a5..79f585d90388128f9d245f7c92d3013b98b9ed14:/src/mac/fontutil.cpp diff --git a/src/mac/fontutil.cpp b/src/mac/fontutil.cpp index 49d08234bc..c5a0f583d6 100644 --- a/src/mac/fontutil.cpp +++ b/src/mac/fontutil.cpp @@ -48,12 +48,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; @@ -79,7 +85,10 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) wxString wxNativeEncodingInfo::ToString() const { - wxString s(facename); + wxString s; + + s << (long)encoding << _T(';') << facename; + if ( charset != 0 ) { s << _T(';') << charset;