diff options
author | James Bursa <james@netsurf-browser.org> | 2009-07-23 23:51:43 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2009-07-23 23:51:43 +0000 |
commit | b1c1d85f97ed75738c8da7b626317e128e0f100d (patch) | |
tree | a6bb8fbafd8ca1ae1d57911d589c6ed6fb734da7 /render/layout.c | |
parent | 3dd350a5eac1f02281d26701e1319167af9b5a26 (diff) | |
download | netsurf-b1c1d85f97ed75738c8da7b626317e128e0f100d.tar.gz netsurf-b1c1d85f97ed75738c8da7b626317e128e0f100d.tar.bz2 |
Better way of aligning text baselines. Move boxes down to align 0.75 point instead of changing height.
svn path=/trunk/netsurf/; revision=8758
Diffstat (limited to 'render/layout.c')
-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; } } |