How can I find the full path to a font from its display name on a Mac?
I haven't been able to find anything that does this directly. I think you'll have to iterate through the various font folders on the system: /System/Library/Fonts
, /Library/Fonts
, and there can probably be a user-level directory as well ~/Library/Fonts
.
open up a terminal (Applications->Utilities->Terminal) and type this in:
locate InsertFontHere
This will spit out every file that has the name you want.
Warning: there may be alot to wade through.
Unfortunately the only API that isn't deprecated is located in the ApplicationServices framework, which doesn't have a bridge support file, and thus isn't available in the bridge. If you're wanting to use ctypes, you can use ATSFontGetFileReference after looking up the ATSFontRef.
Cocoa doesn't have any native support, at least as of 10.5, for getting the location of a font.