Just how can I locate the complete course to a typeface from its display name on a Mac?
Offered a font name returned by the API, I intend to locate the real physical typeface documents that font name represents on the disc.
This is all taking place in a python program working on OSX so I presume I'm seeking among:
- A Python function
- An OSX API that I can call from python
Unfortunately the only API that isn't deprecated lies in the ApplicationServices structure, which does not have a bridge assistance documents, and also hence isn't readily available in the bridge. If you're intending to make use of ctypes, you can make use of ATSFontGetFileReference after seeking out the ATSFontRef.
Cacao does not have any kind of indigenous assistance, at the very least since 10.5, for obtaining the area of a typeface.
I have not had the ability to locate anything that does this straight. I assume you'll need to iterate via the numerous typeface folders on the system :
/Library/Fonts, and also there can possibly be a customer - degree directory site too