justinpenner / TalkingLeaves

A GlyphsApp plugin to help you explore the world’s languages and writing systems
MIT License
26 stars 2 forks source link

Arabic compatibility glyphs causing errors #13

Closed justinpenner closed 5 months ago

justinpenner commented 5 months ago

Reported on the Glyphs forum: https://forum.glyphsapp.com/t/talkingleaves-plugin-is-now-available/29611/5

Traceback (most recent call last):
File “vanillaBase.py”, line 539, in action_
self.callback(sender)
File “TalkingLeaves.py”, line 410, in addGlyphsCallback
self.font.glyphs.append(g)
File “GlyphsApp/GlyphsApp/init.py”, line 1993, in append
NameError: There is a glyph with the name “tah-ar.isol” already in the font.
App:3.3-3301 Plugin:(null)-(null) System:11.7.10

It seems the problem is linked to Arabic isolated forms which exist in Unicode for compatibility purposes but are not treated as characters in Glyphs. Glyphs removes the codepoints when they are added to a font, and then TalkingLeaves tries to add them multiple times because it is only checking for existing codepoints in a font.