diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2006-04-10 20:28:44 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2006-04-10 20:28:44 +0000 |
commit | c82e7c9b5d5ee70a04c2a546bfbfeea92300bc15 (patch) | |
tree | b3f608a207b4e393cd023ba42847f7c1e7742466 | |
parent | 67e786674306777cf08219b3b699527fc8b1cb7c (diff) |
Two fixes for CET 20-01.bin, handling downloading of corrupt fonts and
symbol headers. There are several other problems in this test where
we reject or accept fonts and symbol set and the HP 4600 behaves
differently. However the tests indicate the 4600 contradicts what the
test expects. We'll negotiate these problems later, this fixes the
problems preventing the test from running.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@2350 06663e23-700e-0410-b217-a244a6096597
-rw-r--r-- | pcl/pcsfont.c | 11 | ||||
-rw-r--r-- | pcl/pcsymbol.c | 2 |
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, |