diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2006-04-10 21:28:24 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2006-04-10 21:28:24 +0000 |
commit | 0c7996a01d7a32c3bac9df401517c005ae84bbc6 (patch) | |
tree | 52c8a131c42fa6d877f264316bbc125e1abcfd2b /pcl | |
parent | c82e7c9b5d5ee70a04c2a546bfbfeea92300bc15 (diff) |
fixes 30-05... pitch ceiling.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@2351 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/pgchar.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pcl/pgchar.c b/pcl/pgchar.c index b4a1728de..b2a3f0af6 100644 --- a/pcl/pgchar.c +++ b/pcl/pgchar.c @@ -66,9 +66,12 @@ hpgl_font_definition(hpgl_args_t *pargs, hpgl_state_t *pgls, int index) { hpgl_real_t pitch; if ( !hpgl_arg_c_real(pgls->memory, pargs, &pitch) ) return e_Range; - if ( (pl_fp_pitch_per_inch(pfp) != pitch) && (pitch >= 0) ) - pl_fp_set_pitch_per_inch(pfp, pitch), - pargs->phase |= 2; + if ( (pl_fp_pitch_per_inch(pfp) != pitch) && + (pitch >= 0) && (pitch < 32768.0) ) { + pl_fp_set_pitch_per_inch(pfp, pitch > 7200.0 ? 7200.0 : pitch); + pargs->phase |= 2; + } + } break; case 4: /* height */ |