[gtk+] fontchooserwidget: Handle dpi < 0
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] fontchooserwidget: Handle dpi < 0
- Date: Fri, 16 Dec 2011 03:56:07 +0000 (UTC)
commit 1377ff08c0ff68efbae77a9974e073bd6ef22b91
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 15 19:38:48 2011 +0100
fontchooserwidget: Handle dpi < 0
Just use 96.0
gtk/gtkfontchooserwidget.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index 7a9d879..e8c160a 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -807,7 +807,7 @@ gtk_font_chooser_widget_get_preview_text_height (GtkFontChooserWidget *fontchoos
"font-size", &font_size,
NULL);
- return dpi / 72.0 * PANGO_SCALE_X_LARGE * font_size * PANGO_SCALE;
+ return (dpi < 0.0 ? 96.0 : dpi) / 72.0 * PANGO_SCALE_X_LARGE * font_size * PANGO_SCALE;
}
static PangoAttrList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]