This repo contains scripts used to assess various COLRv2 proposals.
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.