summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcl/pcsfont.c11
-rw-r--r--pcl/pcsymbol.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/pcl/pcsfont.c b/pcl/pcsfont.c
index e819377a8..efc287755 100644
--- a/pcl/pcsfont.c
+++ b/pcl/pcsfont.c
@@ -415,6 +415,17 @@ bitmap: pfont = gs_alloc_struct(mem, gs_font_base, &st_gs_font_base,
pl_dict_put(&pcs->soft_fonts, current_font_id,
current_font_id_size, plfont);
plfont->pfont->procs.define_font = gs_no_define_font;
+ /* check unbound fonts have a legit vocabulary. If the
+ vocabulary is bogus fall back to MSL, there is a closely
+ related hack above under the pcfh_intellifont_unbound
+ case */
+ if (!pl_font_is_bound(plfont)) {
+ pl_glyph_vocabulary_t gv = (pl_glyph_vocabulary_t)
+ (~plfont->character_complement[7] & 07);
+ if (gv != plgv_MSL && gv != plgv_Unicode) {
+ plfont->character_complement[7] = 0x7;
+ }
+ }
return gs_definefont(pcs->font_dir, plfont->pfont);
}
diff --git a/pcl/pcsymbol.c b/pcl/pcsymbol.c
index b891c5a19..6af5f0f39 100644
--- a/pcl/pcsymbol.c
+++ b/pcl/pcsymbol.c
@@ -63,7 +63,7 @@ pcl_define_symbol_set(pcl_args_t *pargs, pcl_state_t *pcs)
{ int num_codes = last_code - first_code + 1;
int i;
- if ( num_codes <= 0 || count < psm_header_size + num_codes * 2 )
+ if ( num_codes <= 0 || num_codes > 256 || count < psm_header_size + num_codes * 2 )
return e_Range;
header =
(pl_symbol_map_t *)gs_alloc_bytes(mem,