DefaultFontFamilies
Mapping of font style names to their corresponding CSS font-family declarations. These are the actual CSS font families used when rendering text with each font style.
DefaultFontFamilies: {
draw: string;
mono: string;
sans: string;
serif: string;
};Example
import { DefaultFontFamilies, TLDefaultFontStyle } from "@tldraw/tlschema";
// Get CSS font family for a font style
const fontStyle: TLDefaultFontStyle = "mono";
const cssFamily = DefaultFontFamilies[fontStyle]; // "'tldraw_mono', monospace"
// Apply to DOM element
element.style.fontFamily = DefaultFontFamilies.sans;Prev
DefaultFillStyleNext
DefaultFontStyle