Hosanna UI API v2.3.0-next
    Preparing search index...

    Interface SimpleTextSizeParams

    Parameters for measuring text size with a SimpleLabel (fontUri / fontSize).

    interface SimpleTextSizeParams {
        color?: IColor;
        fontKey?: string;
        fontSize: number;
        fontStyleKey?: string;
        fontUri: string;
        horizOrigin?: SGSimpleLabelHorizOrigin;
        size: number[];
        text: string;
        vertOrigin?: SGSimpleLabelVertOrigin;
    }
    Index

    Properties

    color?: IColor

    Text color (optional; included for cache consistency when set on renderer).

    fontKey?: string

    Optional font key (uri,size) — used when fontUri is empty.

    fontSize: number

    Font size in points.

    fontStyleKey?: string

    Optional style key resolving to a font key — used when fontUri is empty.

    fontUri: string

    Built-in font:* name or pkg: font path.

    Horizontal anchor (matches ISGNSimpleLabel.horizOrigin).

    size: number[]

    Constraint size [width, height]; use 0 for intrinsic axis.

    text: string

    Text to measure.

    Vertical anchor (matches ISGNSimpleLabel.vertOrigin).