Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COLRv1] Can't build font #429

Closed
RadekBledowski opened this issue Jul 17, 2023 · 2 comments · Fixed by googlefonts/picosvg#305
Closed

[COLRv1] Can't build font #429

RadekBledowski opened this issue Jul 17, 2023 · 2 comments · Fixed by googlefonts/picosvg#305

Comments

@RadekBledowski
Copy link

I'm having trouble building colrv1 font.
What i did:
cloned main
First I've made new venv
installed requirements
did size check
and ran make command
moved built fonts to fonts folder
(I've skipped colrv1_generate_configs.py since there is no such file and it worked fine like some months ago to build font without it)
started " nanoemoji *.toml " and it keeps failing on "picosvg/clipped/emoji_u1f4fc.svg" or "picosvg/clipped/emoji_u1f4f0.svg" (it's random each time)

The problem started like month ago and still can't build font and i have no idea if that is problem with dependencies
Untitled

Im on Ubuntu 22.04 LTS

@anthrotype
Copy link
Member

anthrotype commented Jul 17, 2023

See googlefonts/nanoemoji#455 && googlefonts/picosvg#304

Summary of above: this only happens with skia-pathops 0.8.0, until this gets fixed in picosvg please keep skia-pathops pinned to the previous release pip install skia-pathops==0.7.4.

thanks

@RadekBledowski
Copy link
Author

See googlefonts/nanoemoji#455 && googlefonts/picosvg#304

Summary of above: this only happens with skia-pathops 0.8.0, until this gets fixed in picosvg please keep skia-pathops pinned to the previous release pip install skia-pathops==0.7.4.

thanks

Thank you!!! This fixed the issue!

anthrotype added a commit to googlefonts/picosvg that referenced this issue Aug 4, 2023
Fixes #304
Fixes googlefonts/nanoemoji#455
Fixes googlefonts/noto-emoji#429

since skia-pathops v0.8.0, the Path.segments (SegmentPenIterator) may yield segments with an on-curve point set to None when closed contour is only comprised of quadratic beziers and all the on-curve points can be implied as in-between consecutive off-curve points (special TrueType quadratic spline), this was to match FontTools pen protocol, which the SegmentPenIterator is supposed to work with.
Picosvg was using this interface for converting from pathops.Path to SVG path.d strings, and uncaught TypeError was being raised when that happened. However, it turns out picosvg can avoid the SegmentPenIterator altogether when converting from pathops.Path to SVG, because the Path's RawPathIterator (i.e. iterating over the path itself as opposed to Path.segments) already yields (verb, points) for individual segment that matches what SVG expects (in this particular case, a move, a list of quadratic bezier segments each with one off-curve point, and a close command, no fonttools-style implied points anywhere). This way we can translate between SVG<=>pathops.Path in a more straightforward way (since they are closed to one another than to fonttools pen protocol more geared to font format specifics).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants