X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db16cab4610b294c3412f6508754b55ef4a42895..1cbee0b42c9755a98104e3b1d8fd1133483ea54f:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index 315cb82736..cc862c4931 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -178,6 +178,28 @@ void wxFontRefData::Init(int pointSize, m_underlined = underlined; m_encoding = encoding; + +#ifdef __WXGTK20__ + // Create native font info + m_nativeFontInfo.description = pango_font_description_new(); + + // And set its values + switch (m_family) + { + case wxFONTFAMILY_TELETYPE: + pango_font_description_set_family( m_nativeFontInfo.description, "monospace" ); + break; + case wxFONTFAMILY_SWISS: + pango_font_description_set_family( m_nativeFontInfo.description, "serif" ); + break; + default: + pango_font_description_set_family( m_nativeFontInfo.description, "sans" ); + break; + } + SetStyle( m_style ); + SetPointSize( m_pointSize ); + SetWeight( m_weight ); +#endif } wxFontRefData::wxFontRefData( const wxFontRefData& data ) @@ -252,7 +274,7 @@ wxFontRefData::wxFontRefData(const wxString& fontname) break; } - if (m_faceName == wxT("monospaced")) + if (m_faceName == wxT("monospace")) { m_family = wxFONTFAMILY_TELETYPE; }