X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8898456df4728afe7d100011e0e23b0ffb9a6341..5a1e0e91a1ca5ec98b0eeb335cda757d1261ed08:/src/cocoa/font.cpp?ds=sidebyside diff --git a/src/cocoa/font.cpp b/src/cocoa/font.cpp index c8aa187d02..bfbed70f38 100644 --- a/src/cocoa/font.cpp +++ b/src/cocoa/font.cpp @@ -11,12 +11,13 @@ #include "wx/wxprec.h" +#include "wx/font.h" + #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/gdicmn.h" #endif -#include "wx/font.h" -#include "wx/gdicmn.h" #include "wx/encinfo.h" IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) @@ -36,6 +37,8 @@ wxFontRefData::~wxFontRefData() // TODO: delete font data } +#define M_FONTDATA ((wxFontRefData*)m_refData) + bool wxFont::Create(const wxNativeFontInfo&) { return false; @@ -57,7 +60,10 @@ int wxFont::GetPointSize() const bool wxFont::GetUnderlined() const { - return false; + if(M_FONTDATA) + return M_FONTDATA->m_underlined; + else + return false; } int wxFont::GetStyle() const @@ -160,13 +166,15 @@ void wxFont::SetWeight(int weight) RealizeResource(); } -void wxFont::SetFaceName(const wxString& faceName) +bool wxFont::SetFaceName(const wxString& faceName) { Unshare(); M_FONTDATA->m_faceName = faceName; RealizeResource(); + + return wxFontBase::SetFaceName(faceName); } void wxFont::SetUnderlined(bool underlined)