X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6811251bfc825216c41f2653ec3e96ebf92de9f1..04bf2fb51514e3ec8631a1d8ea1f610fca851005:/src/x11/font.cpp diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 5018bc39ed..53d2bebcca 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "font.h" -#endif - #ifdef __VMS #pragma message disable nosimpint #include "wx/vms_x_fix.h" @@ -202,7 +198,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: @@ -883,6 +879,11 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const node = node->GetNext(); } + 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 *) wxLoadQueryNearestFont(pointSize, @@ -891,7 +892,8 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const M_FONTDATA->m_weight, M_FONTDATA->m_underlined, wxT(""), - M_FONTDATA->m_encoding); + M_FONTDATA->m_encoding, + & xFontName); if ( !font ) {