googlefonts / googlefonts/fontmake

Somewhat vague error message when a corner component blocks variable font build `Generating fonts from Designspace failed: 'origin'`

Open
#1,160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

I’ve just experienced some confusion in a build, and I wanted to document it in case others come across this.

### What happened

I was trying to build from a relatively simple Glyphs document to a variable font.

Here’s the log:

```
▶ fontmake -o variable -g Familyname/sources/glyphs/Familyname.glyphs
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib.parser:Parsing .glyphs file
INFO:glyphsLib.builder:Running 'align_alternate_layers' transformation
INFO:glyphsLib.builder:Running 'propagate_all_anchors' transformation
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern1.dcaron found in kerning rules.
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern2.punctuation found in kerning rules.
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern1.dcaron found in kerning rules.
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern2.punctuation found in kerning rules.
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern1.dcaron found in kerning rules.
WARNING:glyphsLib.builder.builders.UFOBuilder:Non-existent glyph class public.kern2.punctuation found in kerning rules.
INFO:fontmake.font_project:Loading 3 DesignSpace source UFOs
INFO:fontmake.font_project:Building variable fonts variable_ttf/Familyname-VF.ttf
INFO:ufo2ft:Features are compatible across masters; building later
INFO:ufo2ft:Pre-processing glyphs
INFO:ufo2ft.filters:Running interpolatable SkipExportGlyphsIFilter
INFO:ufo2ft.filters:Running CornerComponentsFilter on Familyname-Extralight
fontmake: Error: In 'Familyname/sources/glyphs/Familyname.glyphs' -> 'master_ufo/Familyname.designspace': Generating fonts from Designspace failed: 'origin'
```

After checking all the font info a few times, I eventually realized it was failing on the CornerComponentsFilter step. So, I made a Glyphs filter to find glyphs where "Has Corners" is true.

Image

This showed me that one glyph had a corner component, even though this was seemingly empty. Once I removed that in all layers, the fontmake build worked without issue.

### Conclusion

Potentially, FontMake could give a more obvious error message here, like `Generating fonts from Designspace failed: a corner component cannot be resolved in glyph /z`. I’m not sure how feasible this is, though.

I’m also okay if this issue is closed, and just wanted it here for future searches by others or by myself. :)

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with the CornerComponentsFilter step shown in the build log and reproduce the failure using the reported Glyphs source. Inspect how the unresolved corner component produces the 'origin' error, then make the failure identify the affected glyph and run the same variable-font build to verify the clearer message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.