diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index 411d6755e..a5cf231c4 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2473,12 +2473,13 @@ bool layout_line(struct box *first, int *width, int *y, assert(b != first || (move_y && 0 < used_height && (left || right))); - /* set height of all text boxes to line height */ + /* align baselines of all text boxes by moving their y so that their + * 0.75 point is aligned */ for (d = first; d != b; d = d->next) { if (d->type == BOX_INLINE || d->type == BOX_BR || d->type == BOX_TEXT || d->type == BOX_INLINE_END) { - d->height = used_height; + d->y += 0.75 * used_height - 0.75 * d->height; } } |