Colored Fonts

140 views
Skip to first unread message

Matthew Leibowitz

unread,
Jan 17, 2019, 3:13:11 PM1/17/19
to skia-discuss
Hey folks, I just wanted to check if skia supports colored typefaces?

It appears that Gilbert font ( https://www.typewithpride.com ) draws gray, but it has color.
Some other color fonts: https://www.colorfonts.wtf/

bungeman

unread,
Jan 17, 2019, 3:22:59 PM1/17/19
to skia-discuss
We don't currently support SVG fonts (OpenType or not). On some platforms they kinda sorta seem to draw something sometimes, but mostly by accident and not by plan. We do support sbix and CBDT, and mostly support COLR (at the moment the #FFFF color is generally gray instead of the paint color).

Muzaffar Dar

unread,
Mar 20, 2023, 8:53:08 AM3/20/23
to skia-discuss
Hello,

Can someone please let us know if skia supports SVG fonts now? if yes from which version?

Thanks,
Muzaffar

bungeman

unread,
Mar 20, 2023, 10:28:29 AM3/20/23
to skia-discuss
Skia has some support for OT-SVG since


Note that this requires setting SkGraphics::SetOpenTypeSVGDecoderFactory with a handler for decoding the SVG. The SkSVGOpenTypeSVGDecoder is provided as an example (used in tests). There also exists https://skia-review.googlesource.com/c/skia/+/532260 for bindings to Adobe's SVGNative, though at the time there were issues with its handling of some matrices and support for some gradients. Note that not all ports support gzip'ed svgDocs (really only the FreeType port does). Palette support may also be a bit spotty (I don't believe it is currently implemented for the CoreText port).
Reply all
Reply to author
Forward
0 new messages