Just how can I locate the complete course to a typeface from its display name on a Mac?

I am making use of the Photoshop's javascript API to locate the fonts in an offered PSD.

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:

  • Some Photoshop javascript
  • A Python function
  • An OSX API that I can call from python
2019-05-03 17:56:41
Source Share
Answers: 3

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.

2019-05-12 14:21:21

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 : /System/Library/Fonts, /Library/Fonts, and also there can possibly be a customer - degree directory site too ~/Library/Fonts.

2019-05-09 08:25:06

open an incurable (Applications- > Utilities- > Terminal ) and also type this in :

locate InsertFontHere

This will certainly spew out every documents that has the name you desire.

Caution : there might be alot to learn.

2019-05-07 16:36:49