Function CTRubyAnnotationCreateWithAttributes

Source
pub unsafe extern "C-unwind" fn CTRubyAnnotationCreateWithAttributes(
    alignment: CTRubyAlignment,
    overhang: CTRubyOverhang,
    position: CTRubyPosition,
    string: &CFString,
    attributes: &CFDictionary,
) -> CFRetained<CTRubyAnnotation>
Available on crate feature CTRubyAnnotation only.
Expand description

Creates an immutable ruby annotation object.

Using this function to create a ruby annotation object with more precise control of the annotation text.

Parameter alignment: Specifies how the ruby text and the base text should be aligned relative to each other.

Parameter overhang: Specifies how the ruby text can overhang adjacent characters.

Parameter position: The position of the annotation text.

Parameter string: A string without any formatting, its format will be derived from the attrs specified below.

Parameter attributes: A attribute dictionary to combine with the string specified above. If you don’t specify kCTFontAttributeName, the font used by the Ruby annotation will be deduced from the base text, with a size factor specified by a CFNumberRef value keyed by kCTRubyAnnotationSizeFactorAttributeName.

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