Function

CTFontCreateUIFontForLanguage

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

Declaration

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.0 is 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 NULL is 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.

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.

CTFontCreateCopyWithAttributes

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

CTFontCreateCopyWithSymbolicTraits

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

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.