From b4875150933ea5682f2d92cb42620ea3ec5c9c00 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 16 Apr 2026 22:47:47 -0600 Subject: [PATCH] [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) --- util/gpu-output.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/gpu-output.hh b/util/gpu-output.hh index 85767397f..f0f08aadc 100644 --- a/util/gpu-output.hh +++ b/util/gpu-output.hh @@ -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 ();