X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/46b03af7ae3afe6ab7d4be71fcd1625a006af6ff..f363cee882672e147340240cf0bb194a68e37833:/src/gtk1/font.cpp diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 93e30695a4..57ba87c846 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -2,7 +2,6 @@ // Name: src/gtk1/font.cpp // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -24,9 +23,11 @@ #include "wx/log.h" #include "wx/settings.h" #include "wx/gdicmn.h" + #include "wx/crt.h" #endif #include "wx/fontutil.h" +#include "wx/encinfo.h" #include "wx/utils.h" #include "wx/tokenzr.h" @@ -519,14 +520,14 @@ wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const int wxFont::GetPointSize() const { - wxCHECK_MSG( Ok(), 0, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), 0, wxT("invalid font") ); return M_FONTDATA->m_pointSize; } wxString wxFont::GetFaceName() const { - wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); return M_FONTDATA->m_faceName; } @@ -538,28 +539,28 @@ wxFontFamily wxFont::DoGetFamily() const wxFontStyle wxFont::GetStyle() const { - wxCHECK_MSG( Ok(), wxFONTSTYLE_MAX, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTSTYLE_MAX, wxT("invalid font") ); return M_FONTDATA->m_style; } wxFontWeight wxFont::GetWeight() const { - wxCHECK_MSG( Ok(), wxFONTWEIGHT_MAX, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTWEIGHT_MAX, wxT("invalid font") ); return M_FONTDATA->m_weight; } bool wxFont::GetUnderlined() const { - wxCHECK_MSG( Ok(), false, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), false, wxT("invalid font") ); return M_FONTDATA->m_underlined; } wxFontEncoding wxFont::GetEncoding() const { - wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTENCODING_DEFAULT, wxT("invalid font") ); // m_encoding is unused in wxGTK2, return encoding that the user set. return M_FONTDATA->m_encoding; @@ -567,7 +568,7 @@ wxFontEncoding wxFont::GetEncoding() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") ); if ( !M_FONTDATA->HasNativeFont() ) { @@ -582,7 +583,7 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const bool wxFont::IsFixedWidth() const { - wxCHECK_MSG( Ok(), false, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), false, wxT("invalid font") ); if ( M_FONTDATA->HasNativeFont() ) { @@ -695,7 +696,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const { GdkFont *font = NULL; - wxCHECK_MSG( Ok(), font, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), font, wxT("invalid font") ); long int_scale = long(scale * 100.0 + 0.5); // key for fontlist int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);