From df4919cfc48c874ff0dba771c71112556365d82b Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Thu, 27 Jul 2023 19:53:16 +0100 Subject: [PATCH] Splitting COLRv1 content out --- skia-adventure/COLRv1.md | 73 ++++++++++++++++++++++++++++++++++++++++ skia-adventure/README.md | 61 --------------------------------- 2 files changed, 73 insertions(+), 61 deletions(-) create mode 100644 skia-adventure/COLRv1.md diff --git a/skia-adventure/COLRv1.md b/skia-adventure/COLRv1.md new file mode 100644 index 0000000..878bcdc --- /dev/null +++ b/skia-adventure/COLRv1.md @@ -0,0 +1,73 @@ +This is a patch to adds 3 other OT-SVG hooks to FreeType2-demos. There is an extension on top of it, to +add COLRv1 rendering, too. + +The COLRv1 extension currently has a limitation - it works by over-writing +the SVG rendering with a toggle key, so it depends on the font having a SVG table. In one without, it overwrites +the glyh rendering and does gray. (Hope to fix). So it is convenient that both Rsvg and Adobe SVG rendering are flawed. +[Adobe SVG Native](https://github.com/adobe/svg-native-viewer/issues/185) , and [Rsvg issue](https://gitlab.gnome.org/GNOME/librsvg/-/issues/997). + +It is a toggle-key to toggle SVG<->COLRv1 rendering ("z" for "color layered glyphs" as for COLRv0), +and overloads the palette toggle key ("C" for switching palettes for color-blind-friendiness in glyf mode) +to switch CPAL entries. Binaries at the [FontVal binary archive](https://github.com/FontVal-extras/binary-archive/) ). + +## Skia COLRv1 Rendering + +Skia COLRv1: + +![Skia COLRv1](screenshots/ftgrid-colrv1.png) + +The glyf data: + +![Glyph](screenshots/ftgrid-glyf.png) + +Skia COLRv1 to Alpha channel: + +![Skia to Alpha](screenshots/ftgrid-kAlpha.png) + +Skia COLRv1 to Gray: + +![Skia to Gray](screenshots/ftgrid-kGray.png) + +## COLRv1 Glyphs vs SVG Glyphs, both rendered via Skia + +Skia COLRv1: + +![Skia COLRv1](screenshots/ftgrid-colrv1.png) + +Skia SVG: + +![Skia COLRv1](screenshots/ftgrid-SVG.png) + +Difficult to tell the difference by the naked eye. Here is the programmatic highlights (with ImageMagick's `compare`): + +![Skia COLRv1](screenshots/ftgrid-diff.png) + +## COLRv1 palettes + +index 0: + +![palette 0](screenshots/ftgrid-palette0.png) + +index 1: + +![palette 1](screenshots/ftgrid-palette1.png) + +index 2: + +![palette 2](screenshots/ftgrid-palette2.png) + +index 3: + +![palette 3](screenshots/ftgrid-palette3.png) + +index 4: + +![palette 4](screenshots/ftgrid-palette4.png) + +index 5: + +![palette 5](screenshots/ftgrid-palette5.png) + +index 6: + +![palette 6](screenshots/ftgrid-palette6.png) diff --git a/skia-adventure/README.md b/skia-adventure/README.md index e5d43ba..9cbd67e 100644 --- a/skia-adventure/README.md +++ b/skia-adventure/README.md @@ -39,64 +39,3 @@ More screenshots about SVG Native in [the directory above](../svg-native/). Inkscape also have problems with this SVG ( https://gitlab.com/inkscape/inbox/-/issues/8857 , moved from https://gitlab.com/inkscape/inkscape/-/issues/4423 ) -## Skia COLRv1 Rendering - -Skia COLRv1: - -![Skia COLRv1](screenshots/ftgrid-colrv1.png) - -The glyf data: - -![Glyph](screenshots/ftgrid-glyf.png) - -Skia COLRv1 to Alpha channel: - -![Skia to Alpha](screenshots/ftgrid-kAlpha.png) - -Skia COLRv1 to Gray: - -![Skia to Gray](screenshots/ftgrid-kGray.png) - -## COLRv1 Glyphs vs SVG Glyphs, both rendered via Skia - -Skia COLRv1: - -![Skia COLRv1](screenshots/ftgrid-colrv1.png) - -Skia SVG: - -![Skia COLRv1](screenshots/ftgrid-SVG.png) - -Difficult to tell the difference by the naked eye. Here is the programmatic highlights (with ImageMagick's `compare`): - -![Skia COLRv1](screenshots/ftgrid-diff.png) - -## COLRv1 palettes - -index 0: - -![palette 0](screenshots/ftgrid-palette0.png) - -index 1: - -![palette 1](screenshots/ftgrid-palette1.png) - -index 2: - -![palette 2](screenshots/ftgrid-palette2.png) - -index 3: - -![palette 3](screenshots/ftgrid-palette3.png) - -index 4: - -![palette 4](screenshots/ftgrid-palette4.png) - -index 5: - -![palette 5](screenshots/ftgrid-palette5.png) - -index 6: - -![palette 6](screenshots/ftgrid-palette6.png)