void wxFontRefData::SetPointSize(int pointSize) { // NB: Pango doesn't support point sizes less than 1 m_pointSize = pointSize == wxDEFAULT || pointSize < 1 ? wxDEFAULT_FONT_SIZE : pointSize; #if wxUSE_UNICODE m_nativeFontInfo.SetPointSize(m_pointSize); #endif }
void wxFontRefData::InitFromNative() { // Get native info PangoFontDescription *desc = m_nativeFontInfo.description; // Pango sometimes needs to have a size int pango_size = pango_font_description_get_size( desc ); if (pango_size == 0) m_nativeFontInfo.SetPointSize(wxDEFAULT_FONT_SIZE); }
void wxFontRefData::InitFromNative() { // Get native info PangoFontDescription *desc = m_nativeFontInfo.description; // Pango sometimes needs to have a size int pango_size = pango_font_description_get_size( desc ); if (pango_size == 0) m_nativeFontInfo.SetPointSize(wxDEFAULT_FONT_SIZE); // Pango description are never underlined m_underlined = false; m_strikethrough = false; }
void wxFontRefData::InitFromNative() { m_noAA = false; // Get native info PangoFontDescription *desc = m_nativeFontInfo.description; // Pango sometimes needs to have a size int pango_size = pango_font_description_get_size( desc ); if (pango_size == 0) m_nativeFontInfo.SetPointSize(wxDEFAULT_FONT_SIZE); wxString faceName = wxGTK_CONV_BACK_SYS(pango_font_description_get_family(desc)); if (faceName == wxT("monospace")) { m_family = wxFONTFAMILY_TELETYPE; } else if (faceName == wxT("sans")) { m_family = wxFONTFAMILY_SWISS; } else if (faceName == wxT("serif")) { m_family = wxFONTFAMILY_ROMAN; } else { m_family = wxFONTFAMILY_UNKNOWN; } // Pango description are never underlined m_underlined = false; // always with GTK+ 2 m_encoding = wxFONTENCODING_UTF8; }
void wxFontRefData::SetPointSize(int pointSize) { m_nativeFontInfo.SetPointSize(pointSize); }