typemytype / drawbot

http://www.drawbot.com
Other
398 stars 61 forks source link

TypeError when installedFonts() can't find a font that supports the requested chars #490

Closed justvanrossum closed 1 year ago

justvanrossum commented 1 year ago
for fn in installedFonts(supportsCharacters="\U000221B6"):
    font(fn)

Results in:

Traceback (most recent call last):
  File "<untitled>", line 1, in <module>
  File "/Users/just/code/git/drawbot/drawBot/drawBotDrawingTools.py", line 2224, in installedFonts
    return [str(description[CoreText.NSFontNameAttribute]) for description in descriptions]
TypeError: 'NoneType' object is not iterable