established with kCTBaselineReferenceInfoAttributeName •Baselines to be moved use kCTBaselineInfoAttributeName •Baseline being aligned is kCTBaselineClassAttributeName
stop accepting non-PostScript names in future releases •iOS 6 adds logging to detect use of wrong name: June 13 08:50:59 YourDevice YourApp[237] <Notice>: CoreText performance note: Client requested font with PostScript name "HelveticaNeue" using name "Helvetica Neue" instead. June 13 08:50:59 YourDevice YourApp[237] <Notice>: CoreText performance note: Set a breakpoint on CTLogSuboptimalRequest to debug.
(id)kCTFontFamilyNameAttribute : @"Times New Roman" }; CTFontDescriptorRef descriptor = CTFontDescriptorCreateWithAttributes( (CFDictionaryRef)attributes); NSArray *matches = (NSArray *)CTFontDescriptorCreateMatchingFontDescriptors( descriptor, NULL); if ([matches count] != 0) { // at least one match found, first one would have been returned by // CTFontDescriptorCreateMatchingFontDescriptor() }
using kCTFontCascadeListAttribute •Terminate fallback processing with font covering all characters ▪ “LastResort” •Composite (CFR) fonts on Mountain Lion ▪ /System/Library/DTDs/SplicedFont.dtd
CTFontGetSymbolicTraits(font); if ((symTraits & kCTFontTraitColorGlyphs) != 0) { // font has color glyphs CGPathRef path = CTFontCreatePathForGlyph(font, glyph, NULL); if (path == NULL) { // this is a color glyph } else { // not a color glyph CFRelease(path); } }
•Most string attributes correspond to a particular parameter •Exception to the rule—kCTForegroundColorAttributeName ▪ Use kCTForegroundColorFromContextAttributeName