@mocanvas/editor · interface

RichTextFontVisitorState

interface RichTextFontVisitorState

The font a piece of text is currently in, as the walk carries it down the tree.

Threaded rather than recomputed because formatting nests: a bold run inside an italic paragraph needs both, and the only place that is known is on the way down.


Properties · 3

family: string

The CSS family in force, e.g. tldraw_draw.

style: string

The style in force, as a CSS font-style value.

weight: string

The weight in force, as a CSS font-weight value.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.