Retrieve Font-Filename by FontName/Style
Christiaan Hofman
cmhofman at gmail.com
Sun Apr 13 02:34:18 PDT 2008
Certainly not through Cocoa. There are Carbon functions, but Apple
seems to move font files completely out of sight, because they all are
getting deprecated. E.g. FMGetFontContainer was deprecated on 10.5,
and ATSFontGetFileSpecification is now deprecated on 10.5. I don't
know of a replacement for these deprecated functions.
Christiaan
On 13 Apr 2008, at 2:58 AM, Aya Koshigaya wrote:
> Hi,
>
> I need to get the filename of a TTF-Font based on the Font-Name and
> it's style.
>
> Let's say I'd like to get "Arial".. the function should give me "/
> Libray/Fonts/Arial.ttf"
> If I say "Arial in Bold" it should give me "/Library/Fonts/Arialb.ttf"
>
> The problem is, there should be a naming convention for any font like
>
> Fontname: Arial.ttf
> Italic: Ariali.ttf
> Bold: Arialb.ttf
> Italic + Bold: Arialib.ttf
>
> But, I can't be sure any font uses this naming convention... so, I
> hope there's a nice system-function for this.. :)
>
> Does anyone know one?
>
> Aya~
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
More information about the MacOSX-dev
mailing list