[gs-cvs] rev 7680 - trunk/gs/lib
leonardo at ghostscript.com
leonardo at ghostscript.com
Tue Feb 6 03:07:48 PST 2007
Author: leonardo
Date: 2007-02-06 03:07:48 -0800 (Tue, 06 Feb 2007)
New Revision: 7680
Modified:
trunk/gs/lib/gs_ttf.ps
Log:
Fix (TT font loader) : Removing a dead code.
DETAILS :
This change is algorithmically eauivalent :
<00030001> .findcmap {
something1
} {
something2
<00010000> .findcmap {
something3
} {
something4
<00030001> .findcmap { %removed
UNREACHABLE %removed
} { %removed
somthing5
} ifelse %removed
} ifelse
} ifelse
beacuse something* don't affect .findcmap, and the latter has no side effect .
Actually it dead a long ago.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps 2007-02-06 09:50:48 UTC (rev 7679)
+++ trunk/gs/lib/gs_ttf.ps 2007-02-06 11:07:48 UTC (rev 7680)
@@ -1728,40 +1728,32 @@
% This is illegal with PDF spec.
( **** Warning: Embedded symbolic TT fonts must contain a cmap for Platform=1 Encoding=0.\n)
pdfformaterror
- % Try to map Unicode to SymbolEncoding
- <00030001> .findcmap {
- TTFDEBUG { (Using cmap 3.1) = } if
- /.allow_uniXXXX_glyph_names //true def
- AdobeGlyphList .pdfmapchars
- /Encoding /SymbolEncoding .findencoding
- } {
- % Apply the default algorithm. Hopely it has 'post'.
- .charkeys
- % check if the CharStrings dict contains glyphs needed by the
- % prebuilt_encoding otherwise try the 3,0 cmap.
- prebuilt_encoding null ne {
- false prebuilt_encoding { % false means no missing glyphs
- 4 index exch known not { pop true exit } if
- } forall
- {
- ( **** Warning: Encoding derived from 'post' is incomplete.\n)
- pdfformaterror
- % Try another cmap format 3,0 -- Adobe doesn't mention it, but does
- % use it apparently (empirically determined).
- <00030000> .findcmap {
- TTFDEBUG { (Adding cmap 3.0) = } if
- 5 1 roll pop pop pop pop
- prebuilt_encoding null ne {
- prebuilt_encoding .invert_encoding .pdfmapchars
- /Encoding prebuilt_encoding
- } {
- AdobeGlyphList .pdfmapchars
- /Encoding /SymbolEncoding .findencoding
- } ifelse
- } if
- }if
+ % Apply the default algorithm. Hopely it has 'post'.
+ .charkeys
+ % check if the CharStrings dict contains glyphs needed by the
+ % prebuilt_encoding otherwise try the 3,0 cmap.
+ prebuilt_encoding null ne {
+ false prebuilt_encoding { % false means no missing glyphs
+ 4 index exch known not { pop true exit } if
+ } forall
+ {
+ ( **** Warning: Encoding derived from 'post' is incomplete.\n)
+ pdfformaterror
+ % Try another cmap format 3,0 -- Adobe doesn't mention it, but does
+ % use it apparently (empirically determined).
+ <00030000> .findcmap {
+ TTFDEBUG { (Adding cmap 3.0) = } if
+ 5 1 roll pop pop pop pop
+ prebuilt_encoding null ne {
+ prebuilt_encoding .invert_encoding .pdfmapchars
+ /Encoding prebuilt_encoding
+ } {
+ AdobeGlyphList .pdfmapchars
+ /Encoding /SymbolEncoding .findencoding
+ } ifelse
+ } if
} if
- } ifelse
+ } if
} ifelse
} ifelse
} {
More information about the gs-cvs
mailing list