summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-op-run.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-02-20 19:00:37 +0000
committerRobin Watts <robin.watts@artifex.com>2015-02-24 10:09:50 +0000
commit8a8b535da2461ba858a32c4f346f08abca875daa (patch)
tree7cd4f7b56ce6174d8911c59c4fa5714949ea1c40 /source/pdf/pdf-op-run.c
parent490d1d9e4aee082f08c2a9b097c4910796908d55 (diff)
downloadmupdf-8a8b535da2461ba858a32c4f346f08abca875daa.tar.xz
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.
Diffstat (limited to 'source/pdf/pdf-op-run.c')
-rw-r--r--source/pdf/pdf-op-run.c6
1 files changed, 1 insertions, 5 deletions
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. */