summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2017-08-19 14:36:59 -0600
committerHenry Stiles <henry.stiles@artifex.com>2017-08-22 12:35:15 -0600
commit37c454cb7f70fd27f14dd2c1b9c63528b3a237ab (patch)
tree61ce81fdf9a5a3ed149a8430c727b25d20dfd1ff /xps
parent3d3fbafe4a8d1a74a3edb3acbe844da66e1176a2 (diff)
downloadghostpdl-37c454cb7f70fd27f14dd2c1b9c63528b3a237ab.tar.gz
Fix debug -dNOCACHE command line option.
In the last PL API change the code to disbable the cache was accidentally removed.
Diffstat (limited to 'xps')
-rw-r--r--xps/xpstop.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/xps/xpstop.c b/xps/xpstop.c
index a15d93f3b..fab1d14d5 100644
--- a/xps/xpstop.c
+++ b/xps/xpstop.c
@@ -70,20 +70,17 @@ xps_imp_characteristics(const pl_interp_implementation_t *pimpl)
return &xps_characteristics;
}
-#if 0
-/* This function 'appears to be' intended to disable font caching, but in fact
- * it does nothing, just retrieving the 'nocache' parameter from the *PCL*
- * main instance. I suspect this is garbage when running XPS. Removed the
- * function and its call, as its pointless.
- */
static void
xps_set_nocache(pl_interp_implementation_t *impl, gs_font_dir *font_dir)
{
+ bool nocache;
xps_interp_instance_t *xpsi = impl->interp_client_data;
- pl_main_get_nocache(xpsi->memory);
+ nocache = pl_main_get_nocache(xpsi->memory);
+ if (nocache)
+ gs_setcachelimit(font_dir, 0);
return;
}
-#endif
+
static int
xps_set_icc_user_params(pl_interp_implementation_t *impl, gs_gstate *pgs)
@@ -190,9 +187,7 @@ xps_imp_set_device(pl_interp_implementation_t *impl, gx_device *pdevice)
gs_setaccuratecurves(ctx->pgs, true); /* NB not sure */
gs_setfilladjust(ctx->pgs, 0, 0);
(void)xps_set_icc_user_params(impl, ctx->pgs);
- /* Removed as being pointless, see the function
xps_set_nocache(impl, ctx->fontdir);
- */
gs_setscanconverter(ctx->pgs, pl_main_get_scanconverter(ctx->memory));