diff options
author | Henry <henry.stiles@artifex.com> | 2017-03-03 10:00:05 -0700 |
---|---|---|
committer | Henry <henry.stiles@artifex.com> | 2017-03-03 10:03:49 -0700 |
commit | 1d2da0ae232605c4f62a97f8cf1cedce15c4ba9f (patch) | |
tree | 46826285c6ffb0d97c00eb7b14f6fa1928d0fe92 | |
parent | c9cb91b2fb59481247aaee88779577ef6c103327 (diff) | |
download | ghostpdl-1d2da0ae232605c4f62a97f8cf1cedce15c4ba9f.tar.gz |
Add error message when resident fonts are not found.
The fix also uncovered a regression. The XL interpreter was checking
if the function to load built in fonts returned a code less than 0
which does not happen anymore. Upon error the function returns 0 (false),
indicating no fonts found.
-rw-r--r-- | pcl/pcl/pcfont.c | 6 | ||||
-rw-r--r-- | pcl/pxl/pxsessio.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/pcl/pcl/pcfont.c b/pcl/pcl/pcfont.c index 99d8473b5..ec347bbdc 100644 --- a/pcl/pcl/pcfont.c +++ b/pcl/pcl/pcfont.c @@ -551,8 +551,10 @@ pcl_set_current_font_environment(pcl_state_t * pcs) /* PCL requires the fonts, RTL does not use the fonts */ if (pcs->personality == rtl) return 0; - else + else { + errprintf(pcs->memory, "Fonts not found\n"); return gs_error_Fatal; + } } pcl_data_storage = pcds_internal; break; @@ -583,7 +585,7 @@ pcl_set_current_font_environment(pcl_state_t * pcs) pcl_data_storage = pcds_all_simms; break; default: - dmprintf(pcs->memory, "pcfont.c: unknown pjl resource\n"); + errprintf(pcs->memory, "pcfont.c: unknown pjl resource\n"); return -1; } { diff --git a/pcl/pxl/pxsessio.c b/pcl/pxl/pxsessio.c index 7e648103e..c93d2072b 100644 --- a/pcl/pxl/pxsessio.c +++ b/pcl/pxl/pxsessio.c @@ -276,12 +276,12 @@ pxBeginSession(px_args_t * par, px_state_t * pxs) /* NB reverse orientations missing */ /* install the built in fonts */ - if (pl_load_built_in_fonts + if (!pl_load_built_in_fonts (pjl_proc_fontsource_to_path(pxs->pjls, "I"), pxs->memory, &pxs->builtin_font_dict, pxs->font_dir, (int)pxfsInternal, - true /* use unicode key names */ ) < 0) { - dmprintf(pxs->memory, "Fatal error - no resident fonts\n"); - return -1; + true /* use unicode key names */ )) { + errprintf(pxs->memory, "Fonts not found\n"); + return gs_error_Fatal; } } |