From 935f1ba5c2a4c67d98658d72322ae11402d380d0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 6 Apr 2016 00:05:32 +0200 Subject: epub: Fix vertical-align: text-top and text-bottom. --- source/html/html-layout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 56f5528a..f9fcacce 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -1003,11 +1003,13 @@ static void layout_line(fz_context *ctx, float indent, float page_w, float line_ case VA_SUPER: va = node->em * -0.3f; break; + case VA_TOP: case VA_TEXT_TOP: - va = -baseline + node->h; + va = -baseline + node->em * 0.8; break; + case VA_BOTTOM: case VA_TEXT_BOTTOM: - va = -baseline + line_h; + va = -baseline + line_h - node->em * 0.2; break; } -- cgit v1.2.3