pdf-lite - v1.7.3
    Preparing search index...

    Interface FontParser

    Common interface for all font parsers.

    interface FontParser {
        getCharWidths(firstChar: number, lastChar: number): number[];
        getFontData(): ByteArray;
        getFontDescriptor(fontName?: string): FontDescriptor;
        getFontInfo(): TtfFontInfo;
        parseCmap(): Map<number, number>;
        parseHmtx(): Map<number, number>;
    }

    Implemented by

    Index

    Methods

    • Parses the font's cmap table to extract Unicode to glyph ID mappings.

      Returns Map<number, number>

      A map from Unicode code points to glyph IDs

    • Parses the font's hmtx table to extract glyph advance widths.

      Returns Map<number, number>

      A map from glyph IDs to advance widths (in font units)