TX Sheet Control

FontAsset.priority Property

Property

Higher priorities take precedence for matching faces of the same family, weight and style.

Syntax

priority?: number;

Example

import { FontRegistry } from '@txtextcontrol/tx-sheet-control';

function invoiceFonts(bytes : Uint8Array) {
    const fonts = new FontRegistry();
    fonts.add({ family: 'Invoice Sans', bytes, priority: 1, fallback: false });
    return fonts.shape('Invoice 2026', '12px \"Invoice Sans\"');
}