wrapRuns()
function wrapRuns( runs, maxWidth, font, measurer, wordWrap?): LayoutTextRun[][];Wraps styled runs into lines that fit maxWidth points, with the same
rules as wrapText (explicit breaks, breaks at spaces, long words split
by character). Each run is measured with its own bold/italic font.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
runs |
LayoutTextRun[] |
undefined |
maxWidth |
number |
undefined |
font |
FontSpec |
undefined |
measurer |
TextMeasurer |
undefined |
wordWrap |
boolean |
true |
Returns
Section titled “Returns”LayoutTextRun[][]