Contents

CTFontCopyDefaultCascadeListForLanguages(_:_:)

Retrieves an ordered list of font substitution preferences.

Declaration

func CTFontCopyDefaultCascadeListForLanguages(_ font: CTFont, _ languagePrefList: CFArray?) -> CFArray?

Parameters

  • font:

    The font reference.

  • languagePrefList:

    The language preference list, an ordered array of Cfstrings of ISO language codes.

Return Value

An ordered list of CTFontDescriptors for font fallback according to the given language preferences.

Discussion

When the original font used for text layout and rendering does not support a certain Unicode character from the provided text, the system follows this list to pick a fallback font that includes the character.

The font alternatives in the cascade list match the original font’s style, weight, and width.

See Also

Getting Font Data