-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COLR/CPAL color glyph rendering (#695)
* fix incorrect colorRecordIndices in CPAL test data * Implement drawing of COLR/CPAL layers * font inspector: display CPAL data and palettes * glyph inspector: implement drawing of CPAL/COLR glyphs * docs demo page: fix typo causing JS error and not updating X/Y values next to range sliders * docs demo page: implement drawing and snapping of COLR/CPAL glyphs * font inspector: add update button * font inspector: fix old font information not being overwritten if not present in newly loaded font * docs: styling for color palettes * update example code * WIP: update documentation in README * add rgba() and hsla() parsing and tests * add test for hsl() turn unit parsing, less strict regex * fix: don't draw the BaseGlyph itself, completele replace it with the color glyph * ignore colr table if no cpal table is present * log warnings on SVG output of color glyphs, add @todo comments * fix: make sure defaultRenderOptions are actually used where needed * fix wrong defaultRenderOptions * Glyph Inspector: implement palette preview and selection, options.drawLayers checkbox * add palettes.js tests * use 'hexa' as the default color format * update test to account for 'hexa' as the default color value * implement setColor() and add tests * implement palettes.delete() * implement css color name parsing * test css color name parsing * initialize fullPath.layers, pass font to glyph.drawPoints() * move layers to glyph, except for generated paths * path drawing optimizations * implement LayerManager, show layers in glyph inspector * allow parsing of COLRv1/CPALv1 fonts, as they may provide color glyphs in v0 format * test CPAL baseGlyphs order in Font.validate() * have Font.validate() return the warnings array and log console warnings (fixes #607) * implement Font.palettes.deleteColor() * glyph inspector improvements regarding palette colors * rename Path.layers to Path._layers so it's not confused with the Glyph.layers property's LayerManager * WIP: README update, PaletteManager fixes and tests * finish palette tests * layer tests and fixes * handle CHARARRAY null value * update README for Font.layers * add basic palette and color handling to glyph inspector
- Loading branch information
Showing
26 changed files
with
2,069 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.