[gs-commits] rev 11822 - trunk/gs/base
ken at ghostscript.com
ken at ghostscript.com
Tue Oct 19 08:04:32 UTC 2010
Author: ken
Date: 2010-10-19 08:04:32 +0000 (Tue, 19 Oct 2010)
New Revision: 11822
Modified:
trunk/gs/base/gxtype1.c
Log:
Fix (pdfwrite) : Update CFF interpreter to handle gsubr while searching for SEAC
Bug #691680 "PDF Writer drops many accented characters"
pdfwrite makes use of a routine 'gs_type1_piece_codes' while copying fonts to determine
if a glyph is a SEAC, and therefore includes two subsidiary glyphs. This code was
updated previously (rev 10076) but on encountering a callgsubr in a CFF font, assumed
that the glyph was not a SEAC>
This patch adds support for callgsubr and continues searching glyphs which use a gsubr
to see if the gsubr is actually a SEAC type endchar.
No differences expected.
Modified: trunk/gs/base/gxtype1.c
===================================================================
--- trunk/gs/base/gxtype1.c 2010-10-18 15:44:20 UTC (rev 11821)
+++ trunk/gs/base/gxtype1.c 2010-10-19 08:04:32 UTC (rev 11822)
@@ -437,13 +437,16 @@
}
break;
case c2_callgsubr:
- /* FIXME
- * We should process subr and gsubr routines to see if they contain
- * a CFF endchar, and if it is a SEAC (deprecated but possible). Sadly
- * we don't have a full type 2 parser, and apparently can't handle gsubr
- * routines, so if we find one, assume there is no SEAC.
- */
- return 0;
+ c = fixed2int_var(*csp) + pdata->gsubrNumberBias;
+ code = pdata->procs.subr_data
+ (pfont, c, true, &ipsp[1].cs_data);
+ if (code < 0)
+ return_error(code);
+ --csp;
+ ipsp->ip = cip, ipsp->dstate = state;
+ ++ipsp;
+ cip = ipsp->cs_data.bits.data;
+ goto call;
case c_callsubr:
c = fixed2int_var(*csp) + pdata->subroutineNumberBias;
code = pdata->procs.subr_data
More information about the gs-commits
mailing list