/colrv2-playground

COLR templatizer ala https://github.com/googlefonts/colr-gradients-spec/issues/371

Primary LanguagePythonOtherNOASSERTION

COLRv2 Playground

This repo contains scripts used to assess various COLRv2 proposals.

Proposed COLRv2 templatizer

This is in regards to the proposed COLRv2 paint-templates, as sketched here.

To run this code you need a special build of fonttools with the paint-template changes. You can get those from the branch or pull-request.

To render the generated fonts, you need a special build of HarfBuzz, which you can get from branch or pull-request.

The code loads a COLRv1 font (hardcoded as "NotoColorEmoji-Regular.ttf"), and tries to detect paint graphs that can use templatization, and proceeds to produce "NotoColorEmoji-Regular-templatized.ttf" with such templates. It reports COLR-table size savings.