diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-09 14:24:14 +0000 |
---|---|---|
committer | Robin Watts <robin@ghostscript.com> | 2012-01-10 18:07:12 +0000 |
commit | 0230a0417212172c391483d054364fb081c79168 (patch) | |
tree | 732333cb183c35b97fd04e0f759af2eb49e5d45d /fitz/res_text.c | |
parent | 6019356f6efd8d71bba7843de4262322529dfcae (diff) | |
download | mupdf-0230a0417212172c391483d054364fb081c79168.tar.xz |
Move fuzz from fz_execute_display_list into fz_bound_text.
Keep the fuzz in just one place. Hopefully will be rendered
unnecessary by changes to make fz_bound_text accurate.
Diffstat (limited to 'fitz/res_text.c')
-rw-r--r-- | fitz/res_text.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fitz/res_text.c b/fitz/res_text.c index 63338435..fae2606b 100644 --- a/fitz/res_text.c +++ b/fitz/res_text.c @@ -98,6 +98,13 @@ fz_bound_text(fz_text *text, fz_matrix ctm) bbox.x1 += fbox.x1; bbox.y1 += fbox.y1; + /* add some fuzz at the edges, as font bbox is often not accurate. + * Better to localise this fuzz in just this one place than have it + * everywhere that looks at these results. If we ever change to using + * freetype to exactly bound text, we can remove this. */ + bbox.x0 -= 20; bbox.y0 -= 20; + bbox.x1 += 20; bbox.y1 += 20; + return bbox; } |