Git Product home page Git Product logo

Comments (5)

behdad avatar behdad commented on August 26, 2024

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.

adrientetar avatar adrientetar commented on August 26, 2024

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.

graphicore avatar graphicore commented on August 26, 2024

@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.

jamesgk avatar jamesgk commented on August 26, 2024

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.

typoman avatar typoman commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.