diff options
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r-- | fitz/res_font.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index 1b07d060..56481962 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -887,11 +887,12 @@ fz_bound_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm) } fz_pixmap * -fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_colorspace *model, fz_rect scissor) +fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_colorspace *model, fz_irect scissor) { fz_display_list *list; fz_matrix ctm; - fz_rect bbox; + fz_rect bounds; + fz_irect bbox; fz_device *dev; fz_pixmap *glyph; fz_pixmap *result; @@ -920,13 +921,10 @@ fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_co model = NULL; /* Treat as masked */ } - bbox = fz_bound_glyph(ctx, font, gid, trm); - bbox.x0 -= 1; - bbox.y0 -= 1; - bbox.x1 += 1; - bbox.y1 += 1; - - bbox = fz_intersect_rect(bbox, scissor); + bounds = fz_bound_glyph(ctx, font, gid, trm); + bounds = fz_expand_rect(bounds, 1); + bbox = fz_rect_covering_rect(bounds); + bbox = fz_intersect_irect(bbox, scissor); glyph = fz_new_pixmap_with_bbox(ctx, model ? model : fz_device_gray, bbox); fz_clear_pixmap(ctx, glyph); |