|
| 1 | +This is a patch to adds 3 other OT-SVG hooks to FreeType2-demos. There is an extension on top of it, to |
| 2 | +add COLRv1 rendering, too. |
| 3 | + |
| 4 | +The COLRv1 extension currently has a limitation - it works by over-writing |
| 5 | +the SVG rendering with a toggle key, so it depends on the font having a SVG table. In one without, it overwrites |
| 6 | +the glyh rendering and does gray. (Hope to fix). So it is convenient that both Rsvg and Adobe SVG rendering are flawed. |
| 7 | +[Adobe SVG Native](https://github.com/adobe/svg-native-viewer/issues/185) , and [Rsvg issue](https://gitlab.gnome.org/GNOME/librsvg/-/issues/997). |
| 8 | + |
| 9 | +It is a toggle-key to toggle SVG<->COLRv1 rendering ("z" for "color layered glyphs" as for COLRv0), |
| 10 | +and overloads the palette toggle key ("C" for switching palettes for color-blind-friendiness in glyf mode) |
| 11 | +to switch CPAL entries. Binaries at the [FontVal binary archive](https://github.com/FontVal-extras/binary-archive/) ). |
| 12 | + |
| 13 | +## Skia COLRv1 Rendering |
| 14 | + |
| 15 | +Skia COLRv1: |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +The glyf data: |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +Skia COLRv1 to Alpha channel: |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +Skia COLRv1 to Gray: |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## COLRv1 Glyphs vs SVG Glyphs, both rendered via Skia |
| 32 | + |
| 33 | +Skia COLRv1: |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +Skia SVG: |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +Difficult to tell the difference by the naked eye. Here is the programmatic highlights (with ImageMagick's `compare`): |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +## COLRv1 palettes |
| 46 | + |
| 47 | +index 0: |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +index 1: |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +index 2: |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +index 3: |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +index 4: |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +index 5: |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +index 6: |
| 72 | + |
| 73 | + |
0 commit comments