[paint-extents] Better handle empty glyphs
This commit is contained in:
parent
885dbcfba0
commit
f9c2e30e01
|
@ -121,7 +121,7 @@ typedef struct hb_bounds_t
|
||||||
|
|
||||||
hb_bounds_t (status_t status) : status (status) {}
|
hb_bounds_t (status_t status) : status (status) {}
|
||||||
hb_bounds_t (const hb_extents_t &extents) :
|
hb_bounds_t (const hb_extents_t &extents) :
|
||||||
status (BOUNDED), extents (extents) {}
|
status (extents.xmin <= extents.xmax ? BOUNDED : EMPTY), extents (extents) {}
|
||||||
|
|
||||||
status_t status;
|
status_t status;
|
||||||
hb_extents_t extents = {0, 0, 0, 0};
|
hb_extents_t extents = {0, 0, 0, 0};
|
||||||
|
@ -376,8 +376,7 @@ hb_paint_extents_push_clip_glyph (hb_paint_funcs_t *funcs HB_UNUSED,
|
||||||
hb_draw_funcs_t *draw_extent_funcs = hb_draw_extent_get_funcs ();
|
hb_draw_funcs_t *draw_extent_funcs = hb_draw_extent_get_funcs ();
|
||||||
hb_font_draw_glyph (font, glyph, draw_extent_funcs, &extents);
|
hb_font_draw_glyph (font, glyph, draw_extent_funcs, &extents);
|
||||||
hb_draw_funcs_destroy (draw_extent_funcs);
|
hb_draw_funcs_destroy (draw_extent_funcs);
|
||||||
if (extents.xmin < extents.xmax)
|
c->push_clip (extents);
|
||||||
c->push_clip (extents);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue