typesetText
Typesets spans into boxes using Knuth-Plass line breaking. Text flows from one box to the next, text that does not fit in any of the boxes is discarded.
Typesetting only computes glyph positions, it does not draw. Use SlugTextDrawer to draw text or VectorTextDrawer to produce glyph outlines.
Return
the typeset lines, in order
Parameters
the style that is cascaded into the style of every span, layout properties (line height, alignment, justification, direction) are taken from the style of the first span
Typesets spans into shapes using Knuth-Plass line breaking. Every shape is filled from top to bottom with lines spaced by the line height, a line is placed where the full height of the line (from ascent to descent of the face of the first span) fits inside the shape. Where a shape is interrupted, by a hole or a concave part, a single baseline can hold multiple lines, these are filled from left to right, or from right to left for right-to-left paragraphs. Parts narrower than the line height are skipped. Text flows from one shape to the next, text that does not fit in any of the shapes is discarded.
Vertical alignment moves the text in every shape down by the vertical alignment times the largest distance it can be moved down without the shape holding less text. For a rectangle this is the same as the vertical alignment in a box. A shape that is filled and passes text on to the next shape can usually move less than a line.
Typesetting only computes glyph positions, it does not draw. Use SlugTextDrawer to draw text or VectorTextDrawer to produce glyph outlines.
Return
the typeset lines, in order, TypesetLine.boxIndex is the index of the shape
Parameters
the style that is cascaded into the style of every span, layout properties (line height, alignment, justification, direction) are taken from the style of the first span