diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2002-05-22 06:23:23 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2002-05-22 06:23:23 +0000 |
commit | fedbfc6f80c4332c052a25e2045f8bb59ba19c02 (patch) | |
tree | a5aac5abd7f97e3ac63fab87c1dcff729dd42692 /pxl/pxfont.c | |
parent | 3054c2f2065b87d6031dd56e8b72c6a2043047f6 (diff) |
Fallback... identity map characters that are double byte if the
current symbol set only support single byte characters.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@1654 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pxl/pxfont.c')
-rw-r--r-- | pxl/pxfont.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pxl/pxfont.c b/pxl/pxfont.c index 6d9e84ec8..aadcabfa6 100644 --- a/pxl/pxfont.c +++ b/pxl/pxfont.c @@ -453,8 +453,16 @@ map_symbol(uint chr, const gs_text_enum_t *penum) return chr; first_code = pl_get_uint16(psm->first_code); - if ( chr < first_code || chr > pl_get_uint16(psm->last_code) ) - return 0xffff; + if ( chr < first_code || chr > pl_get_uint16(psm->last_code) ) { + /* it is unclear how to handle the case of double byte + characters and single byte symbol sets, based on a + small sample of tests hp seems to just return the + character. */ + if ( ( chr > 0xff ) && + pl_get_uint16(psm->last_code) <= 0xff ) + return chr; + return 0xffff; + } return psm->codes[chr - first_code]; } |