justvanrossum/nabla

Font-palette not supported by Firefox?

Christine-Gertsch opened this issue · 9 comments

According to https://caniuse.com/?search=font-palette, font-palettes should be supported by all current browser versions. Still, Firefox doesn’t display Nabla’s palettes reliably (?). Further tests with other color fonts worked fine, so I wonder whether this is a browser problem or a font issue.

Perhaps Firefox prefers the SVG table over COLRv1? If I view https://nabla.typearture.com/ on Firefox it seems the variation axes also don't work.

in theory custom palettes should work because SVG table uses color variables referencing the CPAL table e.g. things like stop-color="var(--color8, #FFFABE)"

Do we know whether:

  • Firefox indeed prefers SVG over COLRv1?
  • Firefox supports CPAL for SVG?

Do we know whether:
Firefox indeed prefers SVG over COLRv1?
Firefox supports CPAL for SVG?

Maybe Jonathan knows @jfkthame

apparently my previous self seemed to know, googlefonts/nanoemoji#422 (comment)

We already know that FireFox does not support font-palette and @font-palette-values yet: https://bugzilla.mozilla.org/show_bug.cgi?id=1461588.

that linked issue above was marked as completed 1 year ago.. I'm not sure why then it is still not working

Do we know whether:

* Firefox indeed prefers SVG over COLRv1?

Yes, I think that's currently the case (though probably should be reconsidered)...

* Firefox supports CPAL for SVG?

No, CPAL is only supported for COLR fonts.

So I think this explains what you're seeing.

If you set gfx.font_rendering.opentype_svg.enabled to false in about:config, then you should see the COLRv1 glyphs being used.

So after all it is a browser issue, not a font issue.

yes, that’s it. Thanks!