summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-04-27 14:55:55 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-04-27 14:55:55 +0200
commit317a3d0271b21813e50d7c9e8288e26d21c62d4f (patch)
treee21a6dd9ce848845dec4987e243e7ff09a492a61 /source
parent7b0aa18c4735638608a879bda2570cf819590825 (diff)
downloadmupdf-317a3d0271b21813e50d7c9e8288e26d21c62d4f.tar.xz
epub: Fix (incorrectly) recursively multiplied relative font sizes.
Diffstat (limited to 'source')
-rw-r--r--source/html/html-layout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index d8c30506..f0d523a2 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -348,9 +348,13 @@ static void generate_boxes(fz_context *ctx, fz_html_font_set *set, fz_archive *z
{
if (top->type != BOX_INLINE)
{
+ /* Create anonymous inline box, with the same style as the top block box. */
box = new_box(ctx);
insert_inline_box(ctx, box, top);
box->style = top->style;
+ /* Make sure not to recursively multiply font sizes. */
+ box->style.font_size.value = 1;
+ box->style.font_size.unit = N_SCALE;
generate_text(ctx, box, fz_xml_text(node));
}
else