SheetXL - v1.0.2
    Preparing search index...

    Interface AdvanceTable

    One face's measures, serving every size: what IFontCollection.getByName answers with.

    Advances are per em and vertical metrics follow GDI, so a table measures as Excel does: a shipped face measures GDI's hinted whole pixels. Tables are built by the collection from the shipped files or the platform; they are read here, never made or changed.

    interface AdvanceTable {
        family: string;
        isHinted: boolean;
        italic: boolean;
        size: number;
        typoLine: number | null;
        weight: number;
        advance(codepoint: number): number | undefined;
        measure(
            text: string,
            px: number,
            options?: MeasureOptions,
        ): ExtendedMetrics;
        metrics(px: number): Metrics;
        missing(text: string): string[];
        strikeout(px: number): LineRule | null;
        underline(px: number): LineRule | null;
        width(text: string, px: number, options?: WidthOptions): number;
    }
    Index
    family: string

    The family the table measures, as a style names it.

    isHinted: boolean

    Whether widths are GDI's hinted whole pixels.

    italic: boolean
    size: number

    The number of characters with an advance.

    typoLine: number | null

    The height of a line per em by the font's typo metrics (ascent less descent plus line gap), for a font that asks for them; null otherwise. DirectWrite lays a line out this tall, so Excel's charts do.

    weight: number

    The CSS weight, 400 regular and 700 bold.

    • The advance of codepoint per em, or undefined when the table has none.

      Parameters

      • codepoint: number

      Returns number | undefined

    • The face's whole-px vertical metrics at px pixels per em: GDI's ascent and descent, and a line as tall as the font's own metrics ask.

      Parameters

      • px: number

      Returns Metrics

    • The characters of text with no advance, each once, in first-seen order.

      Parameters

      • text: string

      Returns string[]

    • The underline at px: its center's offset above the baseline (negative below) and its thickness, in px; null when the source did not record one.

      Parameters

      • px: number

      Returns LineRule | null

    • The advance width of text in px at px pixels per em: the advances summed, then the super/subscript scale, then letterSpacing between characters.

      Parameters

      Returns number