FontManager

See source code
Table of contents
class FontManager {}

Constructor

Constructs a new instance of the FontManager class

Parameters

NameDescription

editor

Editor

assetUrls

  | {
      [key: string]: string | undefined
    }
  | undefined

Methods

ensureFontIsLoaded( )

ensureFontIsLoaded(font: TLFontFace): Promise<void>

Parameters

NameDescription

font

Returns

Promise<void>

getShapeFontFaces( )

getShapeFontFaces(shape: TLShape | TLShapeId): TLFontFace[]

Parameters

NameDescription

shape

Returns


loadRequiredFontsForCurrentPage( )

loadRequiredFontsForCurrentPage(limit?: number): Promise<void>

Parameters

NameDescription

limit

number

Returns

Promise<void>

requestFonts( )

requestFonts(fonts: TLFontFace[]): void

Parameters

NameDescription

fonts

Returns

void

toEmbeddedCssDeclaration( )

toEmbeddedCssDeclaration(font: TLFontFace): Promise<string>

Parameters

NameDescription

font

Returns

Promise<string>

trackFontsForShape( )

trackFontsForShape(shape: TLShape | TLShapeId): void

Parameters

NameDescription

shape

Returns

void

Prev
ErrorBoundary
Next
Geometry2d