Function

CTFontCreateCopyWithSymbolicTraits

Returns a new font in the same font family as the original with the specified symbolic traits.

Declaration

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.0 is specified, the original font’s size is preserved.

matrix

The transformation matrix for the font. In most cases, set this parameter to be NULL. If NULL is 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.

See Also

Creating Fonts

CTFontCreateWithName

Returns a new font reference for the given name.

CTFontCreateWithNameAndOptions

Returns a new font reference for the given name.

CTFontCreateWithFontDescriptor

Returns a new font reference that best matches the given font descriptor.

CTFontCreateWithFontDescriptorAndOptions

Returns a new font reference that best matches the given font descriptor.

CTFontCreateUIFontForLanguage

Returns the special user-interface font for the given language and user-interface type.

CTFontCreateCopyWithAttributes

Returns a new font with additional attributes based on the original font.

CTFontCreateCopyWithFamily

Returns a new font in the specified family based on the traits of the original font.

CTFontCreateForString

Returns a font reference that most accurately maps the string range based on the current font.

CTFontCreateForStringWithLanguage

Returns a font reference that most accurately maps the string range based on the current font and language.