Support OT-SVG with CSS var(--color0, ...) and color palettes from CPAL table
See original GitHub issueIn addition to the inlined SVG colors (constant names “yellow” or hex #ABCDEF) which we do support, and the special currentColor
keyword, which we don’t yet (cf. #405), OT-SVG table also allows to define color variables (via CSS var()
function) that reference color palettes defined in the CPAL table, thus allowing to change the colors by selecting among multiple color palettes (e.g. light vs dark, etc.).
We need to support this both ways: 1) in maximum_color when converting OT-SVG => COLR, and 2) when converting a COLR font with multiple CPAL palettes to OT-SVG (#421).
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SVG - Scalable vector graphics table (OpenType 1.8.4)
Within an SVG document in the SVG table, colors in a CPAL palette are referenced as implementation-defined CSS variables (custom properties) ...
Read more >Rocher Color: making a variable color font | Fonts made in Brazil
Before going all in on SVG, I remember having a good feeling about COLR/CPAL fonts. These fonts work pretty much like your regular...
Read more >Process currentColor properly in colr_to_svg.py #405 - GitHub
400 (review) identifies that black isn't always the current color. Fix it! ... Support OT-SVG with CSS var(--color0, ...) and color palettes from...
Read more >Multi-Colored SVG Symbol Icons with CSS Variables | frontstuff
Yet, there's one thing that remains absolutely impossible with icon fonts: multicolor support. Only SVG can do this. TL;DR: this post goes in- ......
Read more >FW: [mpeg-OTspec] COLR, SVG tables: sharing color palettes
We're awaiting agreement from Microsoft on how exactly the CPAL should ... e.g. name IDs for color palette entries (in the current SVG...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please try the Ventura / iOS 16 betas.
AWESOME! Thanks again @litherum 😃 I will consider myself in your debt by a beer [or your preferred beverage] or two 😄