X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e1d0be19102670c4ea8c08ec5b9fd9467dcf02c..8a094d7ba9913333b49f8561d97b8309d0023663:/src/mac/fontutil.cpp diff --git a/src/mac/fontutil.cpp b/src/mac/fontutil.cpp index c5a0f583d6..04c8f22e11 100644 --- a/src/mac/fontutil.cpp +++ b/src/mac/fontutil.cpp @@ -6,7 +6,7 @@ // Created: 05.11.99 // RCS-ID: $Id$ // Copyright: (c) 1999 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -36,6 +36,7 @@ #include "wx/fontutil.h" #include "wx/fontmap.h" +#include "wx/encinfo.h" #include "wx/tokenzr.h" @@ -48,18 +49,12 @@ // ---------------------------------------------------------------------------- // convert to/from the string representation: format is -// encodingid;facename[;charset] +// 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; @@ -85,10 +80,7 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) wxString wxNativeEncodingInfo::ToString() const { - wxString s; - - s << (long)encoding << _T(';') << facename; - + wxString s(facename); if ( charset != 0 ) { s << _T(';') << charset; @@ -159,8 +151,6 @@ bool wxGetNativeFontEncoding(wxFontEncoding encoding, return FALSE; } - info->encoding = encoding; - return TRUE; }