From 8a8b535da2461ba858a32c4f346f08abca875daa Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 20 Feb 2015 19:00:37 +0000 Subject: Simplify/Correct logic in pdf_show_char Move the logic in pdf_show_char to use the same idiom as used elsewhere. Specifically this ensures that empty rects are handled correctly. --- source/pdf/pdf-op-run.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index 139f7e50..c09abb45 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -1112,12 +1112,8 @@ pdf_show_char(pdf_csi *csi, pdf_run_state *pr, int cid) fz_concat(&trm, &tsm, &pr->tm); - fz_bound_glyph(ctx, fontdesc->font, gid, &trm, &bbox); /* Compensate for the glyph cache limited positioning precision */ - bbox.x0 -= 1; - bbox.y0 -= 1; - bbox.x1 += 1; - bbox.y1 += 1; + fz_expand_rect(fz_bound_glyph(ctx, fontdesc->font, gid, &trm, &bbox), 1); /* If we are a type3 font within a type 3 font, or are otherwise * uncachable, then render direct. */ -- cgit v1.2.3