From 317a3d0271b21813e50d7c9e8288e26d21c62d4f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 27 Apr 2015 14:55:55 +0200 Subject: epub: Fix (incorrectly) recursively multiplied relative font sizes. --- source/html/html-layout.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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 -- cgit v1.2.3