diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2023-02-20 13:44:31 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2023-02-23 16:34:59 +0000 |
commit | ec203362d93fd7d61ca2775aaac17b23c1cca6c8 (patch) | |
tree | ef84965ef63389f4a95ace1a77845b77ab6be13e /pdf/pdf_font1C.c | |
parent | 42a4ff9ac99e365734a35a90beaa114ee2e81f39 (diff) | |
download | ghostpdl-ec203362d93fd7d61ca2775aaac17b23c1cca6c8.tar.gz |
Bug 706257: CIDFont glyph ordering issues with pdfi/pdfwrite
This exposed a couple of issues:
Firstly, and most importantly, when pdfwrite uses the callback to retrieve the
glyph index for text in a CIDFont, it uses the descendant font, not the Type 0,
as I originally thought. For embedded CIDFonts, that didn't cause a problem, but
for substituted CIDFonts it meant the glyph decoding callback did not have
access to the decoding table.
Secondly, fixing that exposed some byte ordering issues, where Unicode codes
read from the ToUnicode CMap differed in byte order from codes read from the
decoding table.
Diffstat (limited to 'pdf/pdf_font1C.c')
-rw-r--r-- | pdf/pdf_font1C.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_font1C.c b/pdf/pdf_font1C.c index 7c2466266..81d192a52 100644 --- a/pdf/pdf_font1C.c +++ b/pdf/pdf_font1C.c @@ -2051,7 +2051,7 @@ pdfi_alloc_cff_cidfont(pdf_context *ctx, pdf_cidfont_type0 ** font, uint32_t obj we won't worry about working without FAPI */ pfont->procs.encode_char = pdfi_encode_char; pfont->procs.glyph_name = ctx->get_glyph_name; - pfont->procs.decode_glyph = pdfi_decode_glyph; + pfont->procs.decode_glyph = pdfi_cidfont_decode_glyph; pfont->procs.define_font = gs_no_define_font; pfont->procs.make_font = gs_no_make_font; pfont->procs.font_info = gs_default_font_info; |