Re: [csswg-drafts] [css-fonts-4] Color fonts are not enabled by default (#7093)

We generally prioritise color tables (`COLR` (v0 and v1), `SBIX`, `CBDT/CBLC`) over contour tables (`glyf`, `CFF2`) when present. Thus, if COLR is present and valid, we do not "render it as close as possible to a non-color font" even if it would have `glyf` glyphs for the same glyph ids. We do use the default palette at index 0 as well, same as WebKit.

I think in fact I find the whole paragraph a bit odd. Not sure what its origins are. I haven't seen any implementation synthesising a custom palette for the default rendering.

> User-Agents attempt to treat the [color](https://drafts.csswg.org/css-color-4/#propdef-color) font as closely as possible to a non-color font. In particular, user-agents use a palette which will yield the best default result for reading. User-agents may take the computed value of the color property into consideration when making this decision. User agents may also construct and use a palette not defined in the font."

I am in favour of just adjusting the description for `normal` with something like:

User-Agents display the color font with the default palette or default glyph colorisation. User-agents should/must (WDYT?) take the computed value of the color property into consideration when a color font format requires use of the foreground color (for example: color index 0xFFFF in COLR). 

Then add a note: "For COLR/CPAL this usually means rendering the font with the palette at index 0."

Regarding:

>  User agents may also construct and use a palette not defined in the font.

Yes, that's what we do when a `@font-palette-values` provide custom palette overrides, but I don't think this sentence needs to be in the spec text for `normal`.







-- 
GitHub Notification of comment by drott
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7093#issuecomment-1055779735 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 1 March 2022 19:24:30 UTC