[futurebasic] Re: [FB] Coloured text

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2011 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Sun, 1 May 2011 07:40:38 -0700
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