__iter__ please


font = Glyphs.font

for glyph in font:

gets into an infinite loop, either provide iter method to loop over glyphs or make it not loop infinitely

Please iterate over the appropriate property:

for glyph in font.glyphs:

Yes, I know that. But this is something that can happen to more people who are not that familiar with Glyphs but rather RoboFont or more specifically FontParts, Defcon and probably other stuff too. It’s probably a good convention to make objects iterable.

Nevertheless, the infinite loop is there and there is high risk of people entering it.

I’ll have a look at the loop. Thanks for reporting it.

Hi Georg,

can you implement other important dunder methods to the python api, please?

glyph_name in font vs font.doesContain_(glyph_name)


print("A" in Font.glyphs)

Works already. Again, I don’t like to add that pseudo iterator.