summaryrefslogtreecommitdiff
path: root/fitz/res_font.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-04-24 17:10:23 +0200
committerTor Andersson <tor@ghostscript.com>2010-04-24 17:10:23 +0200
commit7c51bb4750d689115b93c3cfbe317c691a25a6d3 (patch)
tree20d32f8455a3ec60c4a21969de6fd13e1e060383 /fitz/res_font.c
parentaeb141acd4e3b1a7fd5511ab539e593910b50adc (diff)
downloadmupdf-7c51bb4750d689115b93c3cfbe317c691a25a6d3.tar.xz
Round type 3 font bounding box size outward when rendering.
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r--fitz/res_font.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c
index 41b20340..f7b29773 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -365,6 +365,10 @@ fz_rendert3glyph(fz_font *font, int gid, fz_matrix trm)
ctm = fz_concat(font->t3matrix, trm);
bbox = fz_transformrect(ctm, font->bbox);
+ bbox.x0 = floor(bbox.x0);
+ bbox.y0 = floor(bbox.y0);
+ bbox.x1 = ceil(bbox.x1);
+ bbox.y1 = ceil(bbox.y1);
glyph = fz_newpixmap(nil, bbox.x0, bbox.y0, bbox.x1 - bbox.x0, bbox.y1 - bbox.y0);
fz_clearpixmap(glyph, 0x00);