diff options
Diffstat (limited to 'Resource/Init/gs_ttf.ps')
-rw-r--r-- | Resource/Init/gs_ttf.ps | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps index 6be8fe99..394cba28 100644 --- a/Resource/Init/gs_ttf.ps +++ b/Resource/Init/gs_ttf.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2019 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -1657,7 +1657,13 @@ currentdict /.pickcmap_with_no_xlatmap .undef /CharStrings currentdict end } .bind def -% - .pdfcharkeys /CharStrings <charstrings> /Encoding <encoding> +% If we're using a 1,0 cmap table, we need to store the table for the heuristic +% to know whether to image or elide GID 0. See zfapi.c ps_get_glyphname_or_cid(). +% For other cmap types, we don't. Since this just pushes key/value pairs onto the +% stack for a later dicttomark op, it doesn't matter that different branches can push +% different numbers of objects. +% +% - .pdfcharkeys [/TT_cmap cmapdict] /CharStrings <charstrings> /Encoding <encoding> /.pdfcharkeys { % The following algorithms are per the PDF 1.7 Reference. TTFDEBUG { (.pdfcharkeys beg) = } if @@ -1736,12 +1742,13 @@ currentdict /.pickcmap_with_no_xlatmap .undef } ifelse } { <00010000> //.findcmap exec { + /TT_cmap 1 index cmapdict 3 -1 roll TTFDEBUG { (Using cmap 1.0 for non-symbolic.) = } if prebuilt_encoding //null ne { prebuilt_encoding .invert_encoding exch .romanmacdict //.pdfmapchars exec prebuilt_encoding } { - 0 dict exch + 0 dict exch .romanmacdict //.pdfmapchars exec /MacRomanEncodingForTrueType .findencoding } ifelse /Encoding exch |