Skip to content

Commit 7ab92cd

Browse files
committed
Add COLRv1 color font rendering support
Adds a ColorRenderer that renders COLR v0/v1 glyphs via skrifa's ColorPainter trait and tiny-skia as the 2D backend. Each glyph is rendered once and cached as an RGBA tile; subsequent uses composite the cached tile. The existing outline renderer is unchanged and used for non-color fonts via an if/else dispatch in diff_many_words.
1 parent 384326b commit 7ab92cd

5 files changed

Lines changed: 934 additions & 173 deletions

File tree

Cargo.lock

Lines changed: 53 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

diffenator3-lib/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ unicode_names2 = "0.6.0"
3939
brotli = "6.0.0"
4040
lazy_static = "1.4.0"
4141
zeno = "0.3.1"
42+
tiny-skia = "0.12"
4243
log = "0.4"
4344

4445
static-lang-word-lists = { version = "0.3.0", features = ["rayon"] }

0 commit comments

Comments
 (0)