From 097044996c37a1791c9e61aa7fc45c760a8e8e78 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Thu, 17 Aug 2006 19:41:14 +0000 Subject: Make nsgtk respect minimum font size setting, and save font size choices svn path=/trunk/netsurf/; revision=2859 --- gtk/font_pango.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gtk/font_pango.c') diff --git a/gtk/font_pango.c b/gtk/font_pango.c index 9589db6ff..0f38cbce5 100644 --- a/gtk/font_pango.c +++ b/gtk/font_pango.c @@ -21,6 +21,7 @@ #include "netsurf/render/font.h" #include "netsurf/utils/utils.h" #include "netsurf/utils/log.h" +#include "netsurf/desktop/options.h" /* Until we can consider the descenders etc, we need to not render using cairo */ #undef CAIRO_VERSION @@ -256,9 +257,14 @@ PangoFontDescription *nsfont_style_to_description( desc = pango_font_description_new(); if (style->font_size.value.length.unit == CSS_UNIT_PX) - size = style->font_size.value.length.value * PANGO_SCALE; + size = style->font_size.value.length.value; else - size = css_len2pt(&style->font_size.value.length, style) * PANGO_SCALE; + size = css_len2pt(&style->font_size.value.length, style); + + if (size < abs(option_font_min_size / 10)) + size = option_font_min_size / 10; + + size *= PANGO_SCALE; switch (style->font_style) { case CSS_FONT_STYLE_ITALIC: -- cgit v1.2.3