[gs-commits] rev 11779 - trunk/gs/base

ken at ghostscript.com ken at ghostscript.com
Fri Oct 8 14:42:19 UTC 2010

Author: ken
Date: 2010-10-08 14:42:18 +0000 (Fri, 08 Oct 2010)
New Revision: 11779

Fix (pdfwrite) : Process text in Tr 3 even if the Widths are non-standard

Bug #691605 "Invisible text not preserved by pdfwrite"

The problem was that if text in text rendering mode 4 (neither stroke nor fill) used a
font where the entries in the FontDescriptor /Widths array did not match the actual 
widths in the font, the code took a path where the glyphs were not added to the 'used'
list, and so were never emitted.

Text in regular fonts where the /Widths array was missing, or matched the widths in the
font (as the spec says they must) worked correctly.

Fixed by processing text whose operation properties include TEXT_RENDER_MORE_3 the
same as text with the TEXT_DO_DRAW property.

Modified: trunk/gs/base/gdevpdte.c
--- trunk/gs/base/gdevpdte.c	2010-10-08 13:42:41 UTC (rev 11778)
+++ trunk/gs/base/gdevpdte.c	2010-10-08 14:42:18 UTC (rev 11779)
@@ -1017,7 +1017,7 @@
 	pdf_char_widths_to_uts(pdfont3, &cw); /* convert design->text space */
-	if (pte->text.operation & TEXT_DO_DRAW) {
+	if (pte->text.operation & (TEXT_DO_DRAW | TEXT_RENDER_MODE_3)) {
 	    gs_distance_transform(cw.Width.xy.x * ppts->values.size,
 				  cw.Width.xy.y * ppts->values.size,
 				  &ppts->values.matrix, &did);

More information about the gs-commits mailing list