googlefonts / googlefonts/picosvg
idea: merge consecutive paths with same fill?
- Dominant language
- Python
- Stars
- 220
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
while looking at some waved flags in noto-emoji, I noticed one where there are dozen (perhaps hundreds, I didn't count -- the svg is probably autotraced which may expain the big numbers) of consecutive paths that have the same fill.
Since in nanoemoji we convert each `` elements to a glyph (to be used as a filled path in COLR PaintGlyph), and the total number of glyphIDs in a font is 65,636, we want to reduce the overall number of layers that each color glyph uses.
What if picosvg makes a single `` out of two or more ``s that have the same fill?
We could use skia-pathops to make a union of the paths..
Contributor guide
Research direction
Start by tracing how picosvg handles consecutive elements and how skia-pathops could union them. Check the resulting layer or glyph counts in a nanoemoji build using the Noto Emoji example. Done means same-fill paths are combined while preserving the SVG rendering and reducing color-glyph layers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100