[gs-cvs] rev 6938 - trunk/gs/lib
giles at ghostscript.com
giles at ghostscript.com
Mon Jul 31 11:49:16 PDT 2006
Author: giles
Date: 2006-07-31 11:49:16 -0700 (Mon, 31 Jul 2006)
New Revision: 6938
Modified:
trunk/gs/lib/gs_ttf.ps
trunk/gs/lib/pdf_font.ps
Log:
Pass a 32-element string to cvrs in instances where the int could be more
than 32 bits on some architectures. After a sketch by L. Peter Deutsch,
Closes bug 688794.
DETAILS:
An <int> in the Ghostscript ps interpreter is a C long, and so on 64 bit Linux, for example, it will be 64 bits, which in these instances require more than 8 characters for representation in hex. We use 32 characters (128 bits of hex) to be on the safe side.
The PLRM says the size of an int is implementation dependent. It can also be argued that it assumes this is 32 bits. In fact, one of the Genoa tests fails with longer ints. We choose to follow the clearest statement here, that the size is up to us.
Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps 2006-07-31 17:39:29 UTC (rev 6937)
+++ trunk/gs/lib/gs_ttf.ps 2006-07-31 18:49:16 UTC (rev 6938)
@@ -978,7 +978,7 @@
tabdict /name .knownget {
% Find the names from the 'name' table.
/names exch def
- /FontName names 6 findname not { names 4 findname not { curxuid 16#ffffffff and 16 8 string cvrs } if } if
+ /FontName names 6 findname not { names 4 findname not { curxuid 16#ffffffff and 16 32 string cvrs } if } if
/fontname 1 index def
/FontInfo mark
names 0 findname { /Notice exch } if
@@ -987,7 +987,7 @@
names 5 findname { /Version exch } if
} {
% No name table, fabricate a FontName.
- /FontName curxuid 16#ffffffff and 16 8 string cvrs
+ /FontName curxuid 16#ffffffff and 16 32 string cvrs
/fontname 1 index def
/FontInfo mark
} ifelse
Modified: trunk/gs/lib/pdf_font.ps
===================================================================
--- trunk/gs/lib/pdf_font.ps 2006-07-31 17:39:29 UTC (rev 6937)
+++ trunk/gs/lib/pdf_font.ps 2006-07-31 18:49:16 UTC (rev 6938)
@@ -763,7 +763,7 @@
/LastChar 1 index /LastChar oget def
} if
/FontName 1 index /Name .knownget not {
- PDFfile fileposition 16 10 string cvrs cvn
+ PDFfile fileposition 16 32 string cvrs cvn
} if def
/Encoding .notdefEncoding 2 index getencoding def
More information about the gs-cvs
mailing list