From dbea503a38878d8cab0d2106d5b7e44d6550ff5b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 23 Dec 2022 17:28:46 -0700 Subject: [PATCH] [colr] Return true extents --- src/hb-ot-color-colr-table.hh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index c9d1f563c..6f1b23d30 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -1998,22 +1998,18 @@ struct COLR return true; } -#if 0 - /* This currently goes into infinite recursion. */ - auto *extents_funcs = hb_paint_extents_get_funcs (); hb_paint_extents_context_t extents_data; paint_glyph (font, glyph, extents_funcs, &extents_data, 0, HB_COLOR(0,0,0,0)); - extents_data.groups.tail().extents.xmin, - extents_data.groups.tail().extents.ymin, - extents_data.groups.tail().extents.xmax, - extents_data.groups.tail().extents.ymax; + extents->x_bearing = extents_data.groups.tail().extents.xmin; + extents->y_bearing = extents_data.groups.tail().extents.ymax; + extents->width = extents_data.groups.tail().extents.xmax - extents_data.groups.tail().extents.xmin, + extents->height = extents_data.groups.tail().extents.ymin - extents_data.groups.tail().extents.ymax; hb_paint_funcs_destroy (extents_funcs); -#endif - return false; + return true; } bool