Skip to content
Shapemetry

Types - TextStyle

API reference for ./evaluate/textStyle on @huukhanhnguyen/types.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

TextStyle

type

Produced by collectTextStyleNodes() from an authored textStyle node's expression args; consumed BY NAME (identity: "name", matching materials / layers / styles).

type TextStyle
// = {
    name: string;
    /** A url-method parameter key naming an attached font file (the asset
     *  mechanism `assetTypeOf` already resolves), OR a family name the reader
     *  looks up itself. Absent = the reader's own default face. */
    font?: string;
    /** Cap height in MODEL units — the size a drafter states. */
    height: number;
    /** Horizontal stretch, 1 = natural (DXF group code 41). */
    widthFactor?: number;
    /** Slant in degrees, 0 = upright (DXF group code 50). */
    oblique?: number;
}
Last updated: 📖 1 min readEdit on GitHub