@mocanvas/mocanvas · function

getNoteBaseFontSize

declare function getNoteBaseFontSize(shape: {
    props?: unknown;
}, theme?: TLTheme): number

The label's size before any shrinking: the size style, scaled.

This is the denominator a fontSizeAdjustment is a fraction of, so anything that *writes* one — a host fitting text to the square and recording how far it had to shrink — needs this rather than the size the label ends up at. Published as labelBaseFontSize for exactly that reason.

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.