On May 1, 2011, at 2:20 AM, Dan Baeckström wrote:
> I tried replacing FMGetFontFamilyFromName() with ATSFontFamilyFindFromName() (copied and pasted from your email). I got an error message "unknown function".
Ken’s selection of ATSFontFamilyFindFromQuickDrawName() seems more precise to me but AFAIK
cfs.font = fn ATSFontFamilyFindFromName( @"Symbol", 0 ) // note the use of the "@" to provide a CFString
should work.
In addition to Ken’s #defines the following two lines are needed to make ATSFontFamilyFindFromName() work:
#define ATSOptionFlags as OptionBits
toolbox fn ATSFontFamilyFindFromName ( CFStringRef iName, ATSOptionFlags iOptions) = ATSFontFamilyRef
Brian S