TLDefaultFontStyle
The names of all available font styles, derived from TLThemeFonts. Extend TLThemeFonts to add custom font names.
type TLDefaultFontStyle = keyof TLThemeFonts & string;Example
import { TLDefaultFontStyle } from "@tldraw/tlschema";
// Valid font style values
const drawFont: TLDefaultFontStyle = "draw";
const sansFont: TLDefaultFontStyle = "sans";
const serifFont: TLDefaultFontStyle = "serif";
const monoFont: TLDefaultFontStyle = "mono";
// Use in a function parameter
function setTextFont(font: TLDefaultFontStyle) {
// Apply font style to text
}Prev
TLDefaultFillStyleNext
TLDefaultHorizontalAlignStyle