X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eddec696f06d65a80e7339b2fae14fcb55f8383..bf2c43c76e2819be443ab1d830ab68d9569d66b1:/src/cocoa/settings.mm diff --git a/src/cocoa/settings.mm b/src/cocoa/settings.mm index 618486478b..ea351f7831 100644 --- a/src/cocoa/settings.mm +++ b/src/cocoa/settings.mm @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2005/01/11 -// RCS-ID: $Id$ // Copyright: (c) 2005 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,13 +14,14 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/gdicmn.h" #endif -#include "wx/gdicmn.h" - #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/private/fontfactory.h" #import +#import // ---------------------------------------------------------------------------- // wxSystemSettingsNative @@ -107,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 :