On 25 Mar 2010, at 10:16, Jerry Krinock <je...@ieee.org> wrote: > The font cascade list is mentioned briefly in "Core Text Programming Guide", > but there is no clue as to how to access it. > > Any documentation references on these topics would be appreciated!
I have no documentation references but I do it like this: NSFont *font = ... something... NSString *thaiFont = [ font isFixedPitch ] ? @"Ayuthaya" : @"Thonburi"; CGFloat size = [ font pointSize ]; NSFontDescriptor *fode2 = [ NSFontDescriptor fontDescriptorWithName: thaiFont size: size ]; NSArray *fodArray = [ NSArray arrayWithObject: fode2 ]; NSDictionary *fodDict = [ NSDictionary dictionaryWithObject: fodArray forKey: NSFontCascadeListAttribute ]; NSFontDescriptor *fode1 = [ font fontDescriptor ]; NSFontDescriptor *fofo = [ fode1 fontDescriptorByAddingAttributes: fodDict ]; NSFont *aFont = [ NSFont fontWithDescriptor: fofo size: size ]; if ( aFont == nil ) ... error handling font = aFont; Kind regards, Gerriet. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com