robofab.pens.filterPen

RoboFont Forums Bugs robofab.pens.filterPen

This topic contains 1 reply, has 2 voices, and was last updated by  frederik 8 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4211

    joanca
    Participant

    This is not working, gives a traceback and the glyph flies away.
    Any clue to make it work?

    Thanks, –jca

     #### code ####
    from robofab.pens.filterPen import thresholdGlyph
    
    d = 10
    thresholdGlyph(CurrentGlyph(), d)
    
    CurrentGlyph().update()
    
    ##############
    

    Traceback:
    ...
    File "/Users/joanca/type apps/RoboFont.app/Contents/Resources/lib/python2.7/robofab/pens/filterPen.py", line 68, in thresholdGlyph
    File "lib/fontObjects/robofabWrapper.pyc", line 2303, in appendGlyph
    AttributeError: 'dict' object has no attribute 'disableNotifications'

    #4215

    frederik
    Keymaster

    that is a bug, and already solved in the beta, will be in the next release

    a workaround:

    from robofab.pens.filterPen import ThresholdPen
    
    tempGlyph = RGlyph()
    glyph = CurrentGlyph()
    
    pen = ThresholdPen(tempGlyph.getPen(), threshold=10)
    
    glyph.draw(pen)
    
    glyph.clear()
    
    glyph.appendGlyph(tempGlyph)
    print "done"
    

    good luck

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.