@mocanvas/mocanvas · interface

TLTypeFace

interface TLTypeFace

A font file to load, as preloadFont takes it.

Distinct from TLFontFace, which carries a ready-made CSS src descriptor: this one names a URL and a format and lets the loader build the descriptor, which is what an app that just wants to point at a .woff2 needs.


Properties · 9

display?: FontDisplay

font-display descriptor.

featureSettings?: string

font-feature-settings descriptor.

format?: string

Font format hint, e.g. "woff2". Appended to the src descriptor when given.

stretch?: string

font-stretch descriptor.

style?: string

font-style descriptor.

unicodeRange?: string

unicode-range descriptor.

url: string

Where the font file is.

variant?: string

font-variant descriptor.

weight?: string

font-weight descriptor.

Mentioned here

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.