From 370f0d1d8619af3ffb0bea180a53271dadd5bf21 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 23 Sep 2011 00:32:44 +0200 Subject: [PATCH] Disable font fallback in the fontchooser preview The preview is should show the selected font, not whatever font contains glyphs for the preview text. --- gtk/gtkfontchooserwidget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index e3cac95eb2..9a3f37cb12 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -834,6 +834,10 @@ gtk_font_chooser_widget_get_preview_attributes (GtkFontChooserWidget *font pango_attr_list_insert (attrs, attribute); } + attribute = pango_attr_fallback_new (FALSE); + attribute->start_index = first_line_len; + pango_attr_list_insert (attrs, attribute); + attribute = pango_attr_size_new_absolute (gtk_font_chooser_widget_get_preview_text_height (fontchooser)); attribute->start_index = first_line_len; pango_attr_list_insert (attrs, attribute);