diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2017-04-20 11:57:14 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2017-04-20 11:57:14 +0100 |
commit | 13b97d2c1b4c8a819e0682047d044f9308a56174 (patch) | |
tree | c3e290b1b3fa99561faafaa74ce0be65b48c631e /base/gxpath.c | |
parent | 8210a2864372723b49c526e2b102fdc00c9c4699 (diff) | |
download | ghostpdl-13b97d2c1b4c8a819e0682047d044f9308a56174.tar.gz |
Initialise path bounding boxes.
Bug #697770 "Inconsistent behaviour"
The problem is that gx_path_init_bbox_accumulator() sets bbox_accurate
which is later used to signal that the attached bbox is valid and
accurate.
But we don't actually initialise the bbox member at all, in the bug in
question the glyph has no contours, so creates no path, leaving the
bbox uninitialised. But because we have set bbox_accurate we just
copy the values when determining the font bounding box, leading to
insane values.
Initialising the bbox gives more reasonable results.
Diffstat (limited to 'base/gxpath.c')
-rw-r--r-- | base/gxpath.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/base/gxpath.c b/base/gxpath.c index be86d62d9..0af13945b 100644 --- a/base/gxpath.c +++ b/base/gxpath.c @@ -236,6 +236,7 @@ gx_path_init_bbox_accumulator(gx_path * ppath) ppath->segments = 0; path_update_newpath(ppath); ppath->bbox_set = 0; + ppath->bbox.p.x = ppath->bbox.p.y = ppath->bbox.q.x = ppath->bbox.q.y = 0; ppath->bbox_accurate = 1; ppath->memory = NULL; /* Won't allocate anything. */ ppath->allocation = path_allocated_on_stack; |