X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/cocoa/settings.mm 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 :