googlefonts / googlefonts/fontc
Support COLR compilation from UFO/.designspace sources
- Dominant language
- Rust
- Stars
- 193
- Forks
- 21
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 65
Description
fontc silently skips COLR/CPAL table generation for UFO/.designspace sources. The plumbing is in place: `ufo2fontir` implements the `Source` trait's `create_color_glyphs_work()` method, but the resulting `PaintGraphWork::exec()` is a stub that writes nothing to the context
https://github.com/googlefonts/fontc/blob/393b797545f5841899d8bb9cd4b0f0f48257c882/ufo2fontir/src/source.rs#L1877
The backend COLR compiler (fontbe/src/colr.rs) then finds no paint graph data and silently returns.
The Glyphs.app frontend has a working implementation, so the backend compilation logic (COLR layers, CPAL palettes) already exists, the gap is just in extracting color layer data from UFO sources.
We should parse color layer data from UFO sources and populate the IR paint graph. At the very least, until we do that, we could emit a user-visible warning when color layer data is present in the source but cannot be compiled.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at ufo2fontir/src/source.rs around the linked create_color_glyphs_work() implementation and inspect the stubbed PaintGraphWork::exec(). Compare the working Glyphs.app frontend and the backend in fontbe/src/colr.rs to understand the expected paint graph and palette data. Done means UFO color layers populate the IR and compile to COLR/CPAL tables, or unsupported data produces a user-visible warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100