From f5263de25f42552fce13944b23238676503d0e9d Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 2 Oct 2016 13:23:30 -0400 Subject: Add ctx to fz_font functions. --- source/pdf/pdf-device.c | 4 ++-- source/pdf/pdf-op-run.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c index ccf63e42..f2fd75fc 100644 --- a/source/pdf/pdf-device.c +++ b/source/pdf/pdf-device.c @@ -384,7 +384,7 @@ pdf_dev_font(fz_context *ctx, pdf_device *pdev, fz_font *font) if (gs->font >= 0 && pdev->cid_fonts[gs->font] == font) return; - if (fz_font_t3_procs(font)) + if (fz_font_t3_procs(ctx, font)) fz_throw(ctx, FZ_ERROR_GENERIC, "pdf device does not support type 3 fonts"); if (fz_font_flags(font)->ft_substitute) fz_throw(ctx, FZ_ERROR_GENERIC, "pdf device does not support substitute fonts"); @@ -470,7 +470,7 @@ pdf_dev_text_span(fz_context *ctx, pdf_device *pdev, fz_text_span *span) if (fabsf(dx) > 0 || fabsf(dy) > 0) fz_buffer_printf(ctx, gs->buf, "%f %f %f %f %f %f Tm\n", tm.a, tm.b, tm.c, tm.d, tm.e, tm.f); - if (fz_font_t3_procs(span->font)) + if (fz_font_t3_procs(ctx, span->font)) fz_buffer_printf(ctx, gs->buf, "<%02x> Tj\n", it->gid); else fz_buffer_printf(ctx, gs->buf, "<%04x> Tj\n", it->gid); diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index ff3034fe..bfee0866 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -926,7 +926,7 @@ pdf_show_char(fz_context *ctx, pdf_run_processor *pr, int cid) /* If we are a type3 font within a type 3 font, or are otherwise * uncachable, then render direct. */ - render_direct = (!fz_font_ft_face(fontdesc->font) && pr->nested_depth > 0) || !fz_glyph_cacheable(ctx, fontdesc->font, gid); + render_direct = (!fz_font_ft_face(ctx, fontdesc->font) && pr->nested_depth > 0) || !fz_glyph_cacheable(ctx, fontdesc->font, gid); /* flush buffered text if rendermode has changed */ if (!pr->text || gstate->render != pr->text_mode || render_direct) -- cgit v1.2.3