X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04a18b0d958a3c7507089dc374e71bdad143981d..3bf93e1e9ac6b61e5220967d2ada2d4faec4dd9c:/src/msw/font.cpp diff --git a/src/msw/font.cpp b/src/msw/font.cpp index b18902071f..c9f7b35890 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -108,8 +108,8 @@ public: // constructors wxFontRefData() { - Init(-1, wxSize(0, 0), FALSE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, - wxFONTWEIGHT_NORMAL, FALSE, wxEmptyString, + Init(-1, wxSize(0,0), false, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, + wxFONTWEIGHT_NORMAL, false, wxEmptyString, wxFONTENCODING_DEFAULT); } @@ -223,7 +223,7 @@ public: else { m_pointSize = pointSize; - m_sizeUsingPixels = FALSE; + m_sizeUsingPixels = false; } } @@ -236,7 +236,7 @@ public: else { m_pixelSize = pixelSize; - m_sizeUsingPixels = TRUE; + m_sizeUsingPixels = true; } } @@ -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;