[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1833-g0f7653f
[email protected] (Chris Liddell) Fri, 8 Nov 2019 13:33:50 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via 0f7653fd4f1d1c5bf36719efcd8464eafcd46faf (commit)
from 6882df85d37819d849476cf2b4822a90e64d9b24 (commit)
----------------------------------------------------------------------
commit 0f7653fd4f1d1c5bf36719efcd8464eafcd46faf
Author: Chris Liddell <[email protected]>
Date: Fri Nov 8 12:47:59 2019 +0000
Bug 701870: Use object number from Font rather than FontDescriptor
In case where two CIDFont /Font objects share a /FontDescriptor, because the
/Font objects can contain different details like /CIDSystemInfo contents and
/CIDToGIDMap, if we use the object number from the /FontDescriptor to validate
the instance of the font we should use, we can end up reusing a (Postscript)
font when we shouldn't. This can result in garbled or missing glyphs.
diff --git a/Resource/Init/pdf_font.ps b/Resource/Init/pdf_font.ps
index 81b7af1..8638904 100644
--- a/Resource/Init/pdf_font.ps
+++ b/Resource/Init/pdf_font.ps
@@ -2473,23 +2473,22 @@ currentdict /bndef undef
% if the font was defined in-line, we won't have a object number
dup /.gs.pdfobj# .knownget not { //null } if
} {
- dup /FontDescriptor knownoget {
% if the font was defined in-line, we won't have a object number
- dup /.gs.pdfobj# .knownget not { //null }if
- dup //null eq {
- exch pop
- }{
- exch dup /FontFile knownoget not {
- dup /FontFile2 knownoget not {
- dup /FontFile3 knownoget not {
- pop pop //null
- } {pop pop}ifelse
+ dup /.gs.pdfobj# .knownget not { //null }if
+ dup //null eq not {
+ 1 index /FontDescriptor knownoget {
+ dup /FontFile knownoget not {
+ dup /FontFile2 knownoget not {
+ dup /FontFile3 knownoget not {
+ pop pop //null
} {pop pop}ifelse
- }{pop pop}ifelse
- }ifelse
- }{
- //null
- } ifelse
+ } {pop pop}ifelse
+ }{pop pop}ifelse
+ }
+ {
+ pop //null
+ } ifelse
+ }if
} ifelse
3 1 roll
Summary of changes:
Resource/Init/pdf_font.ps | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)