API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classFontFactory

@codexo/exojs / resources / stable

AssetFactory implementation that loads web-font binary data (WOFF, WOFF2, TTF, OTF) and produces a parsed FontFace. By default each created font is registered with `document.fonts`, making it globally available to CSS and Canvas without any further steps. Fonts added this way are automatically removed from `document.fonts` when FontFactory.destroy is called.

1
props
5
methods
0
events
Import
import { FontFactory } from '@codexo/exojs'

AssetFactory implementation that loads web-font binary data (WOFF, WOFF2, TTF, OTF) and produces a parsed FontFace.

By default each created font is registered with `document.fonts`, making it globally available to CSS and Canvas without any further steps. Fonts added this way are automatically removed from `document.fonts` when FontFactory.destroy is called.

Constructors 1
new(): FontFactory
Methods 5
create(source: ArrayBuffer, options?: FontFactoryOptions): Promise<FontFace>
createObjectUrl(blob: Blob): string
destroy(): void
process(response: Response): Promise<ArrayBuffer>
revokeObjectUrl(objectUrl: string): void
Properties 1
storageName: "font"
Source