https://github.com/behdad/colrv2-playground
COLR templatizer ala https://github.com/googlefonts/colr-gradients-spec/issues/371
https://github.com/behdad/colrv2-playground
Last synced: 2 months ago
JSON representation
COLR templatizer ala https://github.com/googlefonts/colr-gradients-spec/issues/371
- Host: GitHub
- URL: https://github.com/behdad/colrv2-playground
- Owner: behdad
- License: other
- Created: 2023-08-03T04:09:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T00:32:09.000Z (almost 2 years ago)
- Last Synced: 2025-01-24T18:12:28.711Z (4 months ago)
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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](https://github.com/googlefonts/colr-gradients-spec/issues/371).To run this code you need a special build of fonttools with
the paint-template changes. You can get those from the
[branch](https://github.com/fonttools/fonttools/tree/colr-paint-template) or
[pull-request](https://github.com/fonttools/fonttools/pull/3242).To render the generated fonts, you need a special build of HarfBuzz,
which you can get from
[branch](https://github.com/harfbuzz/harfbuzz/tree/colr-paint-template) or
[pull-request](https://github.com/harfbuzz/harfbuzz/pull/4361).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.