wxMac Font bug and "fix"; was RE: Need to install Classic problem on OSX 10.4.7

Stefan Csomor csomor at advancedconcepts.ch
Thu Aug 17 21:42:27 PDT 2006


Hi 

> There's a loop in this code, I don't understand why everyone 
> doesn't have this same problem since wxStockGDI::GetFont just 
> calls wxSystemSettingsNative::GetFont which calls 
> wxStockGDI::GetFont...
> 
> Also note: from include/wx/gdicmn.h
> #define wxNORMAL_FONT  
> wxStockGDI::instance().GetFont(wxStockGDI::FONT_NORMAL)
> #define wxSMALL_FONT   
> wxStockGDI::instance().GetFont(wxStockGDI::FONT_SMALL)
> 
> I'm guessing that the fix should go into 
> src/mac/carbon/settings.cpp since the other code is common to 
> all platforms. It works if you do this, but I'm sure there's 
> a better way.
> 
> wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) {
>     return wxFont(12, wxFONTFAMILY_DEFAULT, 
> wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); }

most probably, but FONT_SMALL has to be changed as well, as on mac this
is a well defined font, not just something 2 points smaller. Perhaps
Vadim can tell us what the best way to setup things correctly again, as
these refactorings are his changes.

Best,

Stefan




More information about the wx-users mailing list