summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-04-25 14:43:20 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-04-25 15:40:05 +0100
commit02b15c0e165754b903bc60c0db9be2658009727d (patch)
treec402962ad080046d929455989a931271caebda77 /Resource
parenteb5f064809ec77776c18dd6fd9de89559169d946 (diff)
downloadghostpdl-02b15c0e165754b903bc60c0db9be2658009727d.tar.gz
Bug 705250: Maintain glyph name -> GID -> charstring mapping
In Type 2 fonts, we were "collapsing" the mapping of the glyph name to GID to charstring mapping into a single glyph name to charstring map. That is contrary to the description in the PLRM 3rd Edition. This becomes a problem when attempting to re-encode the font by replacing the glyph name to GID encoding in the CharStrings dictionary, where we expect to find a charstring, we find an integer (GID). This changes how we create Type 2 fonts from CFF so it maintains that two step mapping, and re-encoding will now work.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/gs_type1.ps8
1 files changed, 7 insertions, 1 deletions
diff --git a/Resource/Init/gs_type1.ps b/Resource/Init/gs_type1.ps
index fa3cdd882..ef3650937 100644
--- a/Resource/Init/gs_type1.ps
+++ b/Resource/Init/gs_type1.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2021 Artifex Software, Inc.
+% Copyright (C) 2001-2022 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -224,6 +224,12 @@ currentdict /.loadfont1 .undef
ifelse
/.notdef CharStrings /.notdef get
} if
+ dup type /integertype eq
+ currentdict /CFFCharStrings known and
+ {
+ CFFCharStrings exch .knownget not
+ { CFFCharStrings 0 get} if
+ } if
end
} bind def