FontManager Class
Loads document fonts and exposes font choices, layout metrics and deterministic document rendering assets.
Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.
ES module import: import { FontManager } from '@txtextcontrol/tx-sheet-control';.
Constructor
new FontManager(options?: FontManagerOptions): FontManagerInstance
| Parameter | Type | Optional | Description |
|---|---|---|---|
options | FontManagerOptions | undefined | Yes | Supported settings for this operation; omitted settings retain documented defaults. |
Returns: FontManagerInstance.
Members
Properties
| Property | Description |
|---|---|
| ready | Resolves after runtime catalog discovery. Rejects on missing or malformed catalogs. |
Methods
| Method | Description |
|---|---|
| choices | The choices operation of FontManager. |
| ensureStyle | The ensureStyle operation of FontManager. |
| ensureWorkbook | The ensureWorkbook operation of FontManager. |
| onChange | The onChange operation of FontManager. |
| state | The state operation of FontManager. |
Examples
Pass the FontManager value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.
import type { FontManager } from '@txtextcontrol/tx-sheet-control';
async function inspectFontManagerReady(fontManager: FontManager) {
const value = await fontManager['ready'];
console.log('FontManager.ready', value);
}