Skip to content

dokutan/OpenType-COLRv1-to-SVG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

OpenType-COLRv1-to-SVG

Convert OpenType COLR or COLRv1 fonts to SVG

Converting the font

0. Install dependencies and obtain a font

pip install opentypesvg blackrenderer

Obtain a COLR(v1) font from e.g. https://fonts.google.com/?coloronly=true.

1. create monochrome svgs for all glyphs

Use fonts2svg to obtain a list of glyphs.

mkdir glyphs
fonts2svg -o glyphs font.ttf

2. replace the monochrome svgs

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

3. add the color svgs to the font

addsvg glyphs/ font.ttf

Using the font

LuaLaTeX

Requires inkscape and running lualatex with the -shell-escape option.

\fontspec{font.ttf}[RawFeature={+svg}]

Releases

No releases published

Packages

No packages published

Languages