summaryrefslogtreecommitdiff
path: root/doc/language-bindings/md/python-gsapi.md
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-09-27 13:03:57 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-09-27 13:47:40 +0100
commitbf79b61cb1677d6865c45d397435848a21e8a647 (patch)
treeebadae31cbbcb0957151d97b8aac33d63ef07a56 /doc/language-bindings/md/python-gsapi.md
parent7c248efec62649cf2f5ae4917e7d7aa648ce81ce (diff)
downloadghostpdl-bf79b61cb1677d6865c45d397435848a21e8a647.tar.gz
PCL interpreter - fix decode_glyph for Unicode
The text extraction (and pdfwrite family) expect that decode_glyph should always return pairs of bytes (an assumption that Unicode code points are 2 bytes), and the return value from the routine should be the number of bytes required to hold the value. The PCL decode_glyph routine however was simply returning 1, which caused the text extraction code some difficulty since it wasn't expecting that. This commit firstly alters the text extraction code to cope 'better' with a decode_glyph routine which returns an odd value (basically ignore it and fall back to using the character code). We also alter the pl_decode_glyph routine to return 2 instead of 1, so that it correctly tells the caller that it is returning 2 bytes. Finally we make sure that the returned value is big-endian, because the text extraction code assumes it will be.
Diffstat (limited to 'doc/language-bindings/md/python-gsapi.md')
0 files changed, 0 insertions, 0 deletions