CTFontCreateForString(_:_:_:)
Returns a font reference that most accurately maps the string range based on the current font.
Declaration
func CTFontCreateForString(_ currentFont: CTFont, _ string: CFString, _ range: CFRange) -> CTFontParameters
- currentFont:
The current font that contains a valid cascade list.
- string:
A Unicode string containing characters that can’t be encoded by the current font.
- range:
A Cfrange structure specifying the range of the string to map.
Return Value
The best substitute font from the cascade list of the current font that can encode the specified string range.
Discussion
If the current font can encode the string range, the function retains and returns the font.
See Also
Related Documentation
Creating Fonts
CTFontCreateWithName(_:_:_:)CTFontCreateWithNameAndOptions(_:_:_:_:)CTFontCreateWithFontDescriptor(_:_:_:)CTFontCreateWithFontDescriptorAndOptions(_:_:_:_:)CTFontCreateUIFontForLanguage(_:_:_:)CTFontCreateCopyWithAttributes(_:_:_:_:)CTFontCreateCopyWithSymbolicTraits(_:_:_:_:_:)CTFontCreateCopyWithFamily(_:_:_:_:)CTFontCreateForStringWithLanguage(_:_:_:_:)