X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b5d5223d164a3b7fbacc5e69808cadd25163b1b..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/msw/font.cpp?ds=sidebyside diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 6c47dc906f..c9f7b35890 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -108,7 +108,7 @@ public: // constructors wxFontRefData() { - Init(-1, wxSize(), false, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, + Init(-1, wxSize(0,0), false, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString, wxFONTENCODING_DEFAULT); } @@ -606,8 +606,16 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) case wxDEFAULT: default: + { + // We want Windows 2000 or later to have new fonts even MS Shell Dlg + // is returned as default GUI font for compatibility + int verMaj; ff_family = FF_SWISS; - facename = _T("MS Sans Serif"); + if(wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5) + facename = _T("MS Shell Dlg 2"); + else + facename = _T("MS Shell Dlg"); + } } lf.lfPitchAndFamily = (BYTE)(DEFAULT_PITCH) | ff_family;