Skip to content

textmode.js / TextmodeOptions

Type Alias: TextmodeOptions

ts
type TextmodeOptions = object;

Options for creating a Textmodifier instance.

Properties

fontSize?

ts
optional fontSize: number;

The font size to use for text rendering. Defaults to 16.


fontSource?

ts
optional fontSource: string;

URL or path to a custom font file (.otf/.ttf). Required when using minified builds that don't include embedded fonts. Optional for full builds (will override embedded font if provided).


frameRate?

ts
optional frameRate: number;

Maximum frames per second for auto rendering. Defaults to 60.


height?

ts
optional height: number;

The height of the canvas in standalone mode. Defaults to 600.


renderMode?

ts
optional renderMode: "manual" | "auto";

Automatic rendering mode. Defaults to 'auto'.

  • 'manual': Requires manual render() calls
  • 'auto': Automatically renders using requestAnimationFrame

width?

ts
optional width: number;

The width of the canvas in standalone mode. Defaults to 800.