Convert OpenType COLR or COLRv1 fonts to SVG
pip install opentypesvg blackrenderer
Obtain a COLR(v1) font from e.g. https://fonts.google.com/?categoryFilters=Technology:%2FTechnology%2FColor.
Use fonts2svg to obtain a list of glyphs.
mkdir glyphs
fonts2svg -o glyphs font.ttf
Use blackrenderer to replace the monochrome svgs with color svgs. Edit glyph-to-svg.py
to set the font options.
python glyphs-to-svg.py
addsvg glyphs/ font.ttf
Requires inkscape
and running lualatex
with the -shell-escape
option.
\fontspec{font.ttf}[RawFeature={+svg}]