@mocanvas/mocanvas · interface

RichTextFontState

interface RichTextFontState

The font a rich-text node is drawn in, carried down the document tree.

A visitor gets its parent's state, may change it, and returns what its own children should inherit — which is how a <strong> inside a paragraph ends up bold without the paragraph knowing anything about it.

SEMANTICS-ASSUMED: the documented spelling is @tldraw/editor's RichTextFontVisitorState, which mocanvas does not export yet. The three fields below are the ones the documented usage passes ({ family: "tldraw_draw", weight: "normal", style: "normal" }), so the two are structurally the same object.


Properties · 3

family: string
style: string
weight: string

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.