summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-04-06 00:05:32 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-04-06 00:58:04 +0200
commit935f1ba5c2a4c67d98658d72322ae11402d380d0 (patch)
tree53b3bb9107bc8e29babf0bc1ddd94d7f17dcb42b
parent0c7b4e5feef2bf95c291010b0ffc5619f2610ffd (diff)
downloadmupdf-935f1ba5c2a4c67d98658d72322ae11402d380d0.tar.xz
epub: Fix vertical-align: text-top and text-bottom.
-rw-r--r--source/html/html-layout.c6
1 files 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;
}