// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "font.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// 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);
}
else
{
m_pointSize = pointSize;
- m_sizeUsingPixels = FALSE;
+ m_sizeUsingPixels = false;
}
}
else
{
m_pixelSize = pixelSize;
- m_sizeUsingPixels = TRUE;
+ m_sizeUsingPixels = true;
}
}
lf.lfUnderline = underlined;
}
-void wxNativeFontInfo::SetFaceName(wxString facename)
+void wxNativeFontInfo::SetFaceName(const wxString& facename)
{
wxStrncpy(lf.lfFaceName, facename, WXSIZEOF(lf.lfFaceName));
}
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;