CTFont Reference
| Derived from | |
| Framework | ApplicationServices/CoreText |
| Declared in | CTFont.h |
Overview
The CTFont opaque type represents a Core Text font object. Font objects represent fonts to an application, providing access to characteristics of the font, such as point size, transform matrix, and other attributes. Fonts provide assistance in laying out glyphs relative to one another and are used to establish the current font when drawing in a graphics context.
Functions by Task
Creating Fonts
-
CTFontCreateWithName -
CTFontCreateWithNameAndOptions -
CTFontCreateWithFontDescriptor -
CTFontCreateWithFontDescriptorAndOptions -
CTFontCreateUIFontForLanguage -
CTFontCreateCopyWithAttributes -
CTFontCreateCopyWithSymbolicTraits -
CTFontCreateCopyWithFamily -
CTFontCreateForString
Getting Font Data
-
CTFontCopyFontDescriptor -
CTFontCopyAttribute -
CTFontGetSize -
CTFontGetMatrix -
CTFontGetSymbolicTraits -
CTFontCopyTraits
Getting Font Names
-
CTFontCopyPostScriptName -
CTFontCopyFamilyName -
CTFontCopyFullName -
CTFontCopyDisplayName -
CTFontCopyName -
CTFontCopyLocalizedName
Working With Encoding
Getting Font Metrics
-
CTFontGetAscent -
CTFontGetDescent -
CTFontGetLeading -
CTFontGetUnitsPerEm -
CTFontGetGlyphCount -
CTFontGetBoundingBox -
CTFontGetUnderlinePosition -
CTFontGetUnderlineThickness -
CTFontGetSlantAngle -
CTFontGetCapHeight -
CTFontGetXHeight
Getting Glyph Data
-
CTFontCreatePathForGlyph -
CTFontGetGlyphWithName -
CTFontGetBoundingRectsForGlyphs -
CTFontGetAdvancesForGlyphs -
CTFontGetVerticalTranslationsForGlyphs
Working With Font Variations
Getting Font Features
Working with Glyphs
Converting Fonts
Getting Font Table Data
Getting the Type Identifier
Functions
CTFontCopyAttribute
Returns the value associated with an arbitrary attribute of the given font.
CFTypeRef CTFontCopyAttribute ( CTFontRef font, CFStringRef attribute );
Parameters
- font
-
The font reference.
- attribute
-
The requested attribute.
Return Value
A retained reference to an arbitrary attribute or NULL if the requested attribute is not present.
Discussion
Refer to the attribute definitions documentation for information as to how each attribute is packaged as a CFType.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyAvailableTables
Returns an array of font table tags.
CFArrayRef CTFontCopyAvailableTables ( CTFontRef font, CTFontTableOptions options );
Parameters
- font
-
The font reference.
- options
-
The font table options.
Return Value
An array of Font Table Tag Constants values for the given font and the supplied options.
Discussion
The returned set will contain unboxed values, which can be extracted like so:
CTFontTableTag tag = (CTFontTableTag)(uintptr_t)CFArrayGetValueAtIndex(tags, index); |
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyCharacterSet
Returns the Unicode character set of the font.
CFCharacterSetRef CTFontCopyCharacterSet ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to the font's character set.
Discussion
The returned character set covers the nominal referenced by the font's Unicode 'cmap’ table.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyDisplayName
Returns the display name of the given font.
CFStringRef CTFontCopyDisplayName ( CTFontRef font );
Parameters
- font
-
The font reference.
Discussion
A retained reference to the localized display name of the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyFamilyName
Returns the family name of the given font.
CFStringRef CTFontCopyFamilyName ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to the family name of the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyFeatures
Returns an array of font features.
CFArrayRef CTFontCopyFeatures ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
An array of font feature dictionaries for the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyFeatureSettings
Returns an array of font feature-setting tuples.
CFArrayRef CTFontCopyFeatureSettings ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A normalized array of font feature-setting dictionaries. The array contains only the non-default settings that should be applied to the font, or NULL if the default settings should be used.
Discussion
A feature-setting dictionary is a tuple of a kCTFontFeatureTypeIdentifierKey key-value pair and a kCTFontFeatureSelectorIdentifierKey key-value pair. Each setting dictionary indicates which setting is enabled. It is the caller's responsibility to handle exclusive and nonexclusive settings as necessary.
The feature settings are verified against those that the font supports and any that do not apply are removed. Further, feature settings that represent a default setting for the font are also removed.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyFontDescriptor
Returns the normalized font descriptor for the given font reference.
CTFontDescriptorRef CTFontCopyFontDescriptor ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A normalized font descriptor for a font containing enough information to recreate this font at a later time.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyFullName
Returns the full name of the given font.
CFStringRef CTFontCopyFullName ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to the full name of the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyGraphicsFont
Returns a Core Graphics font reference and attributes.
CGFontRef CTFontCopyGraphicsFont ( CTFontRef font, CTFontDescriptorRef *attributes );
Parameters
- font
-
The font reference.
- attributes
-
On output, points to a font descriptor containing additional attributes from the font. Can be
NULL. Must be released by the caller.
Return Value
A CGFontRef object for the given font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyLocalizedName
Returns a reference to a localized name for the given font.
CFStringRef CTFontCopyLocalizedName ( CTFontRef font, CFStringRef nameKey, CFStringRef *language );
Parameters
- font
-
The font reference.
- nameKey
-
The name specifier. See
“Name Specifier Constants”for possible values. - language
-
On output, points to the language string of the returned name string. The format of the language identifier conforms to the RFC 3066bis standard.
Return Value
A specific localized name from the font reference or NULL if the font does not have an entry for the requested name key.
Discussion
The name is localized based on the user's global language preference precedence. That is, the user’s language preference is a list of languages in order of precedence. So, for example, if the list had Japanese and English, in that order, then a font that did not have Japanese name strings but had English strings would return the English strings.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyName
Returns a reference to the requested name of the given font.
CFStringRef CTFontCopyName ( CTFontRef font, CFStringRef nameKey );
Parameters
- font
-
The font reference.
- nameKey
-
The name specifier. See
“Name Specifier Constants”for possible values.
Return Value
The requested name for the font, or NULL if the font does not have an entry for the requested name. The Unicode version of the name is preferred, otherwise the first available version is returned.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyPostScriptName
Returns the PostScript name of the given font.
CFStringRef CTFontCopyPostScriptName ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to the PostScript name of the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopySupportedLanguages
Returns an array of languages supported by the font.
CFArrayRef CTFontCopySupportedLanguages ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to an array of languages supported by the font. The array contains language identifier strings as CFStringRef objects. The format of the language identifier conforms to the RFC 3066bis standard.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyTable
Returns a reference to the font table data.
CFDataRef CTFontCopyTable ( CTFontRef font, CTFontTableTag table, CTFontTableOptions options );
Parameters
- font
-
The font reference.
- table
-
The font table identifier as a
Font Table Tag Constantsconstant. See “Font Table Tag Constants” for possible values. - options
-
The font table options.
Return Value
A retained reference to the font table data as a CFDataRef object. The table data is not actually copied; however, the data reference must be released.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyTraits
Returns the traits dictionary of the given font.
CFDictionaryRef CTFontCopyTraits ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
A retained reference to the font traits dictionary. Individual traits can be accessed with the trait key constants.
Discussion
See the Constants section of CTFontDescriptor Reference for a definition of the font traits.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyVariation
Returns a variation dictionary from the font reference.
CFDictionaryRef CTFontCopyVariation ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The current variation instance as a dictionary.
Discussion
The keys for each variation correspond to the variation identifier obtained via kCTFontVariationAxisIdentifierKey, which represents the four-character axis code as a CFNumber object.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCopyVariationAxes
Returns an array of variation axes.
CFArrayRef CTFontCopyVariationAxes ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
An array of variation axes dictionaries. Each variation axis dictionary contains the five variation axis keys listed in “Font Variation Axis Dictionary Keys”.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateCopyWithAttributes
Returns a new font with additional attributes based on the original font.
CTFontRef CTFontCreateCopyWithAttributes ( CTFontRef font, CGFloat size, const CGAffineTransform *matrix, CTFontDescriptorRef attributes );
Parameters
- font
-
The original font reference on which to base the new font.
- size
-
The point size for the font reference. If
0.0is specified, the original font’s size is preserved. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the original font's matrix is preserved. - attributes
-
A font descriptor containing additional attributes that the new font should contain.
Return Value
A new font reference converted from the original with the specified attributes.
Discussion
This function provides a mechanism to change attributes quickly on a given font reference in response to user actions. For instance, the size can be changed in response to a user manipulating a size slider.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateCopyWithFamily
Returns a new font in the specified family based on the traits of the original font.
CTFontRef CTFontCreateCopyWithFamily ( CTFontRef font, CGFloat size, const CGAffineTransform *matrix, CFStringRef family );
Parameters
- font
-
The original font reference on which to base the new font.
- size
-
The point size for the font reference. If
0.0is specified, the original font’s size is preserved. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the original font's matrix is preserved. - family
-
The name of the desired family.
Return Value
A new font reference with the original traits in the given family, or NULL if none is found in the system.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateCopyWithSymbolicTraits
Returns a new font in the same font family as the original with the specified symbolic traits.
CTFontRef CTFontCreateCopyWithSymbolicTraits ( CTFontRef font, CGFloat size, const CGAffineTransform *matrix, CTFontSymbolicTraits symTraitValue, CTFontSymbolicTraits symTraitMask );
Parameters
- font
-
The original font reference on which to base the new font.
- size
-
The point size for the font reference. If
0.0is specified, the original font’s size is preserved. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the original font's matrix is preserved. - symTraitValue
-
The value of the symbolic traits.
- symTraitMask
-
The mask bits of the symbolic traits.
Return Value
A new font reference in the same family with the given symbolic traits. or NULL if none is found in the system.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateForString
Returns a new font reference that can best map the given string range based on the current font.
CTFontRef CTFontCreateForString ( CTFontRef currentFont, CFStringRef string, CFRange range );
Parameters
- currentFont
-
The current font that contains a valid cascade list.
- string
-
A unicode string containing characters that cannot be encoded by the current font.
- range
-
A
CFRangestructure specifying the range of the string that needs to be mapped.
Return Value
The best substitute font from the cascade list of the current font that can encode the specified string range. If the current font is capable of encoding the string range, then it is retained and returned.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreatePathForGlyph
Creates a path for the specified glyph.
CGPathRef CTFontCreatePathForGlyph ( CTFontRef font, CGGlyph glyph, const CGAffineTransform *transform );
Parameters
- font
-
The font reference.
- glyph
-
The glyph.
- transform
-
An affine transform applied to the path. Can be
NULL. IfNULL,CGAffineTransformIdentityis used.
Return Value
A CGPath object containing the glyph outlines, NULL on error. Must be released by caller.
Discussion
Creates a path from the outlines of the glyph for the specified font. The path reflects the font point size, matrix, and transform parameter, applied in that order. The transform parameter is most commonly be used to provide a translation to the desired glyph origin.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateUIFontForLanguage
Returns the special user-interface font for the given language and user-interface type.
CTFontRef CTFontCreateUIFontForLanguage ( CTFontUIFontType uiType, CGFloat size, CFStringRef language );
Parameters
- uiType
-
A constant specifying the intended user-interface use for the requested font reference. See “Enumerations” for possible values.
- size
-
The point size for the font reference. If
0.0is specified, the default size for the requested user-interface type is used. - language
-
Language specifier string to select a font for a particular localization. If
NULLis specified, the current system language is used. The format of the language identifier should conform to the RFC 3066bis standard.
Return Value
The correct font for various user-interface uses.
Discussion
The only required parameter is the uiType selector; the other parameters have default values.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateWithFontDescriptor
Returns a new font reference that best matches the given font descriptor.
CTFontRef CTFontCreateWithFontDescriptor ( CTFontDescriptorRef descriptor, CGFloat size, const CGAffineTransform *matrix );
Parameters
- descriptor
-
A font descriptor containing attributes that specify the requested font.
- size
-
The point size for the font reference. If
0.0is specified, the default font size of12.0is used. This parameter is optional. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the identity matrix is used. This parameter is optional.
Return Value
A CTFontRef that best matches the attributes provided with the font descriptor.
Discussion
The size and matrix parameters override any specified in the font descriptor unless they are unspecified (0.0 for size and NULL for matrix). A best match font is always returned, and default values are used for any unspecified parameters.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateWithFontDescriptorAndOptions
Returns a new font reference that best matches the given font descriptor.
CTFontRef CTFontCreateWithFontDescriptorAndOptions ( CTFontDescriptorRef descriptor, CGFloat size, const CGAffineTransform *matrix, CTFontOptions options );
Parameters
- descriptor
-
A font descriptor containing attributes that specify the requested font.
- size
-
The point size for the font reference. If 0.0 is specified, the default font size of 12.0 is used. This parameter is optional.
- matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the identity matrix is used. This parameter is optional. - options
-
Options flags. See “Font Option Constants” for values. This parameter is optional.
Return Value
A CTFontRef that best matches the attributes provided with the font descriptor.
Discussion
The size and matrix parameters override any specified in the font descriptor, unless they are unspecified (0.0 for size and NULL for matrix and options). A best match font is always returned, and default values are used for any unspecified.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateWithGraphicsFont
Creates a new font reference from an existing Core Graphics font reference.
CTFontRef CTFontCreateWithGraphicsFont ( CGFontRef graphicsFont, CGFloat size, const CGAffineTransform *matrix, CTFontDescriptorRef attributes );
Parameters
- graphicsFont
-
A valid Core Graphics font reference.
- size
-
The point size for the font reference. If
0.0is specified the default font size of 12.0 is used. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULL, the identity matrix is used. Optional. - attributes
-
Additional attributes that should be matched. Optional.
Return Value
A new font reference for an existing CGFontRef object with the specified size, matrix, and additional attributes.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateWithName
Returns a new font reference for the given name.
CTFontRef CTFontCreateWithName ( CFStringRef name, CGFloat size, const CGAffineTransform *matrix );
Parameters
- name
-
The font name for which you wish to create a new font reference. A valid PostScript name is preferred, although other font name types are matched in a fallback manner.
- size
-
The point size for the font reference. If
0.0is specified, the default font size of12.0is used. This parameter is optional. - matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the identity matrix is used. This parameter is optional.
Return Value
Returns a CTFontRef that best matches the name provided with size and matrix attributes.
Discussion
The name parameter is the only required parameter, and default values are used for unspecified parameters (0.0 for size and NULL for matrix). If all parameters cannot be matched identically, a best match is found.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontCreateWithNameAndOptions
Returns a new font reference for the given name.
CTFontRef CTFontCreateWithNameAndOptions ( CFStringRef name, CGFloat size, const CGAffineTransform *matrix, CTFontOptions options );
Parameters
- name
-
The font name for which you wish to create a new font reference. A valid PostScript name is preferred, although other font name types are matched in a fallback manner.
- size
-
The point size for the font reference. If 0.0 is specified, the default font size of 12.0 is used. This parameter is optional.
- matrix
-
The transformation matrix for the font. In most cases, set this parameter to be
NULL. IfNULLis specified, the identity matrix is used. This parameter is optional. - options
-
Options flags. See “Font Option Constants” for values. This parameter is optional.
Return Value
Returns a CTFontRef that best matches the name provided with size and matrix attributes.
Discussion
The name parameter is the only required parameter, and default values are used for unspecified parameters (0.0 for size and NULL for matrix and options). If all parameters cannot be matched identically, a best match is found.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontDrawGlyphs
Renders the given glyphs of a font at the specified positions in the supplied graphics context.
void CTFontDrawGlyphs( CTFontRef font, const CGGlyph glyphs[], const CGPoint positions[], size_t count, CGContextRef context );
Parameters
- font
-
The font with glyphs to render. If the font has a size or matrix attribute,
contextis set with these values. - glyphs
-
The glyphs to be rendered. The glyphs should be the result of proper Unicode text layout operations (such as with
CTLine). Functions such asCTFontGetGlyphsForCharactersdo not perform any Unicode text layout. - positions
-
The positions (origins) for each glyph in glyphs. The positions are in user space. The number of positions passed in must match the number of glyphs (in glyphs).
- count
-
The number of glyphs to be rendered from the glyphs array.
- context
-
The graphics context used to render the glyphs.
Discussion
This function modifies graphics state including font, text size, and text matrix if these attributes are specified in font. These attributes are not restored.
Availability
- Available in iOS 4.2 and later.
Declared In
CTFont.hCTFontGetAdvancesForGlyphs
Calculates the advances for an array of glyphs and returns the summed advance.
double CTFontGetAdvancesForGlyphs ( CTFontRef font, CTFontOrientation orientation, const CGGlyph glyphs[], CGSize advances[], CFIndex count );
Parameters
- font
-
The font reference.
- orientation
-
The intended drawing orientation of the glyphs. Used to determined which glyph metrics to return.
- glyphs
-
An array of
countnumber of glyphs. - advances
-
An array of
countnumber ofCGSizeobjects to receive the computed glyph advances. IfNULL, only the overall advance is calculated. - count
-
The capacity of the glyphs and advances buffers.
Return Value
The summed glyph advance of an array of glyphs.
Discussion
Individual glyph advances are passed back via the advances parameter. These are the ideal metrics for each glyph scaled and transformed in font space.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetAscent
Returns the scaled font-ascent metric of the given font.
CGFloat CTFontGetAscent ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font-ascent metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetBoundingBox
Returns the scaled bounding box of the given font.
CGRect CTFontGetBoundingBox ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The design bounding box of the font, which is the rectangle defined by xMin, yMin, xMax, and yMax values for the font. Returns CGRectNull on error.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetBoundingRectsForGlyphs
Calculates the bounding rects for an array of glyphs and returns the overall bounding rectangle for the glyph run.
CGRect CTFontGetBoundingRectsForGlyphs ( CTFontRef font, CTFontOrientation orientation, const CGGlyph glyphs[], CGRect boundingRects[], CFIndex count );
Parameters
- font
-
The font reference.
- orientation
-
The intended drawing orientation of the glyphs. Used to determined which glyph metrics to return.
- glyphs
-
An array of count number of glyphs.
- boundingRects
-
On output, the computed glyph rectangles in an array of count number of
CGRectobjects. IfNULL, only the overall bounding rectangle is calculated. - count
-
The capacity of the glyphs and boundingRects buffers.
Return Value
The overall bounding rectangle for an array or run of glyphs. Returns CGRectNull on error.
Discussion
The bounding rectangles of the individual glyphs are returned through the boundingRects parameter. These are the design metrics from the font transformed in font space.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetCapHeight
Returns the cap-height metric of the given font.
CGFloat CTFontGetCapHeight ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font cap-height metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetDescent
Returns the scaled font-descent metric of the given font.
CGFloat CTFontGetDescent ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font-descent metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetGlyphCount
Returns the number of glyphs of the given font.
CFIndex CTFontGetGlyphCount ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The number of glyphs in the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetGlyphsForCharacters
Provides basic Unicode encoding for the given font, returning by reference an array of CGGlyph values corresponding to a given array of Unicode characters for the given font.
bool CTFontGetGlyphsForCharacters ( CTFontRef font, const UniChar characters[], CGGlyph glyphs[], CFIndex count );
Parameters
- font
-
The font reference.
- characters
-
An array of Unicode characters.
- glyphs
-
On output, points to an array of glyph values.
- count
-
The capacity of the character and glyph arrays.
Return Value
True if the font could encode all Unicode characters; otherwise False.
Discussion
If a glyph could not be encoded, a value of 0 is passed back at the corresponding index in the glyphs array and the function returns False. It is the responsibility of the caller to handle the Unicode properties of the input characters.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetGlyphWithName
Returns the CGGlyph value for the specified glyph name in the given font.
CGGlyph CTFontGetGlyphWithName ( CTFontRef font, CFStringRef glyphName );
Parameters
- font
-
The font reference.
- glyphName
-
The glyph name as a
CFStringobject.
Return Value
The glyph value for the named glyph as a CGGlyph object, or if the glyph name is not recognized, the .notdef glyph index value.
Discussion
The returned CGGlyph object can be used with any of the subsequent glyph data accessors or directly with Core Graphics.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetLeading
Returns the scaled font-leading metric of the given font.
CGFloat CTFontGetLeading ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font-leading metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetLigatureCaretPositions
Returns caret positions within a glyph.
CFIndex CTFontGetLigatureCaretPositions( CTFontRef font, CGGlyph glyph, CGFloat positions[], CFIndex maxPositions );
Parameters
- font
-
A reference to the font to use.
- glyph
-
A reference to the glyph.
- positions
-
A buffer of at least
maxPositionsto receive the ligature caret positions for glyph. - maxPositions
-
The maximum number of positions to return.
Return Value
The maximum number of caret positions for the specified glyph
Discussion
This function is used to obtain caret positions for a specific glyph. The return value is the maximum number of positions possible, and the function will populate the caller's positions buffer with available positions if possible. This function might not be able to produce positions if the font does not have the appropriate data, in which case it will return 0.
Availability
- Available in iOS 4.2 and later.
Declared In
CTFont.hCTFontGetMatrix
Returns the transformation matrix of the given font.
CGAffineTransform CTFontGetMatrix ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The transformation matrix for the given font reference. This is the matrix that was provided when the font was created.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetSize
Returns the point size of the given font.
CGFloat CTFontGetSize ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The point size of the given font reference. This is the point size provided when the font was created.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetSlantAngle
Returns the slant angle of the given font.
CGFloat CTFontGetSlantAngle ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The transformed slant angle of the font. This is equivalent to the italic or caret angle with any skew from the transformation matrix applied.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetStringEncoding
Returns the best string encoding for legacy format support.
CFStringEncoding CTFontGetStringEncoding ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The best string encoding for the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetSymbolicTraits
Returns the symbolic traits of the given font.
CTFontSymbolicTraits CTFontGetSymbolicTraits ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The symbolic traits of the font. This is equivalent to the kCTFontSymbolicTrait value of the traits dictionary.
Discussion
See the Constants section of CTFontDescriptor Reference for a definition of the font traits.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetTypeID
Returns the type identifier for Core Text font references.
CFTypeID CTFontGetTypeID ( void );
Return Value
The identifier for the CTFont opaque type.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetUnderlinePosition
Returns the scaled underline position of the given font.
CGFloat CTFontGetUnderlinePosition ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font underline-position metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetUnderlineThickness
Returns the scaled underline-thickness metric of the given font.
CGFloat CTFontGetUnderlineThickness ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font underline-thickness metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetUnitsPerEm
Returns the units-per-em metric of the given font.
unsigned CTFontGetUnitsPerEm ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The units per em of the font.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetVerticalTranslationsForGlyphs
Calculates the offset from the default (horizontal) origin to the vertical origin for an array of glyphs.
void CTFontGetVerticalTranslationsForGlyphs ( CTFontRef font, const CGGlyph glyphs[], CGSize translations[], CFIndex count );
Parameters
- font
-
The font reference.
- glyphs
-
An array of count number of glyphs.
- translations
-
On output, the computed origin offsets in an array of count number of
CGSizeobjects. - count
-
The capacity of the glyphs and translations buffers.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hCTFontGetXHeight
Returns the x-height metric of the given font.
CGFloat CTFontGetXHeight ( CTFontRef font );
Parameters
- font
-
The font reference.
Return Value
The font x-height metric scaled according to the point size and matrix of the font reference.
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hData Types
CTFontRef
A reference to a Core Text font object.
typedef const struct __CTFont *CTFontRef;
Availability
- Available in iOS 3.2 and later.
Declared In
CTFont.hConstants
Global Variables
Name Specifier Constants
Name specifier constants provide access to the different names associated with a font.
const CFStringRef kCTFontCopyrightNameKey; const CFStringRef kCTFontFamilyNameKey; const CFStringRef kCTFontSubFamilyNameKey; const CFStringRef kCTFontStyleNameKey; const CFStringRef kCTFontUniqueNameKey; const CFStringRef kCTFontFullNameKey; const CFStringRef kCTFontVersionNameKey; const CFStringRef kCTFontPostScriptNameKey; const CFStringRef kCTFontTrademarkNameKey; const CFStringRef kCTFontManufacturerNameKey; const CFStringRef kCTFontDesignerNameKey; const CFStringRef kCTFontDescriptionNameKey; const CFStringRef kCTFontVendorURLNameKey; const CFStringRef kCTFontDesignerURLNameKey; const CFStringRef kCTFontLicenseNameKey; const CFStringRef kCTFontLicenseURLNameKey; const CFStringRef kCTFontSampleTextNameKey; const CFStringRef kCTFontPostScriptCIDNameKey;
Constants
kCTFontCopyrightNameKey-
The name specifier for the copyright name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFamilyNameKey-
The name specifier for the family name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSubFamilyNameKey-
The name specifier for the subfamily name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontStyleNameKey-
The name specifier for the style name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontUniqueNameKey-
The name specifier for the unique name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFullNameKey-
The name specifier for the full name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVersionNameKey-
The name specifier for the version name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontPostScriptNameKey-
The name specifier for the PostScript name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTrademarkNameKey-
The name specifier for the trademark name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontManufacturerNameKey-
The name specifier for the manufacturer name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontDesignerNameKey-
The name specifier for the designer name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontDescriptionNameKey-
The name specifier for the description name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVendorURLNameKey-
The name specifier for the vendor URL name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontDesignerURLNameKey-
The name specifier for the designer URL name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontLicenseNameKey-
The name specifier for the license name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontLicenseURLNameKey-
The name specifier for the license URL name.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSampleTextNameKey-
The name specifier for the sample text name string.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontPostScriptCIDNameKey-
The name specifier for the PostScript character identifier (CID) font name.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
Declared In
CTFont.hFont Variation Axis Dictionary Keys
These constants provide keys to font variation axis dictionary values.
const CFStringRef kCTFontVariationAxisIdentifierKey; const CFStringRef kCTFontVariationAxisMinimumValueKey; const CFStringRef kCTFontVariationAxisMaximumValueKey; const CFStringRef kCTFontVariationAxisDefaultValueKey; const CFStringRef kCTFontVariationAxisNameKey;
Constants
kCTFontVariationAxisIdentifierKey-
Key to get the variation axis identifier value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVariationAxisMinimumValueKey-
Key to get the variation axis minimum value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVariationAxisMaximumValueKey-
Key to get the variation axis maximum value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVariationAxisDefaultValueKey-
Key to get the variation axis default value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontVariationAxisNameKey-
Key to get the localized variation axis name string.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
Declared In
CTFont.hFont Feature Constants
These constants provide keys to font feature dictionary values.
const CFStringRef kCTFontFeatureTypeIdentifierKey; const CFStringRef kCTFontFeatureTypeNameKey; const CFStringRef kCTFontFeatureTypeExclusiveKey; const CFStringRef kCTFontFeatureTypeSelectorsKey; const CFStringRef kCTFontFeatureSelectorIdentifierKey; const CFStringRef kCTFontFeatureSelectorNameKey; const CFStringRef kCTFontFeatureSelectorDefaultKey; const CFStringRef kCTFontFeatureSelectorSettingKey;
Constants
kCTFontFeatureTypeIdentifierKey-
Key to get the font feature type value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureTypeNameKey-
Key to get the localized font feature type name as a
CFStringobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureTypeExclusiveKey-
Key to get the font feature exclusive setting of the feature as a
CFBooleanobject. The value associated with this key indicates whether the feature selectors associated with this type should be mutually exclusive.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureTypeSelectorsKey-
Key to get the the array of font feature selectors as a
CFArrayRefobject. This is an array of selector dictionaries that contain the values for the font feature selector keys listed in this group.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureSelectorIdentifierKey-
Key to be used with a selector dictionary corresponding to a feature type to obtain the selector identifier value as a
CFNumberRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureSelectorNameKey-
Key to be used with a selector dictionary to get the localized name string for the selector as a
CFStringRefobject.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureSelectorDefaultKey-
Key to be used with a selector dictionary to get the default indicator for the selector. This value is a
CFBooleanRefobject, which if present and true, indicates that this selector is the default setting for the current feature type.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontFeatureSelectorSettingKey-
Key to be used with a selector dictionary to get or specify the current setting for the selector. This value is a
CFBooleanRefobject to indicate whether this selector is on or off. If this key is not present, the default setting is used.Available in iOS 3.2 and later.
Declared in
CTFont.h.
Declared In
CTFont.hEnumerations
User Interface Type Constants
These constants represent the specific user-interface purpose to specify for font creation.
enum { kCTFontNoFontType = -1,
kCTFontUserFontType = 0,
kCTFontUserFixedPitchFontType = 1,
kCTFontSystemFontType = 2,
kCTFontEmphasizedSystemFontType = 3,
kCTFontSmallSystemFontType = 4,
kCTFontSmallEmphasizedSystemFontType = 5,
kCTFontMiniSystemFontType = 6,
kCTFontMiniEmphasizedSystemFontType = 7,
kCTFontViewsFontType = 8,
kCTFontApplicationFontType = 9,
kCTFontLabelFontType = 10,
kCTFontMenuTitleFontType = 11,
kCTFontMenuItemFontType = 12,
kCTFontMenuItemMarkFontType = 13,
kCTFontMenuItemCmdKeyFontType = 14,
kCTFontWindowTitleFontType = 15,
kCTFontPushButtonFontType = 16,
kCTFontUtilityWindowTitleFontType = 17,
kCTFontAlertHeaderFontType = 18,
kCTFontSystemDetailFontType = 19,
kCTFontEmphasizedSystemDetailFontType = 20,
kCTFontToolbarFontType = 21,
kCTFontSmallToolbarFontType = 22,
kCTFontMessageFontType = 23,
kCTFontPaletteFontType = 24,
kCTFontToolTipFontType = 25,
kCTFontControlContentFontType = 26};
typedef uint32_t CTFontUIFontType;
Constants
kCTFontNoFontTypeThe user-interface font type is not specified.
Available in iOS 3.2 and later.
Declared in
CTFont.h.kCTFontUserFontType-
The font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change).
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontUserFixedPitchFontType-
The font used by default for documents and other text under the user’s control when that font is fixed-pitch.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSystemFontType-
The system font used for standard user-interface items such as button labels, menu items, and so on.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontEmphasizedSystemFontType-
The system font used for emphasis in alerts.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSmallSystemFontType-
The standard small system font used for informative text in alerts, column headings in lists, help tags, and small controls.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSmallEmphasizedSystemFontType-
The small system font used for emphasis.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMiniSystemFontType-
The standard miniature system font used for mini controls and utility window labels and text.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMiniEmphasizedSystemFontType-
The miniature system font used for emphasis.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontViewsFontType-
The view font used as the default font of text in lists and tables.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontApplicationFontType-
The default font for text documents.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontLabelFontType-
The font used for labels and tick marks on full-size sliders.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMenuTitleFontType-
The font used for menu titles.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMenuItemFontType-
The font used for menu items.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMenuItemMarkFontType-
The font used to draw menu item marks.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMenuItemCmdKeyFontType-
The font used for menu-item command-key equivalents.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontWindowTitleFontType-
The font used for window titles.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontPushButtonFontType-
The font used for a push button (a rounded rectangular button with a text label on it).
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontUtilityWindowTitleFontType-
The font used for utility window titles.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontAlertHeaderFontType-
The font used for alert headers.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSystemDetailFontType-
The standard system font used for details.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontEmphasizedSystemDetailFontType-
The system font used for emphasis in details.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontToolbarFontType-
The font used for labels of toolbar items.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontSmallToolbarFontType-
The small font used for labels of toolbar items.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontMessageFontType-
The font used for standard interface items, such as button labels, menu items, and so on.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontPaletteFontType-
The font used in tool palettes.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontToolTipFontType-
The font used for tool tips.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontControlContentFontType-
The font used for contents of user-interface controls.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
Discussion
Use these constants with the CTFontCreateUIFontForLanguage function to indicate the intended user interface use of the font reference to be created.
Declared In
CTFont.hFont Table Tag Constants
Font table tags provide access to font table data.
enum {
kCTFontTableBASE = 'BASE',
kCTFontTableCFF = 'CFF ',
kCTFontTableDSIG = 'DSIG',
kCTFontTableEBDT = 'EBDT',
kCTFontTableEBLC = 'EBLC',
kCTFontTableEBSC = 'EBSC',
kCTFontTableGDEF = 'GDEF',
kCTFontTableGPOS = 'GPOS',
kCTFontTableGSUB = 'GSUB',
kCTFontTableJSTF = 'JSTF',
kCTFontTableLTSH = 'LTSH',
kCTFontTableOS2 = 'OS/2',
kCTFontTablePCLT = 'PCLT',
kCTFontTableVDMX = 'VDMX',
kCTFontTableVORG = 'VORG',
kCTFontTableZapf = 'Zapf',
kCTFontTableAcnt = 'acnt',
kCTFontTableAvar = 'avar',
kCTFontTableBdat = 'bdat',
kCTFontTableBhed = 'bhed',
kCTFontTableBloc = 'bloc',
kCTFontTableBsln = 'bsln',
kCTFontTableCmap = 'cmap',
kCTFontTableCvar = 'cvar',
kCTFontTableCvt = 'cvt ',
kCTFontTableFdsc = 'fdsc',
kCTFontTableFeat = 'feat',
kCTFontTableFmtx = 'fmtx',
kCTFontTableFpgm = 'fpgm',
kCTFontTableFvar = 'fvar',
kCTFontTableGasp = 'gasp',
kCTFontTableGlyf = 'glyf',
kCTFontTableGvar = 'gvar',
kCTFontTableHdmx = 'hdmx',
kCTFontTableHead = 'head',
kCTFontTableHhea = 'hhea',
kCTFontTableHmtx = 'hmtx',
kCTFontTableHsty = 'hsty',
kCTFontTableJust = 'just',
kCTFontTableKern = 'kern',
kCTFontTableKerx = 'kerx',
kCTFontTableLcar = 'lcar',
kCTFontTableLoca = 'loca',
kCTFontTableMaxp = 'maxp',
kCTFontTableMort = 'mort',
kCTFontTableMorx = 'morx',
kCTFontTableName = 'name',
kCTFontTableOpbd = 'opbd',
kCTFontTablePost = 'post',
kCTFontTablePrep = 'prep',
kCTFontTableProp = 'prop',
kCTFontTableSbit = 'sbit',
kCTFontTableSbix = 'sbix',
kCTFontTableTrak = 'trak',
kCTFontTableVhea = 'vhea',
kCTFontTableVmtx = 'vmtx'
};
typedef uint32_t CTFontTableTag;
Constants
kCTFontTableBASE-
Font table tag for the font baseline.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableCFF-
Font table tag for a PostScript font program.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableDSIG-
Font table tag for a digital signature.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableEBDT-
Font table tag for an embedded bitmap.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableEBLC-
Font table tag for the embedded bitmap location.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableEBSC-
Font table tag for embedded bitmap scaling.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGDEF-
Font table tag for glyph definition.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGPOS-
Font table tag for glyph positioning.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGSUB-
Font table tag for glyph substitution.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableJSTF-
Font table tag for justification.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableLTSH-
Font table tag for linear threshold.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableOS2-
Font table tag for OS/2 and Windows-specific metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTablePCLT-
Font table tag for PCL 5 data.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableVDMX-
Font table tag for vertical device metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableVORG-
Font table tag for vertical origin.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableZapf-
Font table tag for glyph reference.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableAcnt-
Font table tag for accent attachment.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableAvar-
Font table tag for axis variation.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableBdat-
Font table tag for bitmap data.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableBhed-
Font table tag for bitmap font header.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableBloc-
Font table tag for bitmap location.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableBsln-
Font table tag for baseline.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableCmap-
Font table tag for character-to-glyph mapping.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableCvar-
Font table tag for control value variation, or CVT variation.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableCvt-
Font table tag for control value table.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableFdsc-
Font table tag for font descriptor.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableFeat-
Font table tag for layout feature.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableFmtx-
Font table tag for font metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableFpgm-
Font table tag for font program.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableFvar-
Font table tag for font variation.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGasp-
Font table tag for grid-fitting/scan-conversion.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGlyf-
Font table tag for glyph data.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableGvar-
Font table tag for glyph variation.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableHdmx-
Font table tag for horizontal device metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableHead-
Font table tag for font header.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableHhea-
Font table tag for horizontal header.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableHmtx-
Font table tag for horizontal metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableHsty-
Font table tag for horizontal style.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableJust-
Font table tag for justification.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableKern-
Font table tag for kerning.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableKerxFont table tag for extended kerning.
Available in iOS 4.3 and later.
Declared in
CTFont.h.kCTFontTableLcar-
Font table tag for ligature caret.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableLoca-
Font table tag for index to location.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableMaxp-
Font table tag for maximum profile.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableMort-
Font table tag for morph.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableMorx-
Font table tag for extended morph.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableName-
Font table tag for naming table.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableOpbd-
Font table tag for optical bounds.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTablePost-
Font table tag for PostScript information.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTablePrep-
Font table tag for control value program,
'prep'table.Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableProp-
Font table tag for properties.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableSbitFont table tag for bitmap data.
Available in iOS 4.2 and later.
Declared in
CTFont.h.kCTFontTableSbixFont table tag for extended bitmap data.
Available in iOS 4.2 and later.
Declared in
CTFont.h.kCTFontTableTrak-
Font table tag for tracking.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableVhea-
Font table tag for vertical header.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableVmtx-
Font table tag for vertical metrics.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
Declared In
CTFont.hFont Table Option Constants
These constants describe font table options.
enum {
kCTFontTableOptionNoOptions = 0,
kCTFontTableOptionExcludeSynthetic = (1 << 0)
};
typedef uint32_t CTFontTableOptions;
Constants
kCTFontTableOptionNoOptions-
No font table options are specified.
Available in iOS 3.2 and later.
Declared in
CTFont.h. kCTFontTableOptionExcludeSynthetic-
The font table excludes synthetic font data.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
Declared In
CTFont.hFont Option Constants
These constants describe options for font creation and descriptor matching. They are used by the functions CTFontCreateWithNameAndOptions and CTFontCreateWithFontDescriptorAndOptions.
enum {
kCTFontOptionsDefault = 0,
kCTFontOptionsPreventAutoActivation = 1 << 0,
kCTFontOptionsPreferSystemFont = 1 << 2,
};
typedef CFOptionFlags CTFontOptions;
Constants
kCTFontOptionsDefaultDefault options are used.
Available in iOS 3.2 and later.
Declared in
CTFont.h.kCTFontOptionsPreventAutoActivationPrevents automatic font activation.
Available in iOS 3.2 and later.
Declared in
CTFont.h.kCTFontOptionsPreferSystemFontFont matching prefers to match Apple system fonts.
Available in iOS 3.2 and later.
Declared in
CTFont.h.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-12-13)