diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-17 10:22:06 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-02-17 10:22:06 +0100 |
commit | f439ac9b889ce757133f8cb5d261381190e2065f (patch) | |
tree | 8e8df1533bc1f273e1a523ec3ff8c7c5b4b270f3 /src/styleengine.cc | |
parent | 4c303cba1745f13057ccbc9c21eaeb44fe955efe (diff) |
add font_max_size dillorc option
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 5939547b..5c6f0972 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -34,6 +34,8 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) { font_attrs.size = (int) (14 * prefs.font_factor + 0.5); if (font_attrs.size < prefs.font_min_size) font_attrs.size = prefs.font_min_size; + if (font_attrs.size > prefs.font_max_size) + font_attrs.size = prefs.font_max_size; font_attrs.weight = 400; font_attrs.style = FONT_STYLE_NORMAL; @@ -231,6 +233,8 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) { if (fontAttrs.size < prefs.font_min_size) fontAttrs.size = prefs.font_min_size; + if (fontAttrs.size > prefs.font_max_size) + fontAttrs.size = prefs.font_max_size; break; case CSS_PROPERTY_FONT_STYLE: |