diff options
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r-- | fitz/res_font.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index 17646ea3..ffee1d46 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -535,6 +535,7 @@ fz_render_t3_glyph(fz_font *font, int gid, fz_matrix trm, fz_colorspace *model) error = font->t3run(font->t3xref, font->t3resources, contents, dev, ctm); if (error) fz_catch(error, "cannot draw type3 glyph"); + if (dev->flags & FZ_CHARPROC_MASK) { if (dev->flags & FZ_CHARPROC_COLOR) @@ -551,6 +552,7 @@ fz_render_t3_glyph(fz_font *font, int gid, fz_matrix trm, fz_colorspace *model) fz_warn("type3 glyph doesn't specify masked or colored"); model = NULL; /* Treat as masked */ } + fz_free_device(dev); bbox.x0--; @@ -558,7 +560,7 @@ fz_render_t3_glyph(fz_font *font, int gid, fz_matrix trm, fz_colorspace *model) bbox.x1++; bbox.y1++; - glyph = fz_new_pixmap_with_rect((model ? model : fz_device_gray), bbox); + glyph = fz_new_pixmap_with_rect(model ? model : fz_device_gray, bbox); fz_clear_pixmap(glyph); cache = fz_new_glyph_cache(); |