Function CTLineCreateWithAttributedString

Source
pub unsafe extern "C-unwind" fn CTLineCreateWithAttributedString(
    attr_string: &CFAttributedString,
) -> CFRetained<CTLine>
Available on crate feature CTLine only.
Expand description

Creates a single immutable line object directly from an attributed string.

This will allow clients who need very simple line generation to create a line without needing to create a typesetter object. The typesetting will be done under the hood. Without a typesetter object, the line cannot be properly broken. However, for simple things like text labels and other things, this is not an issue.

Parameter attrString: The attributed string which the line will be created for.

Returns: This function will return a reference to a CTLine object.