X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69ffc7b2061af028f8248a7f011229bd6ee2179b..2296fe5018d42d4e0bf9df07c37d31f60d972b32:/src/x11/font.cpp?ds=sidebyside diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 573951a98b..125cb3545e 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -202,7 +202,7 @@ void wxFontRefData::Init(int pointSize, case wxFONTFAMILY_TELETYPE: pango_font_description_set_family( m_nativeFontInfo.description, "monospace" ); break; - case wxFONTFAMILY_SWISS: + case wxFONTFAMILY_ROMAN: pango_font_description_set_family( m_nativeFontInfo.description, "serif" ); break; default: @@ -884,6 +884,9 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const } wxString xFontName = M_FONTDATA->m_nativeFontInfo.GetXFontName(); + if (xFontName == "-*-*-*-*-*--*-*-*-*-*-*-*-*") + // wxFont constructor not called with native font info parameter => take M_FONTDATA values + xFontName.Clear(); // not found, create a new one XFontStruct *font = (XFontStruct *)