Check for a valid font name - Python

Hi all- as far as I can see

sc.doc.Fonts.FindOrCreate( Blarg, False, False)

is happy to add ‘Blarg’ to the font table whether or not it is a legitimate font face… How can I check that the name ‘Blarg’ actually refers to a font on the system?



Does this help?

Thanks, Dale, looks like that will work.


Cool, thanks Dale, I needed something like that awhile back as well…! --Mitch

import System
font_names=[font.Name for font in ff]
1 Like