diff options
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_cff.ps')
-rw-r--r-- | Master/tlpkg/tlgs/Resource/Init/gs_cff.ps | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps index b60e3740572..125906132b7 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2018 Artifex Software, Inc. +% Copyright (C) 2001-2019 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -33,33 +33,6 @@ % Load a font file that might be an OpenType CFF font set. -% <file> .loadfontfile - -/.loadnonottofontfile /.loadfontfile load def -/.loadfontfile { - dup (12345678) .peekstring pop (wOFFOTTO) eq - { - .init_wOFF_otto_font_file - //true //false - }{//true} ifelse - - { - dup 4 string .peekstring pop (OTTO) eq - { - % If this is a font at all, it's an OpenType CFF font set. - .init_otto_font_file //true - } - { //false } ifelse - } if - - { % Use a random FontSet resource name. ****** WRONG ****** - realtime rand xor =string cvs exch //false //false - ReadData pop - } { - % Not a TrueType font. - .loadnonottofontfile - } ifelse -} bind def - % <file> .init_otto_font_file <file> /.init_otto_font_file { /FontSetInit /ProcSet findresource begin @@ -79,7 +52,7 @@ exch 3 -1 roll 1 add 16 mul 12 add sub f exch subfilefilter flushfile % skip to start f exch subfilefilter end -} bind def +} .bind executeonly odef % <file> .init_otto_font_file <file> /.init_wOFF_otto_font_file { @@ -116,8 +89,37 @@ { pop f exch subfilefilter /FlateDecode filter} ifelse end } bind def -20 dict begin +% <file> .loadfontfile - +/.loadnonottofontfile /.loadfontfile load def +/.loadfontfile { + dup (12345678) .peekstring pop (wOFFOTTO) eq + { + //.init_wOFF_otto_font_file exec + //true //false + }{//true} ifelse + + { + dup 4 string .peekstring pop (OTTO) eq + { + % If this is a font at all, it's an OpenType CFF font set. + .init_otto_font_file //true + } + { //false } ifelse + } if + + { % Use a random FontSet resource name. ****** WRONG ****** + realtime rand xor =string cvs exch //false //false + ReadData pop + } { + % Not a TrueType font. + .loadnonottofontfile + } ifelse +} bind executeonly def + +currentdict /.init_wOFF_otto_font_file .forceundef + +20 dict begin % ------ Utilities ------ % /subfilefilter { % <file> <length> subfilefilter <filter> |