@mocanvas/editor · interface

TLFontFaceSource

interface TLFontFaceSource

Where the bytes of one font face come from.

An object rather than a raw CSS src string so the format can be stated separately: a browser that is told format("woff2") up front can skip a face it cannot use without fetching it, and a URL alone gives it nothing to go on.


Properties · 2

format?: string | undefined

The CSS format() hint — "woff2", "truetype", and so on.

url: string

Absolute or document-relative URL of the font file.

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.