Interface: RichTextOptions
Options for laying out a paragraph of inline rich-text runs. Coordinates and width behave like TextBlockOptions; the style fields supply defaults inherited by any InlineTextRun that omits them.
Horizontal writing mode supports left/center/right/justify alignment and left-to-right or right-to-left ordering. Vertical writing mode stacks the runs in a single column.
Properties
| Property | Type | Description |
|---|---|---|
align? | "left" | "center" | "right" | "justify" | Horizontal alignment of each line. Defaults to "left". Ignored in vertical mode. |
color? | ColorInput | Default color for runs that omit one. |
direction? | TextDirection | Reading direction for the runs. "auto" detects from the run text. Right-to-left lays each line out from the right edge; this is line-level direction, not full mixed-direction bidirectional reordering. |
font? | PdfFont | Default font for runs that omit one. |
fontSize? | number | Default font size for runs that omit one. |
height? | number | Box height in PDF points. With verticalAlign, the wrapped lines are positioned within a box of this height starting at y and extending downward. Has no effect unless verticalAlign is given. Horizontal mode only. |
kerning? | boolean | Default kerning behavior for runs that omit it. |
lineHeight? | number | Line height in PDF points (column spacing in vertical mode). Defaults to 1.2 × the largest run font size. |
structure? | PdfStructureOptions | Additional structure metadata for tagged PDF output. |
tag? | PdfTextStructureTag | "Artifact" | Structure tag used for tagged PDF output. Defaults to "P". |
verticalAlign? | VerticalAlign | Vertical alignment of the wrapped runs within height. Requires height. Defaults to "top". Horizontal mode only. |
width | number | Width in PDF points that runs wrap within (horizontal mode). |
writingMode? | "horizontal" | "vertical" | Writing mode. "horizontal" (default) flows runs left-to-right and wraps onto new lines. "vertical" stacks the runs top-to-bottom in one column. |
x | number | Horizontal position in PDF points. |
y | number | Vertical position (baseline of the first line, or top of the column in vertical mode) in PDF points. |