return m_nativeFontInfoOk ? true : m_sizeUsingPixels;
}
- int GetFamily() const
+ wxFontFamily GetFamily() const
{
return m_family;
}
- int GetStyle() const
+ wxFontStyle GetStyle() const
{
return m_nativeFontInfoOk ? m_nativeFontInfo.GetStyle()
: m_style;
}
- int GetWeight() const
+ wxFontWeight GetWeight() const
{
return m_nativeFontInfoOk ? m_nativeFontInfo.GetWeight()
: m_weight;
m_nativeFontInfo = info;
// This is the best we can do since we don't have the
// correct information at this point.
- m_family = wxSWISS;
+ m_family = wxFONTFAMILY_SWISS;
}
wxFontRefData::~wxFontRefData()
bool wxNativeFontInfo::SetFaceName(const wxString& facename)
{
- size_t len = WXSIZEOF(lf.lfFaceName);
- wxStrncpy(lf.lfFaceName, facename, len);
- lf.lfFaceName[len - 1] = '\0'; // truncate the face name
+ wxStrlcpy(lf.lfFaceName, facename.c_str(), WXSIZEOF(lf.lfFaceName));
return true;
}