X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..76e7cfab8fdb0c7862fd07e427af54181717fc62:/src/cocoa/settings.mm diff --git a/src/cocoa/settings.mm b/src/cocoa/settings.mm index 192911f682..ea351f7831 100644 --- a/src/cocoa/settings.mm +++ b/src/cocoa/settings.mm @@ -4,23 +4,24 @@ // Author: David Elliott // Modified by: // Created: 2005/01/11 -// RCS-ID: $Id$ // Copyright: (c) 2005 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #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 +107,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 :