X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e50d5284f9b468609e4b55b69329a6e83a1d0c8e..589abe2cdb7ce83a8c4f3c8785137974f8c3d30f:/src/mac/carbon/fontutil.cpp diff --git a/src/mac/carbon/fontutil.cpp b/src/mac/carbon/fontutil.cpp index 005fefab22..2947ff8d0e 100644 --- a/src/mac/carbon/fontutil.cpp +++ b/src/mac/carbon/fontutil.cpp @@ -9,19 +9,6 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#ifdef __GNUG__ - #pragma implementation "fontutil.h" -#endif - -// For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -32,32 +19,24 @@ #include "wx/string.h" #include "wx/log.h" #include "wx/intl.h" -#endif //WX_PRECOMP +#endif #include "wx/fontutil.h" #include "wx/fontmap.h" #include "wx/encinfo.h" - #include "wx/tokenzr.h" -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// wxNativeEncodingInfo -// ---------------------------------------------------------------------------- - -// convert to/from the string representation: format is -// facename[;charset] -bool wxNativeEncodingInfo::FromString(const wxString& s) +// convert to/from the string representation: +// format is facename[;charset] +// +bool wxNativeEncodingInfo::FromString( const wxString& s ) { - wxStringTokenizer tokenizer(s, _T(";")); + wxStringTokenizer tokenizer(s, wxT(";")); facename = tokenizer.GetNextToken(); if ( !facename ) - return FALSE; + return false; wxString tmp = tokenizer.GetNextToken(); if ( !tmp ) @@ -68,23 +47,19 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) } else { - if ( wxSscanf(tmp, _T("%u"), &charset) != 1 ) - { + if ( wxSscanf( tmp, wxT("%u"), &charset ) != 1 ) // should be a number! - return FALSE; - } + return false; } - return TRUE; + return true; } wxString wxNativeEncodingInfo::ToString() const { wxString s(facename); if ( charset != 0 ) - { - s << _T(';') << charset; - } + s << wxT(';') << charset; return s; } @@ -93,24 +68,20 @@ wxString wxNativeEncodingInfo::ToString() const // helper functions // ---------------------------------------------------------------------------- -bool wxGetNativeFontEncoding(wxFontEncoding encoding, - wxNativeEncodingInfo *info) +bool wxGetNativeFontEncoding( wxFontEncoding encoding, wxNativeEncodingInfo *info ) { - wxCHECK_MSG( info, FALSE, _T("bad pointer in wxGetNativeFontEncoding") ); + wxCHECK_MSG( info, false, wxT("bad pointer in wxGetNativeFontEncoding") ); if ( encoding == wxFONTENCODING_DEFAULT ) - { encoding = wxFont::GetDefaultEncoding(); - } - info->encoding = encoding ; + info->encoding = encoding; - return TRUE; + return true; } -bool wxTestFontEncoding(const wxNativeEncodingInfo& info) +bool wxTestFontEncoding( const wxNativeEncodingInfo& info ) { - return info.encoding == wxFont::GetDefaultEncoding() ; + // basically we should be able to support every encoding via the OS + return true; } - -