MultiParagraphIntrinsics

Class

Common
class MultiParagraphIntrinsics(
    val annotatedString: AnnotatedString,
    style: TextStyle,
    val placeholders: List<AnnotatedString.Range<Placeholder>>,
    density: Density,
    fontFamilyResolver: FontFamily.Resolver,
) : ParagraphIntrinsics

Calculates and provides the intrinsic width and height of text that contains ParagraphStyle.

Parameters

annotatedStringthe text to be laid out
stylethe TextStyle to be applied to the whole text
placeholdersa list of Placeholders that specify ranges of text which will be skipped during layout and replaced with Placeholder. It's required that the range of each Placeholder doesn't cross paragraph boundary, otherwise IllegalArgumentException is thrown.
densitydensity of the device
fontFamilyResolverFont.ResourceLoader to be used to load the font given in SpanStyles

Secondary Constructors

constructor(
    annotatedString: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    density: Density,
    resourceLoader: Font.ResourceLoader,
) : this(
    annotatedString,
    style,
    placeholders,
    density,
    createFontFamilyResolver(resourceLoader),
)