VMPrint API Reference - v1.0.0
    Preparing search index...

    Type Alias TextSegment

    type TextSegment = {
        ascent?: number;
        descent?: number;
        direction?: "ltr" | "rtl";
        fontFamily?: string;
        forcedBreakAfter?: boolean;
        glyphs?: { char: string; x: number; y: number }[];
        inlineMetrics?: InlineObjectMetrics;
        inlineObject?: InlineObjectSegment;
        justifyAfter?: number;
        linkTarget?: string;
        scriptClass?: string;
        shapedGlyphs?: ShapedGlyph[];
        style?: Record<string, any>;
        text: string;
        width?: number;
    }
    Index

    Properties

    ascent?: number
    descent?: number
    direction?: "ltr" | "rtl"
    fontFamily?: string
    forcedBreakAfter?: boolean
    glyphs?: { char: string; x: number; y: number }[]

    Per-glyph positions from fontkit layout, used for LTR kerned text.

    inlineMetrics?: InlineObjectMetrics
    inlineObject?: InlineObjectSegment
    justifyAfter?: number
    linkTarget?: string
    scriptClass?: string
    shapedGlyphs?: ShapedGlyph[]

    Raw shaped glyph data from fontkit layout for RTL / CTL text. Carries the correct contextual glyph IDs (e.g. uni0627.fina vs uni0627) that must be emitted directly to PDF without re-running shaping.

    style?: Record<string, any>
    text: string
    width?: number