def filter(name):
for filter in Glyphs.filters:
if filter.__class__.__name__ == name:
return filter
offsetCurveFilter = filter('GlyphsFilterOffsetCurve')
mylayer = Glyphs.font.glyphs["X011"].layers[0]
offsetCurveFilter.filter(mylayer, False, {"OffsetCurve;15;10;0;0.5;"})
This script report the AttributeError: ‘GSMenu’ object has no attribute ‘filterInstances’
Please help check the reason.
My Glyphs version is 2.6.5(1325)
Thanks.
After I updated to version 1329, but now report another error as below:
AttributeError: ‘GlyphsFilterOffsetCurve’ object has no attribute ‘filter’
Thanks.
please help. this is very important for me.
i want an iterate-able method to apply filters to a glyph list via script(not for use in app, but as a part of build script via python api), so if there is any other solution, please let me know.
how about the other filters? it seems there is no access to them like that. i tried GlyphsFilterHatchOutline (the same naming structure)and Glyphs raise this error: