X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c79853685d09ba1d7eaef604395c40b731ed2f34..2035e10e83324c6925d12725b842768f6e2b00a2:/src/gtk/font.cpp diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index a486103090..5e9d1ce629 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -398,7 +398,16 @@ static GdkFont *GtkGetDefaultGuiFont() { GtkWidget *widget = gtk_button_new(); GtkStyle *def = gtk_rc_get_style( widget ); - g_systemDefaultGuiFont = gdk_font_ref( def->font ); + if (def) + { + g_systemDefaultGuiFont = gdk_font_ref( def->font ); + } + else + { + def = gtk_widget_get_default_style(); + if (def) + g_systemDefaultGuiFont = gdk_font_ref( def->font ); + } gtk_widget_destroy( widget ); } return g_systemDefaultGuiFont; @@ -428,7 +437,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const { font = GtkGetDefaultGuiFont(); } - else + if (!font) { font = wxLoadQueryNearestFont( point_scale, M_FONTDATA->m_family,