diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2009-06-17 15:50:23 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2009-06-17 15:50:23 +0000 |
commit | 499782a60110312dc46ebb1bf9f504ca01392377 (patch) | |
tree | b91a25a2ae621b3aea77a3735a9fedf228d78268 | |
parent | 6109dfab012040b68b1f560dd321d691a431c8ba (diff) |
Clamp character shear operands to reasonable values. This should fixghostpdl-ebuild
the nightly regression problems with the Quality Logic 310 series of
files. We suspect it will fix bug #690241 comment #12 item 2, and it
will effectively mask (not fix) bug #690541.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@9798 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | pxl/pxgstate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pxl/pxgstate.c b/pxl/pxgstate.c index 0a29bad11..6d33d3a89 100644 --- a/pxl/pxgstate.c +++ b/pxl/pxgstate.c @@ -615,12 +615,22 @@ pxSetCharScale(px_args_t *par, px_state_t *pxs) const byte apxSetCharShear[] = { pxaCharShear, 0, 0 }; + + /* experiments indicate the character shearing operands are + clamped after range checking though it is not documented in + the HP manual. */ + +#define SHEAR_LIMIT 16383.0 + int pxSetCharShear(px_args_t *par, px_state_t *pxs) { real x_shear = real_value(par->pv[0], 0); real y_shear = real_value(par->pv[0], 1); px_gstate_t *pxgs = pxs->pxgs; + x_shear = x_shear > SHEAR_LIMIT ? SHEAR_LIMIT : x_shear; + y_shear = y_shear > SHEAR_LIMIT ? SHEAR_LIMIT : y_shear; + if ( x_shear != pxgs->char_shear.x || y_shear != pxgs->char_shear.y || pxgs->char_transforms[0] != pxct_shear ) |