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.
This commit is contained in:
Henry (Yu) Song 2012-03-13 16:35:21 +00:00 committed by Chris Wilson
parent 91113a9e45
commit efb2018309

View file

@ -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 &&