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

Improve "no default source" error #677

Merged
merged 4 commits into from
Mar 17, 2023
Merged

Conversation

simoncozens
Copy link
Contributor

Currently when I have designspace or axis mapping issues, fontmake dies like this:

fontmake: Error: In 'sources/sources-glyphs/Literata-Upright.glyphs' -> 'master_ufo/Literata.designspace':
Generating fonts from Designspace failed: No default source

This is normally followed by swearing and grovelling through .designspace XML files, which is not a pleasant experience. With this PR, fontmake dies like this:

fontmake: Error: In 'sources/sources-glyphs/Literata-Upright.glyphs' -> 'master_ufo/Literata.designspace':
Generating fonts from Designspace failed: No default source; expected default master at Weight=631.111,
Optical size=10. Found master locations:
Literata 12 pt Regular at Weight=400, Optical size=10
Literata 7pt Regular at Weight=400, Optical size=6
Literata 72pt Regular at Weight=400, Optical size=144
Literata M3 at Weight=200, Optical size=10
Literata M4 at Weight=900, Optical size=10
Literata 72pt ExtraLight at Weight=200, Optical size=144
Literata 72pt Black at Weight=900, Optical size=144
Literata M7 at Weight=900, Optical size=6

Which at least tells me immediately that there's something gone wrong with the weight axis map, and saves me looking up all the source locations.

Verified

This commit was signed with the committer’s verified signature.
Byron Sebastian Thiel
@simoncozens simoncozens requested a review from anthrotype March 9, 2023 09:59
@anthrotype
Copy link
Member

can you fix the merge conflicts?

Copy link
Member

@anthrotype anthrotype left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if we can add a small test would be even nicer

@simoncozens
Copy link
Contributor Author

I know a test would be nice but this really is just improving a warning so I'm going to merge it.

@simoncozens simoncozens merged commit 1ce2986 into main Mar 17, 2023
@anthrotype anthrotype deleted the no-default-source-error branch March 17, 2023 11:12
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 this pull request may close these issues.

None yet

2 participants