aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-10-14 21:32:47 +0000
committercorvid <corvid@lavabit.com>2011-10-14 21:32:47 +0000
commit658b771be04003785d7450bfbce30c6a682fd1ea (patch)
tree32d0c902327a731ec37a0642c7154d17a2dfc47b /src
parent5028d7056ea91be9875420b576b45c3b9e90e517 (diff)
font-size property, let absolute-size and relative-size values have larger effect
Using roughly 1.2 per step, a value mentioned in the CSS2.1 spec. Firefox appears to use a value that is similar but a little larger. http://css-tricks.com/2580-css-font-size/ says that "keyword sizing is pretty consistent across browsers and platforms", and perhaps someday we'll want to go out of our way to make them exactly the same, but this is a start.
Diffstat (limited to 'src')
-rw-r--r--src/styleengine.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 6060836c..d1d8e969 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -331,30 +331,33 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props) {
if (p->type == CSS_TYPE_ENUM) {
switch (p->value.intVal) {
case CSS_FONT_SIZE_XX_SMALL:
- fontAttrs.size = roundInt(11.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(8.1 * prefs.font_factor);
break;
case CSS_FONT_SIZE_X_SMALL:
- fontAttrs.size = roundInt(12.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(9.7 * prefs.font_factor);
break;
case CSS_FONT_SIZE_SMALL:
- fontAttrs.size = roundInt(13.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(11.7 * prefs.font_factor);
break;
case CSS_FONT_SIZE_MEDIUM:
fontAttrs.size = roundInt(14.0 * prefs.font_factor);
break;
case CSS_FONT_SIZE_LARGE:
+ fontAttrs.size = roundInt(16.8 * prefs.font_factor);
break;
case CSS_FONT_SIZE_X_LARGE:
- fontAttrs.size = roundInt(16.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(20.2 * prefs.font_factor);
break;
case CSS_FONT_SIZE_XX_LARGE:
- fontAttrs.size = roundInt(17.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(24.2 * prefs.font_factor);
break;
case CSS_FONT_SIZE_SMALLER:
- fontAttrs.size -= roundInt(1.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(fontAttrs.size * 0.83 *
+ prefs.font_factor);
break;
case CSS_FONT_SIZE_LARGER:
- fontAttrs.size += roundInt(1.0 * prefs.font_factor);
+ fontAttrs.size = roundInt(fontAttrs.size * 1.2 *
+ prefs.font_factor);
break;
default:
assert(false); // invalid font-size enum