[gs-cvs] rev 7230 - trunk/gs/src

leonardo at ghostscript.com leonardo at ghostscript.com
Tue Nov 28 17:33:19 PST 2006


Author: leonardo
Date: 2006-11-28 17:33:19 -0800 (Tue, 28 Nov 2006)
New Revision: 7230

Modified:
   trunk/gs/src/gdevpdtd.c
Log:
Fix (pdfwrite) : Don't write min_int as XHeight.

DETAILS :

Bug 689009 "Ghostscript generated pdf/a file has an XHeight of -2147483648". 

The old code doesn't check whether XHeight is successfully computed for the font.
However some font subsets simply have no characters for its computation.
In this case the old algorithm writes min_int, which works
for internal needs of the algorithm. We believe that using zero
instead min_int is safe because fonts usually place characters over the base line.
If all chars appear below the base line, the zero value 
won't be written due to the logics for default values in 
write_FontDescriptor_common.

Thanks to Marcos for the perfect bug localization.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gdevpdtd.c
===================================================================
--- trunk/gs/src/gdevpdtd.c	2006-11-28 00:46:03 UTC (rev 7229)
+++ trunk/gs/src/gdevpdtd.c	2006-11-29 01:33:19 UTC (rev 7230)
@@ -334,7 +334,7 @@
     int fixed_width = 0;
     int small_descent = 0, small_height = 0;
     bool small_present = false;
-    int x_height = min_int;
+    int x_height = 0;
     int cap_height = 0;
     gs_rect bbox_colon, bbox_period, bbox_I;
     bool is_cid = (bfont->FontType == ft_CID_encrypted ||



More information about the gs-cvs mailing list