Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to customize build of CPAL palettes #433

Open
anthrotype opened this issue Sep 14, 2022 · 0 comments
Open

allow to customize build of CPAL palettes #433

anthrotype opened this issue Sep 14, 2022 · 0 comments

Comments

@anthrotype
Copy link
Member

Currently, nanoemoji allows to build a COLR font with a single-palette CPAL table, which is populated from the input SVGs inlined color fills. There's no way to configure the build with additional palettes. If one wishes to add those, one can only patch the font after build (using some fonttools python script or hacking ttx file).

If a color font has such multi-palettes CPAL setup already (which was added by other means), and we then run maximum_color tool on it to generatea the missing color tables, then the multiple palettes are retained as expected (and will work with OT-SVG after #431).

It would be nice to be able to go from a set of input .svg files (in which color fills are specified using the CSS color variable notation var(--color0, red)) plus an appropriately enhanced config.toml containing a list of additional color palettes, maybe associated with optional settings like light/dark mode and other CPAL flags, and obtain a COLR font with the desired final CPAL table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant