diff options
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r-- | fitz/res_font.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index b790d198..1b07d060 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -872,7 +872,6 @@ fz_bound_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm) fz_display_list *list; fz_matrix ctm; fz_rect bounds; - fz_bbox bbox; fz_device *dev; list = font->t3lists[gid]; @@ -880,23 +879,19 @@ fz_bound_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm) return fz_transform_rect(trm, fz_empty_rect); ctm = fz_concat(font->t3matrix, trm); - dev = fz_new_bbox_device(ctx, &bbox); - fz_run_display_list(list, dev, ctm, fz_infinite_bbox, NULL); + dev = fz_new_bbox_device(ctx, &bounds); + fz_run_display_list(list, dev, ctm, fz_infinite_rect, NULL); fz_free_device(dev); - bounds.x0 = bbox.x0; - bounds.y0 = bbox.y0; - bounds.x1 = bbox.x1; - bounds.y1 = bbox.y1; return bounds; } fz_pixmap * -fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_colorspace *model, fz_bbox scissor) +fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_colorspace *model, fz_rect scissor) { fz_display_list *list; fz_matrix ctm; - fz_bbox bbox; + fz_rect bbox; fz_device *dev; fz_pixmap *glyph; fz_pixmap *result; @@ -925,20 +920,20 @@ fz_render_t3_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix trm, fz_co model = NULL; /* Treat as masked */ } - bbox = fz_bbox_covering_rect(fz_bound_glyph(ctx, font, gid, trm)); - bbox.x0--; - bbox.y0--; - bbox.x1++; - bbox.y1++; + bbox = fz_bound_glyph(ctx, font, gid, trm); + bbox.x0 -= 1; + bbox.y0 -= 1; + bbox.x1 += 1; + bbox.y1 += 1; - bbox = fz_intersect_bbox(bbox, scissor); + bbox = fz_intersect_rect(bbox, scissor); glyph = fz_new_pixmap_with_bbox(ctx, model ? model : fz_device_gray, bbox); fz_clear_pixmap(ctx, glyph); ctm = fz_concat(font->t3matrix, trm); dev = fz_new_draw_device_type3(ctx, glyph); - fz_run_display_list(list, dev, ctm, fz_infinite_bbox, NULL); + fz_run_display_list(list, dev, ctm, fz_infinite_rect, NULL); fz_free_device(dev); if (!model) |