void wxNativeFontInfo::SetStyle(wxFontStyle style) { wxString s; switch ( style ) { case wxFONTSTYLE_ITALIC: s = wxT('i'); break; case wxFONTSTYLE_SLANT: s = wxT('o'); break; case wxFONTSTYLE_NORMAL: s = wxT('r'); default: wxFAIL_MSG( wxT("unknown wxFontStyle in wxNativeFontInfo::SetStyle") ); return; } SetXFontComponent(wxXLFD_SLANT, s); }
void wxNativeFontInfo::SetWeight(wxFontWeight weight) { wxString s; switch ( weight ) { case wxFONTWEIGHT_BOLD: s = wxT("bold"); break; case wxFONTWEIGHT_LIGHT: s = wxT("light"); break; case wxFONTWEIGHT_NORMAL: s = wxT("medium"); break; default: wxFAIL_MSG( wxT("unknown wxFontWeight in wxNativeFontInfo::SetWeight") ); return; } SetXFontComponent(wxXLFD_WEIGHT, s); }
bool wxNativeFontInfo::SetFaceName(const wxString& facename) { SetXFontComponent(wxXLFD_FAMILY, facename); return true; }
void wxNativeFontInfo::SetPointSize(int pointsize) { SetXFontComponent(wxXLFD_POINTSIZE, wxString::Format(wxT("%d"), pointsize)); }