X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ec698211d5d82a009ac80fb354059e9af497508..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/cocoa/settings.mm?ds=sidebyside diff --git a/src/cocoa/settings.mm b/src/cocoa/settings.mm index e6adf7446b..0f6ffb05f0 100644 --- a/src/cocoa/settings.mm +++ b/src/cocoa/settings.mm @@ -10,16 +10,19 @@ ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" -#ifndef WX_PRECOMP -#endif #include "wx/settings.h" -#include "wx/gdicmn.h" -#include "wx/utils.h" + +#ifndef WX_PRECOMP + #include "wx/utils.h" + #include "wx/gdicmn.h" +#endif #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/private/fontfactory.h" #import +#import // ---------------------------------------------------------------------------- // wxSystemSettingsNative @@ -105,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 :