API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classFontFactory
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.
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.
new(): FontFactory create(source: ArrayBuffer, options?: FontFactoryOptions): Promise<FontFace> createObjectUrl(blob: Blob): string destroy(): void process(response: Response): Promise<ArrayBuffer> revokeObjectUrl(objectUrl: string): void storageName: "font"