summaryrefslogtreecommitdiff
path: root/gtk/gtkfontchooserwidget.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2011-09-23 00:32:44 +0200
committerChristian Persch <chpe@gnome.org>2011-09-23 00:32:44 +0200
commit370f0d1d8619af3ffb0bea180a53271dadd5bf21 (patch)
tree1ebebe97b9067ce11c89dc227e2ec8e3ea60d2ca /gtk/gtkfontchooserwidget.c
parent7c675b34c537e4956aec4b7e78734fb7bf836df1 (diff)
downloadgtk+-370f0d1d8619af3ffb0bea180a53271dadd5bf21.tar.gz
Disable font fallback in the fontchooser preview
The preview is should show the selected font, not whatever font contains glyphs for the preview text.
Diffstat (limited to 'gtk/gtkfontchooserwidget.c')
-rw-r--r--gtk/gtkfontchooserwidget.c4
1 files changed, 4 insertions, 0 deletions
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);