diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2021-02-26 08:03:56 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2021-02-26 13:38:26 +0000 |
commit | 1052cd38c6ffff27c0b3a45848afd4030bfd568c (patch) | |
tree | 5c228aad9ac2051099a80ae55292276d1235cdc1 /Resource | |
parent | f31bb656a756fa0ed76420078aeaf8467396871e (diff) | |
download | ghostpdl-1052cd38c6ffff27c0b3a45848afd4030bfd568c.tar.gz |
Bug 703273: Prioritise Nonsymbolic over Symbolic font flag
The font in this PDF has it descriptor flags set to 36, that is bit 3 (Symbolic)
and bit 6 (Nonsymbolic) are both set. Since the two flags are mutually exclusive
this is clearly broken!
Previously, we only test the Symbolic flag, since !Symbolic should imply
Nonsymbolic, which caused us to use the wrong encoding scheme.
Now, we'll act on the Symbolic flag iff the Nonsymbolic flag is not set.
(Originally a mupdf report, that also exhibited in Ghostscript).
Diffstat (limited to 'Resource')
-rw-r--r-- | Resource/Init/pdf_font.ps | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps index 5b0cc42d0..d852a20bf 100644 --- a/Resource/Init/pdf_font.ps +++ b/Resource/Init/pdf_font.ps @@ -1498,7 +1498,9 @@ currentdict /eexec_pdf_param_dict .undef } { % filepos fontres stream 1 index /FontDescriptor oget - /Flags oget 4 and 0 ne { + /Flags oget dup % only believe the symbolic flag if the non-symbolic flag is not also set! + 4 and 0 ne + exch 32 and 0 eq and { //true % symbolic } { 1 index /Encoding oknown not % no encoding => symbolic |