This used to work, but not under iOS 4. - (NSString*)styleNameForIndex:(NSUInteger)index inFontFamily:(NSString*)famName { NSString* fontName = [[UIFont fontNamesForFamilyName:famName] objectAtIndex:index]; CTFontRef fontRef = CTFontCreateWithName((CFStringRef)fontName, 0.0, NULL); CFStringRef style = CTFontCopyName(fontRef, kCTFontStyleNameKey); CFRelease(fontRef); return [(NSString*)style autorelease]; }
Now I get names like "Oblique" instead of "Italic". Is there a better way to get the common style names for display? _______________________________________________ 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