summaryrefslogtreecommitdiff
path: root/source/html/css-apply.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-05-15 16:11:21 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-05-15 16:12:23 +0200
commitafa0a2b4b0508fb6b095c30a6e27afd0c5c21c64 (patch)
tree4d38a5777ffac2ffd0f7585d8a7cd859244957f6 /source/html/css-apply.c
parent5179418ae7f4497ad6fec2e7d1ac2a8ad7492fd8 (diff)
downloadmupdf-afa0a2b4b0508fb6b095c30a6e27afd0c5c21c64.tar.xz
epub: Don't inherit font-size textually, despite what the spec says.
Ignore inheritance on font-size properties altogether. Since we already inherit the font-size during the 'em' calculations when laying out text, inheriting the font-size property textually will result in doubling the effect of any scaling.
Diffstat (limited to 'source/html/css-apply.c')
-rw-r--r--source/html/css-apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/html/css-apply.c b/source/html/css-apply.c
index 6d99c07d..a4fe01d7 100644
--- a/source/html/css-apply.c
+++ b/source/html/css-apply.c
@@ -4,7 +4,6 @@ static const char *inherit_list[] = {
"color",
"direction",
"font-family",
- "font-size",
"font-style",
"font-variant",
"font-weight",
@@ -665,7 +664,8 @@ value_from_property(fz_css_match *match, const char *name)
if (match->up)
{
if (value && !strcmp(value->data, "inherit"))
- return value_from_property(match->up, name);
+ if (strcmp(name, "font-size") != 0) /* never inherit 'font-size' textually */
+ return value_from_property(match->up, name);
if (!value && keyword_in_list(name, inherit_list, nelem(inherit_list)))
return value_from_property(match->up, name);
}