From 6079173a5229b8f51a0ee15f4e4ea957f1e2e722 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 17 Dec 2022 01:04:35 -0500 Subject: [PATCH] Try paint_glyph for more tables If the COLR table does not paint the glyph, try SVG, CBDT and sbix too, before giving up on color. --- src/hb-ot-font.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index bbb9a5953..055462f4d 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -46,6 +46,7 @@ #include "hb-ot-color-cbdt-table.hh" #include "hb-ot-color-sbix-table.hh" #include "hb-ot-color-colr-table.hh" +#include "hb-ot-color-svg-table.hh" /** @@ -449,6 +450,11 @@ hb_ot_get_glyph_paint (hb_font_t *font, { #ifndef HB_NO_COLOR if (font->face->table.COLR->paint_glyph (font, glyph, paint_funcs, paint_data)) return; + if (font->face->table.SVG->paint_glyph (font, glyph, paint_funcs, paint_data)) return; +#ifndef HB_NO_OT_FONT_BITMAP + if (font->face->table.CBDT->paint_glyph (font, glyph, paint_funcs, paint_data)) return; + if (font->face->table.sbix->paint_glyph (font, glyph, paint_funcs, paint_data)) return; +#endif #endif if (font->face->table.glyf->paint_glyph (font, glyph, paint_funcs, paint_data)) return; #ifndef HB_NO_CFF