TX Sheet Control

resolveFontFace Type

Interface

Public type for resolveFontFace.

Package: @txtextcontrol/tx-sheet-control-server. Version: 2.0.0.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

Syntax

resolveFontFace<Family extends { family: string; faces: readonly FontFaceSource[]; }>(families: readonly Family[], style: { fontFamily?: string; bold?: boolean; italic?: boolean; }, shouldFallback?: boolean): { family: Family; face: Family["faces"][number]; } | null

Parameters

ParameterTypeOptionalDescription
familiesreadonly Family[]NoRuntime descriptors, including at least one available face per family.
style{ fontFamily?: string; bold?: boolean; italic?: boolean; }NoWorkbook font metadata; an omitted family uses the default document family.
shouldFallbackboolean | undefinedYesAllows temporary display substitution. PDF preflight passes false.

Return Value

{ family: Family; face: Family["faces"][number]; } | null.

Examples

Pass the resolveFontFace value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

function inspectresolveFontFace(resolveFontFace: { value: unknown }) {
    const value = resolveFontFace;
    console.log('resolveFontFace.value', value);
}

See Also