[gs-cvs] rev 7665 - trunk/gs/lib
alexcher at ghostscript.com
alexcher at ghostscript.com
Wed Jan 31 19:06:58 PST 2007
Author: alexcher
Date: 2007-01-31 19:06:58 -0800 (Wed, 31 Jan 2007)
New Revision: 7665
Modified:
trunk/gs/lib/gs_ttf.ps
Log:
Bring TrueType font recognition in .loadfontfile procedure up to
the level of resourcefont procedure in the PDF interpreter. Identify
files starting with <00010000>, (true), (typ1), (ttcf) as TrueType
fonts.
DIFFERENCES:
The fix changes the order of directory enumeration and affects the
checksums of CET 09-56-01 and 28-06-01.
Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps 2007-02-01 02:09:25 UTC (rev 7664)
+++ trunk/gs/lib/gs_ttf.ps 2007-02-01 03:06:58 UTC (rev 7665)
@@ -82,10 +82,12 @@
% Load a font file that might be a TrueType font.
+/tt_tag_dict << <00010000> 0 (true) 0 (typ1) 0 (ttcf) 0 >> readonly def
+
% <file> .loadfontfile -
/.loadnonttfontfile /.loadfontfile load def
/.loadfontfile {
- dup read pop 2 copy unread 0 eq {
+ dup (1234) .peekstring { //tt_tag_dict exch known } { //false } ifelse {
% If this is a font at all, it's a TrueType font.
.loadttfont pop
} {
@@ -94,6 +96,8 @@
} ifelse
} bind def
+currentdict /tt_tag_dict .undef
+
% ---------------- Automatic Type 42 generation ---------------- %
% Load a TrueType font from a file as a Type 42 PostScript font.
More information about the gs-cvs
mailing list