[util/gpu] Fix color auto-detect for COLRv0 fonts

The GPU util's auto-detect only checked hb_ot_color_has_paint
(COLRv1).  COLRv0 fonts like BungeeTint have layers but no
paint tree, so they were incorrectly routed to the mono draw
path.

Add hb_ot_color_has_layers and hb_ot_color_has_png to the
check, matching the raster and vector utils.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad Esfahbod committed 2026-04-16 22:48:01 -06:00
1 parent 8793feb5cb
commit b487515093
1 file changed
+2 -1
+2 -1
View File
@@ -153,7 +153,8 @@ struct gpu_output_t
* is a user error; prefer paint. */
draw_only = view.force_paint ? false
: view.force_draw ? true
: !hb_ot_color_has_paint (face);
: !(hb_ot_color_has_paint (face) ||
hb_ot_color_has_layers (face));
if (use_metal)
init_metal ();