Support for chromatic fonts
Flutter supports rendering chromatic icons.
However, when I use fontify on a set of .svg files in which some of them have colors, the resulting .otf has a single and monochromatic shape.
For example, for this SVG:
The result glyph is:
![]()
Is there a way to preserve SVG colors when generating an .otf with fontify?
As I was giving a look, it seems fontify does not works with SVG table, and I think this is the reason my SVGs colors disappear. Is that right?
Ok, so I made some tests and it seems that even if I put an SVG Table in the font generated by fontify with the desired SVG, Flutter will render it like described in the issue, which makes me think that Flutter doesn't support SVG tables at all.
(I patched SVGs into the generated font with opentype-svg)
I also tested COLR/CPAL fonts and they also didn't work properly (although they at least kept the shape as expected, but using the IconTheme color).
The only font that I tested and properly displayed colored glyphs was Noto Sans Emoji, which is, apparently, a CBDT font. This is disappointing, as bitmaps doesn't scale well...
Anyway, if we want to proceed with this idea, we will have to process the given SVG into a CBDT font.
This repository seems to have been abandoned. Thus, I am closing this.
Related: https://github.com/flutter/flutter/issues/79365