[gs-cvs] rev 7517 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Sun Dec 17 21:00:01 PST 2006
Author: leonardo
Date: 2006-12-17 21:00:00 -0800 (Sun, 17 Dec 2006)
New Revision: 7517
Modified:
trunk/gs/src/gstype42.c
trunk/gs/src/gxccman.c
trunk/gs/src/gxfcopy.c
trunk/gs/src/gxfont42.h
trunk/gs/src/zfont42.c
Log:
Fix : Removing a dead code about USE_ttfReader.
DETAILS :
USE_ttfReader was introduced for PCL needs due to a poor design.
Novadays PCL code doesn't use it - sets always true.
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/gstype42.c
===================================================================
--- trunk/gs/src/gstype42.c 2006-12-17 13:56:52 UTC (rev 7516)
+++ trunk/gs/src/gstype42.c 2006-12-18 05:00:00 UTC (rev 7517)
@@ -94,7 +94,7 @@
* string_proc, and the font procedures as well.
*/
int
-gs_type42_font_init(gs_font_type42 * pfont, int subfontID, bool USE_ttfReader)
+gs_type42_font_init(gs_font_type42 * pfont, int subfontID)
{
int (*string_proc)(gs_font_type42 *, ulong, uint, const byte **) =
pfont->data.string_proc;
@@ -216,26 +216,7 @@
pfont->procs.glyph_info = gs_type42_glyph_info;
pfont->procs.enumerate_glyph = gs_type42_enumerate_glyph;
pfont->procs.font_info = gs_type42_font_info;
- pfont->data.USE_ttfReader = USE_ttfReader;
-
- if( USE_ttfReader == false ) {
- /* Allows specialization via different pfont->data.* functions.
- *
- * No extra allocations len_glyphs,
- * the "default" data.get_* procs must be overridden.
- * bbox must be provided.
- *
- * And the ttfReader in gx_add_fm_pair won't be constructed/used.
- */
- pfont->data.get_glyph_index = 0;
- pfont->data.get_outline = 0;
- pfont->data.get_metrics = 0;
- pfont->data.len_glyphs = 0; /* used below along with a special notify destructor */
- /* early exit cures the leak of gs_len_glyphs_release not being called.
- * the return could be removed relying on alloc of size 0 to work.
- */
- return 0;
- }
+
/* default data.get routines require a ram version of a ttf file */
pfont->data.get_glyph_index = default_get_glyph_index;
pfont->data.get_outline = default_get_outline;
Modified: trunk/gs/src/gxccman.c
===================================================================
--- trunk/gs/src/gxccman.c 2006-12-17 13:56:52 UTC (rev 7516)
+++ trunk/gs/src/gxccman.c 2006-12-18 05:00:00 UTC (rev 7517)
@@ -250,7 +250,7 @@
if (font->FontType == ft_TrueType || font->FontType == ft_CID_TrueType) {
gs_font_type42 *pfont = (gs_font_type42 *)font;
- if (pfont->FAPI==NULL && pfont->data.USE_ttfReader)
+ if (pfont->FAPI==NULL)
return true;
}
return false;
Modified: trunk/gs/src/gxfcopy.c
===================================================================
--- trunk/gs/src/gxfcopy.c 2006-12-17 13:56:52 UTC (rev 7516)
+++ trunk/gs/src/gxfcopy.c 2006-12-18 05:00:00 UTC (rev 7517)
@@ -1292,7 +1292,7 @@
psf_write_cid2_stripped(&fs, (gs_font_cid2 *)font42);
copied42->data.string_proc = copied_type42_string_proc;
copied42->data.proc_data = cfdata;
- code = gs_type42_font_init(copied42, 0, font42->data.USE_ttfReader);
+ code = gs_type42_font_init(copied42, 0);
if (code < 0)
goto fail2;
/* gs_type42_font_init overwrites font_info. */
Modified: trunk/gs/src/gxfont42.h
===================================================================
--- trunk/gs/src/gxfont42.h 2006-12-17 13:56:52 UTC (rev 7516)
+++ trunk/gs/src/gxfont42.h 2006-12-18 05:00:00 UTC (rev 7517)
@@ -55,15 +55,6 @@
int (*get_metrics)(gs_font_type42 *pfont, uint glyph_index, int wmode,
float sbw[4]);
-
- /* Essentially subclasses gs_type42 into with ttfReader and without ttReader
- * Set by gs_type42_font_init,
- * used by gx_add_fm_pair() to do a ISA inspection and attach a ttfReader to the font
- * if false no ttfReader is attached and normal font calls are dispatched.
- * Used to process ttf fonts with UFST without FAPI
- */
- bool USE_ttfReader;
-
/* The following are cached values. */
ulong cmap; /* offset to cmap table (not used by */
/* renderer, only here for clients) */
@@ -114,7 +105,7 @@
* USE_ttfReader subclasses gs_font_type42 with ttfReader or without.
* FAPI will disable ttfReader as well.
*/
-int gs_type42_font_init(gs_font_type42 *pfont, int subfontid, bool USE_ttfReader);
+int gs_type42_font_init(gs_font_type42 *pfont, int subfontid);
/* Append the outline of a TrueType character to a path. */
int gs_type42_append(uint glyph_index, gs_state * pgs,
Modified: trunk/gs/src/zfont42.c
===================================================================
--- trunk/gs/src/zfont42.c 2006-12-17 13:56:52 UTC (rev 7516)
+++ trunk/gs/src/zfont42.c 2006-12-18 05:00:00 UTC (rev 7517)
@@ -77,7 +77,7 @@
ref_assign(&pdata->u.type42.GlyphDirectory, &GlyphDirectory);
pfont->data.string_proc = z42_string_proc;
pfont->data.proc_data = (char *)pdata;
- code = gs_type42_font_init(pfont, 0, true /*Use ttfReader */);
+ code = gs_type42_font_init(pfont, 0);
if (code < 0)
return code;
pfont->procs.font_info = z42_font_info;
More information about the gs-cvs
mailing list