summaryrefslogtreecommitdiff
path: root/gs
diff options
context:
space:
mode:
Diffstat (limited to 'gs')
-rw-r--r--gs/Resource/Init/gs_ttf.ps9
-rw-r--r--gs/Resource/Init/pdf_font.ps3
2 files changed, 12 insertions, 0 deletions
diff --git a/gs/Resource/Init/gs_ttf.ps b/gs/Resource/Init/gs_ttf.ps
index da0dab6b6..0e9a2c87b 100644
--- a/gs/Resource/Init/gs_ttf.ps
+++ b/gs/Resource/Init/gs_ttf.ps
@@ -1605,6 +1605,15 @@ currentdict /postalias undef
% CIDFontType2 fonts don't have a cmap: they are indexed by CID.
mark
.ttkeys
+ /PDFCIDFontName where { % Only set if called by the PDF interpreter.
+ pop % Remove the dictionary where it is defined.
+ /fontname PDFCIDFontName def % Use the substitute name, not the name from the name
+ % table or manufactured from XUID.
+ .dicttomark dup % convert keys to dict and copy dict
+ /FontName fontname put % replace any definition of /FontName
+ mark exch % put a mark on stack
+ {} forall % read keys from dict back onto stack
+ } if
.definettcidfont
} bind def
diff --git a/gs/Resource/Init/pdf_font.ps b/gs/Resource/Init/pdf_font.ps
index 04c002515..217ccbb6f 100644
--- a/gs/Resource/Init/pdf_font.ps
+++ b/gs/Resource/Init/pdf_font.ps
@@ -1006,8 +1006,11 @@ currentdict /eexec_pdf_param_dict .undef
true resolvestream readfontfilter
% Stack: filepos fontres stream
1 index /Subtype get /CIDFontType2 eq {
+ 1 index /BaseFont get % Use the BaseFont name for the font. Otherwise we
+ /PDFCIDFontName exch def % would use the name table, or a manufactured name.
.loadttcidfont
% Stack: filepos fontres cidfont
+ currentdict /PDFCIDFontName undef % Remove the name to avoid interference.
} {
% filepos fontres stream
1 index /FontDescriptor oget % filepos fontres stream fd