textmode.js / Textmodifier / print
Method: print()
ts
print(
str,
x,
y,
options?): void;Print a string of text onto the active drawing layer.
Supports custom leading, letter spacing, tab size, and inline BBCode-style formatting tags like [fg=red], [bg=color], [inv], [rot=90], [fx], [fy], and their closing tags.
Parameters
| Parameter | Type | Description |
|---|---|---|
str | string | The text string to print. |
x | number | Coordinate along the horizontal axis in cells. |
y | number | Coordinate along the vertical axis in cells. |
options? | { leading?: number; letterSpacing?: number; markup?: boolean; tabSize?: number; } | Optional printing configurations. |
options.leading? | number | Distance between printed lines in cells. |
options.letterSpacing? | number | Extra horizontal spacing between characters in cells. |
options.markup? | boolean | Whether to parse inline BBCode-style formatting tags. |
options.tabSize? | number | Number of spaces used for tab characters. |
Returns
void