X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a473abaf2f6171a649fac9ede9a5f11cb7ddbeb..438959cca892a7651634cc3a7aad4819ac49b23c:/include/wx/osx/font.h diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index b05661b4b1..d5e277f979 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.h +// Name: wx/osx/font.h // Purpose: wxFont class // Author: Julian Smart // Modified by: @@ -27,7 +27,7 @@ enum wxOSXSystemFont wxOSX_SYSTEM_FONT_MINI, wxOSX_SYSTEM_FONT_MINI_BOLD, wxOSX_SYSTEM_FONT_LABELS, - wxOSX_SYSTEM_FONT_VIEWS, + wxOSX_SYSTEM_FONT_VIEWS }; @@ -37,6 +37,20 @@ public: // ctors and such wxFont() { } + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + wxFont( wxOSXSystemFont systemFont ); #if wxOSX_USE_COCOA @@ -108,6 +122,8 @@ public: virtual wxFontEncoding GetEncoding() const; virtual const wxNativeFontInfo *GetNativeFontInfo() const; + virtual bool IsFixedWidth() const; + virtual void SetPointSize(int pointSize); virtual void SetFamily(wxFontFamily family); virtual void SetStyle(wxFontStyle style);