Implement support for all color font formats. 1.5.x
Rendering of test file with test fonts:
Requires recent Harfbuzz and Cairo as well as the harfbuzz-cairo library.
Note: Cairo does not support rendering of SVG-in-Opentype fonts, we still need to render them ourselves.
COLOR_FONT_DEBUG environment variable: If defined, enables lots of debugging output.
DRAW_TEXT_BOXES environment variable: If defined, draw various bounding boxes for glyphs.
Future improvements, not in this merge request:
- COLRv0, COLRv1, CBDT fonts will use the
fillcolor as the foreground color (used where the original source SVG font definesfillascurrentColor. Our method for rendering SVG glyphs needs to be changed to support this feature for SVG fonts. - harfbuzz-cairo and CSS allows one to select between predefined (defined in the font, itself) palettes or to explicitly set each color in a custom palette (via the
font-paletteproperty and the@font-palette-valuesat-rule). Palettes are defined in theCPALtable which is supported by SVG, COLRv0, and COLRv1 fonts. Unfortunately, the CSS to do this relies on CSS variables which are not supported in libcroco.
Rendering fails when changing zoom rapidly. ** Seems to be upstream Cairo bug, can't replicate with latest Cairo from git. **
Replaces !6938 (closed) (Changes are too radical for 1.4.x)
Edited by Tavmjong Bah
