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

components in background #449

Closed
schriftgestalt opened this issue Oct 24, 2018 · 1 comment · Fixed by #610
Closed

components in background #449

schriftgestalt opened this issue Oct 24, 2018 · 1 comment · Fixed by #610

Comments

@schriftgestalt
Copy link
Collaborator

I have a .glyphs file that has a component in the background. It points to the same glyph. So you see whatever is in the foreground. When exporting that font with fontmake, defcon is trapped in a recursion.

I hope that I have the latest version of all libs

  File "/usr/local/bin/fontmake", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/fontmake/__main__.py", line 258, in main
    project.run_from_glyphs(glyphs_path, **args)
  File "/Library/Python/2.7/site-packages/fontmake/font_project.py", line 560, in run_from_glyphs
    mti_source=mti_source)
  File "/Library/Python/2.7/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "/Library/Python/2.7/site-packages/fontmake/font_project.py", line 131, in build_master_ufos
    font, family_name=family_name, instance_dir=instance_dir)
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/__init__.py", line 104, in to_designspace
    return builder.designspace
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/builders.py", line 210, in designspace
    list(self.masters)  # Make sure that the UFOs are built
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/builders.py", line 157, in masters
    self.to_ufo_glyph(ufo_glyph, layer, glyph)
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/glyph.py", line 116, in to_ufo_glyph
    self.to_ufo_glyph_background(ufo_glyph, layer)
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/glyph.py", line 253, in to_ufo_glyph_background
    self.to_ufo_components(new_glyph, background)
  File "/Library/Python/2.7/site-packages/glyphsLib/builder/components.py", line 28, in to_ufo_components
    pen.addComponent(component.name, component.transform)
  File "/Library/Python/2.7/site-packages/defcon/pens/glyphObjectPointPen.py", line 37, in addComponent
    self._glyph.appendComponent(component)
  File "/Library/Python/2.7/site-packages/defcon/objects/glyph.py", line 708, in appendComponent
    self.insertComponent(len(self._components), component)
  File "/Library/Python/2.7/site-packages/defcon/objects/glyph.py", line 732, in insertComponent
    self.postNotification(notification="Glyph.ComponentsChanged")
  File "/Library/Python/2.7/site-packages/defcon/objects/base.py", line 223, in postNotification
    dispatcher.postNotification(notification=notification, observable=self, data=data)
  File "/Library/Python/2.7/site-packages/defcon/tools/notifications.py", line 201, in postNotification
    callback(notificationObj)
  File "/Library/Python/2.7/site-packages/defcon/objects/component.py", line 385, in baseGlyphDataChangedNotificationCallback
    self.postNotification("Component.BaseGlyphDataChanged")
  File "/Library/Python/2.7/site-packages/defcon/objects/base.py", line 223, in postNotification
    dispatcher.postNotification(notification=notification, observable=self, data=data)
  File "/Library/Python/2.7/site-packages/defcon/tools/notifications.py", line 201, in postNotification
    callback(notificationObj)
  File "/Library/Python/2.7/site-packages/defcon/objects/glyph.py", line 1299, in _componentBaseGlyphDataChanged
    self.postNotification(notification="Glyph.ComponentsChanged")
  File "/Library/Python/2.7/site-packages/defcon/objects/base.py", line 223, in postNotification
    dispatcher.postNotification(notification=notification, observable=self, data=data)
  File "/Library/Python/2.7/site-packages/defcon/tools/notifications.py", line 201, in postNotification
    callback(notificationObj)
  File "/Library/Python/2.7/site-packages/defcon/objects/component.py", line 385, in baseGlyphDataChangedNotificationCallback
    self.postNotification("Component.BaseGlyphDataChanged")
  File "/Library/Python/2.7/site-packages/defcon/objects/base.py", line 223, in postNotification
    dispatcher.postNotification(notification=notification, observable=self, data=data)
  File "/Library/Python/2.7/site-packages/defcon/tools/notifications.py", line 201, in postNotification
    callback(notificationObj)
  File "/Library/Python/2.7/site-packages/defcon/objects/glyph.py", line 1299, in _componentBaseGlyphDataChanged
    self.postNotification(notification="Glyph.ComponentsChanged")
  File "/Library/Python/2.7/site-packages/defcon/objects/base.py", line 223, in postNotification
    dispatcher.postNotification(notification=notification, observable=self, data=data)
  File "/Library/Python/2.7/site-packages/defcon/tools/notifications.py", line 201, in postNotification
    callback(notificationObj)
...

`` 
@madig
Copy link
Collaborator

madig commented Oct 24, 2018

This problem I think: #375

Might be a limitation of the UFO format or how it's interpreted. Discussion at unified-font-object/ufo-spec#49.

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