Whether layout dropped content past the style's maxLines.
Distance from the top of the paragraph down to the first line's alphabetic baseline -- the line Latin glyphs rest on.
🧪 Not in CanvasKit.
The distance from the paragraph's top edge to the first line's baseline, which is what to add to a y coordinate to place text by its baseline rather than by its top.
The same number as getLineMetrics()[0].ascent, and 0 for an empty
paragraph, which has no first line to measure.
The text position nearest (x, y), in coordinates relative to the
paragraph's top-left corner -- what a click maps to when placing a
caret. affinity says which side of the offset the point fell on.
Total height of the laid-out lines, in pixels.
Distance from the top of the paragraph down to the first line's ideographic baseline, which sits below the alphabetic one.
One LineMetrics entry per laid-out line, in order.
Width of the widest line actually produced -- the tight bounding box, normally narrower than the width layout was given.
The width that would fit every line without wrapping. Laying out any wider changes nothing.
The width passed to layout, not the width the text came out at.
The width of the widest unbreakable word. Laying out any narrower changes nothing, since there is nowhere left to break.
Number of laid-out lines.
Bounding boxes of the inline placeholders, in insertion order --
the readback counterpart to ParagraphBuilder.addPlaceholder.
The boxes covering text positions start up to end, as a selection
highlight would draw them. One box per line the range touches, or per
direction run within a line in bidirectional text.
hStyle chooses how tall each box is: 0 tight to the glyphs (the
default), 1 the full line height, 2, 3 and 4 distributing line
spacing to the middle, top and bottom, and 5 the strut's height.
wStyle is 0 for tight or 1 to stretch the last box of a line to
the layout width.
OptionalhStyle: RectHeightStyleValueOptionalwStyle: RectWidthStyleValueCodepoints no font in the collection could resolve (tofu / missing glyphs), for validating automated multi-language renders.
Breaks the text into lines at width pixels.
Required before drawing or measuring: every getter below, and CanvasRenderingContext2D.drawParagraph, depends on it. Drawing an un-laid-out paragraph is a silent no-op. Safe to call again with a different width to re-wrap.
A shaped block of text, built by ParagraphBuilder and painted with CanvasRenderingContext2D.drawParagraph.
Nothing here reports anything useful until Paragraph.layout has run.
🧪 Not in the HTML Canvas standard.