I’m working on a devanagari font. For proofing purposes I would like to generate the entire font from a custom list filter and fill all of the undesigned glyphs with .notdef. Is there a way to paste the same glyph into all selected glyphs? If not, does anybody have a script for adding a component to all selected glyphs?
Will a simple rectangle do too?
There is a script called Fill up with rectangles in my repository.
A rectangle will do fine. Thanks!
You could also use LayerGeek with addComponent_(GSComponent(".notdef"))
But I found this solution to be unstable in Glyphs2. No problems in 1.4.4.
Fill up with rectangles doesn’t work for me.
In 1.4.4 I get the following error:
Start
Traceback (most recent call last):
File “Fill Up with Rectangles.py”, line 54, in
File “Fill Up with Rectangles.py”, line 36, in process
File “/Users/jamespuckett/Library/Application Support/Glyphs/Scripts/GlyphsApp.py”, line 22, in len
return len(self.values())
TypeError: object of type ‘NoneType’ has no len()
End
In 2 I get:
Start
Filling A: not empty, skipped.
End
Any suggestions?
As for the 1.4.4 error, please delete this file: /Users/jamespuckett/Library/Application Support/Glyphs/Scripts/GlyphsApp.py"
I have a suspicion that it may have something to do with the order of the glyphs in the list filter, and whether the newly generated glyphs are at the beginning, at the end, or interrupted by previously generated glyphs. But I could not confirm this yet.
what happens if you run this script in the macro panel after you generated the glyphs:
for l in Font.selectedLayers:
print l.parent.name