diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2021-04-09 21:01:58 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2021-04-09 21:01:58 +0000 |
commit | cb14c16722533ee99b36a2e6efd9a6e4820954a3 (patch) | |
tree | f5cb5fbac1ea978af4cc1ea0f5d04d51bc1d01e0 /Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps | |
parent | 94f0fd38b17b225048a0756ea6f03bbca0c30c7e (diff) |
Upgrade gs-9.53.3 -> gs-9.54.0
git-svn-id: svn://tug.org/texlive/trunk@58805 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps')
-rw-r--r-- | Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps b/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps index 394cba28e26..95d50c6be60 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2020 Artifex Software, Inc. +% Copyright (C) 2001-2021 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -414,7 +414,16 @@ pop /firstcode startc 0 getu16a 16#ff00 and dup 16#f000 ne { pop 0 } if def /putglyph { - glyphs code 3 -1 roll put /code code 1 add def + glyphs code known + { + glyphs /.cmap_warning_issued known not { + (**** Warning: Invalid TTF cmap mapping (overlapping/repeated map)\n) print flush + glyphs /.cmap_warning_issued //true put + } if + pop + } + {glyphs code 3 -1 roll put}ifelse + /code code 1 add def } bind def /glyphs 0 dict def @@ -438,6 +447,10 @@ % Two choices are: drop later repeated/overlapping segments entirely, % or only use codes from later, overlapping segments not already set % by the earlier segment. (Inspired by Bug 700968). + % Revision: bug 703589 has an (invalid) cmap table with overlapping + % (actually repeating) ranges, and requires the *first* range definition + % to be used in order to render correctly. So /putglyph now refuses to + % overwrite existing keys in the "glyphs" dictionary 0 2 nseg2 dup 4 lt {pop 4}if 3 sub { /i2 exch def /scode startc i2 getu16a def @@ -464,7 +477,10 @@ } for } ifelse } if - } for glyphs /glyphs //null def % for GC + } for + % If we've encoutered an invalid table, remove the key before returning + glyphs /.cmap_warning_issued undef + glyphs /glyphs //null def % for GC } .bind 6 { % Single interval lookup. dup 6 getu16a /firstcode exch def |