[gs-cvs] rev 7135 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Mon Oct 30 13:47:51 PST 2006
Author: leonardo
Date: 2006-10-30 13:47:51 -0800 (Mon, 30 Oct 2006)
New Revision: 7135
Modified:
trunk/gs/src/zfcid0.c
Log:
Fix : Don't replace FDArray for a built CIDFontType 0.
DETAILS :
Debugged with 32_all.PS .
The old code didn't check whether a CIDFontType 0 is being built
at second time and erroneusely replaced FDArray in it.
It causes FDArray to be prematurely released with "restore"
when the font is not, causing a heap inconsistency.
This quick fix avoids the FDArray replacement.
However it leaves some work for the garbager.
A better fix should perform a better cleanup -
see comment in code. Delaying it for better times.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/zfcid0.c
===================================================================
--- trunk/gs/src/zfcid0.c 2006-10-30 18:20:09 UTC (rev 7134)
+++ trunk/gs/src/zfcid0.c 2006-10-30 21:47:51 UTC (rev 7135)
@@ -471,6 +471,18 @@
bf_UniqueID_ignored);
if (code < 0)
goto fail;
+ if (code == 1) {
+ /* The font already has a FID, don't need to build it again.
+ Release FDArray and return normally.
+ fixme: FDArray fonts are thrown for garbager.
+ We're not safe to build them after
+ build_gs_simple_font(..., &pfont, ...),
+ because a failure in building them would throw
+ an underbuilt font with unclear consequences.
+ */
+ ifree_object(FDArray, "buildfont9(FDarray)");
+ return 0;
+ }
pfont->procs.enumerate_glyph = gs_font_cid0_enumerate_glyph;
pfont->procs.glyph_outline = z9_glyph_outline;
pfont->procs.glyph_info = z9_glyph_info;
More information about the gs-cvs
mailing list