Comments (5)
That sounds like a major font bug to me, that we should not hide IMO. I'm
fine if we add an option to "fix-up" issues, but default crash sounds right.
On Tue, Feb 16, 2016 at 6:33 PM, Sascha Brawer [email protected]
wrote:
When fontmake builds from UFO, what should happen when a glyph refers to
an undefined component? Apparently, other build chains are silently
skipping over the problem; see metapolator/Breite#1
metapolator/Breite#1. Instead of crashing,
should fontmake perhaps emit a warning and proceed building? Although,
nobody looks at warnings, so maybe crashing is fine.—
Reply to this email directly or view it on GitHub
#16.
behdad
http://behdad.org/
from fontmake.
There should be a warning, at least.
FWIW, ufoLib keeps the missing component and most pens out there just skip missing component (consequently it's not displayed in TruFont for instance). I'm not saying that's optimal behavior but that's how things are currently.
from fontmake.
@adrientetar Yeah, that was my point in the other issue thread. I think the BasePen of fonttools is the reason/root for this behavior. https://github.com/behdad/fonttools/blob/master/Lib/fontTools/pens/basePen.py#L197 because it is the reference for the segment pen protocol.
from fontmake.
I personally am in favor of crashing in this case. Feel free to comment/re-open if anyone disagrees and wants to continue the discussion.
from fontmake.
I strongly recommend that fontmake should stop building the font and output a Error instead of crashing. Look at the following traceback. It's not easy to dissect that a component is missing. So the user would not know what should be fixed in the UFO.
Traceback (most recent call last):
File "/usr/local/bin/fontmake", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/fontmake/__main__.py", line 199, in main
ufo_paths, is_instance=args.pop('masters_as_instances'), **args)
File "/usr/local/lib/python2.7/site-packages/fontmake/font_project.py", line 476, in run_from_ufos
ufos, remove_overlaps, **kwargs)
File "/usr/local/lib/python2.7/site-packages/fontmake/font_project.py", line 166, in build_otfs
self.decompose_glyphs(ufos)
File "/usr/local/lib/python2.7/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
return func(*args, **kwds)
File "/usr/local/lib/python2.7/site-packages/fontmake/font_project.py", line 124, in decompose_glyphs
self._deep_copy_contours(ufo, glyph, glyph, Transform())
File "/usr/local/lib/python2.7/site-packages/fontmake/font_project.py", line 132, in _deep_copy_contours
ufo, parent, ufo[nested.baseGlyph],
File "/usr/local/lib/python2.7/site-packages/defcon/objects/font.py", line 219, in __getitem__
return self._glyphSet[name]
File "/usr/local/lib/python2.7/site-packages/defcon/objects/layer.py", line 261, in __getitem__
self.loadGlyph(name)
File "/usr/local/lib/python2.7/site-packages/defcon/objects/layer.py", line 178, in loadGlyph
raise KeyError("%s not in layer" % name)
KeyError: 'commaAr not in layer'
from fontmake.
Related Issues (20)
- UX improvement: Missing axis should fail to build unless override with arg HOT 2
- Couldn't merge the fonts, because one of the values in a list was empty when it shouldn't have been. ... GPOS.table.LookupList.Lookup[0][0][1].EntryAnchor HOT 3
- How to turn off default filters? HOT 12
- ufo_structure is sometimes undefined and set to None
- The `.color` alternate glyphs from color layers should not remain in the font HOT 2
- Loading Glyphs file failed: 'str' object has no attribute 'read' HOT 5
- Instance location improperly determined HOT 1
- Couldn't merge the fonts, inconsistent GDEF.table.MarkGlyphSetsDef HOT 1
- error in VF generate from glyphs source HOT 1
- --master-dir '{tmp}' while interpolating HOT 5
- Variation alternates not processed for statics HOT 11
- reversed outlines when building fonts from quadratic curves HOT 13
- Failure to find default source on DS v5 that is really a v4 HOT 1
- Is it possible to interpolate static/variable fonts from a GlyphsApp source with incompatible Roman & Italic masters? HOT 1
- Fail when building variable font: maximum recursion depth exceeded HOT 9
- Missing X-height causes unclear crash while compiling UFO HOT 2
- "Generating fonts from Designspace failed: list index out of range" HOT 2
- Some instances not being processed HOT 6
- Non-integer axis mapping: Error: Base master not found
- Does the `-i` / `--interpolate` flag produce nothing if a font has only a single master and instance? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontmake.