diff options
author | Henry (Yu) Song <hsong@sisa.samsung.com> | 2012-03-13 16:35:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-13 18:57:47 +0000 |
commit | efb2018309aa7ad81b6a71dfa322fb871d94c36d (patch) | |
tree | 97d9ac6da8e36abec3bba60e9bb0f951d70e228b /src/cairo-scaled-font.c | |
parent | 91113a9e4583fac275cc0fa01fc957abd9b7dc0e (diff) | |
download | cairo-efb2018309aa7ad81b6a71dfa322fb871d94c36d.tar.gz |
scaled-font: Ignore empty glyphs when checking for potential overlap
A zero-sized box contains no pixels and so cannot overlap, but it does
still need to contribute to the extents.
Diffstat (limited to 'src/cairo-scaled-font.c')
-rw-r--r-- | src/cairo-scaled-font.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 062e89536..b1c4b87ec 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -2102,6 +2102,9 @@ _range_contains_glyph (const cairo_box_t *extents, cairo_fixed_t right, cairo_fixed_t bottom) { + if (left == right || top == bottom) + return FALSE; + return right > extents->p1.x && left < extents->p2.x && bottom > extents->p1.y && |