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

leonardo at ghostscript.com leonardo at ghostscript.com
Thu Aug 10 04:13:34 PDT 2006


Author: leonardo
Date: 2006-08-10 04:13:34 -0700 (Thu, 10 Aug 2006)
New Revision: 6983

Modified:
   trunk/gs/src/gdevpdtd.c
Log:
Fix (pdfwrite) : Wrong xref : Unuseful object ID when a font is not really used in the document.

DETAILS :

Bug 688824 "invalid xref table from pdfwrite",

The old code reserved an object ID for the FontFile object
when the font is set but no text rendered with the font in the document.
The new code skips creating the FontFile object if
no object ID assigned to the font descriptor.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gdevpdtd.c
===================================================================
--- trunk/gs/src/gdevpdtd.c	2006-08-10 07:37:45 UTC (rev 6982)
+++ trunk/gs/src/gdevpdtd.c	2006-08-10 11:13:34 UTC (rev 6983)
@@ -552,6 +552,8 @@
     int code = 0;
     cos_dict_t *pcd = 0;
 
+    if (pfd->common.object->id == -1)
+	return 0;
     if (!pfd->common.object->written &&
 	(code = pdf_compute_font_descriptor(pdev, pfd)) >= 0 &&
 	(!pfd->embed ||



More information about the gs-cvs mailing list