diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2006-08-17 19:41:14 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2006-08-17 19:41:14 +0000 |
commit | 097044996c37a1791c9e61aa7fc45c760a8e8e78 (patch) | |
tree | 9e3cb59c403f7acd195232f0c7e227791cc5e236 /gtk/font_pango.c | |
parent | af6a2cd2e032db417bb0423be5aaf73b94ff17c2 (diff) | |
download | netsurf-097044996c37a1791c9e61aa7fc45c760a8e8e78.tar.gz netsurf-097044996c37a1791c9e61aa7fc45c760a8e8e78.tar.bz2 |
Make nsgtk respect minimum font size setting, and save font size choices
svn path=/trunk/netsurf/; revision=2859
Diffstat (limited to 'gtk/font_pango.c')
-rw-r--r-- | gtk/font_pango.c | 10 |
1 files changed, 8 insertions, 2 deletions
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: |