X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/cocoa/settings.mm?ds=sidebyside diff --git a/src/cocoa/settings.mm b/src/cocoa/settings.mm index 192911f682..0f6ffb05f0 100644 --- a/src/cocoa/settings.mm +++ b/src/cocoa/settings.mm @@ -11,16 +11,18 @@ #include "wx/wxprec.h" +#include "wx/settings.h" + #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/gdicmn.h" #endif -#include "wx/settings.h" -#include "wx/gdicmn.h" - #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/private/fontfactory.h" #import +#import // ---------------------------------------------------------------------------- // wxSystemSettingsNative @@ -106,8 +108,10 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { -// return a nonworking font object, crash from wxInitializeStockObjects - return wxFont(); + // Return the system font for now + { wxAutoNSAutoreleasePool pool; + return wxCocoaFontFactory::InstanceForNSFont([NSFont systemFontOfSize:0.0], false); + } switch (index) { case wxSYS_ANSI_VAR_FONT :