UNPKG

fontjs

Version:

FontJS (Font.js) is a packages for TrueType font parsing and manipulation

34 lines (33 loc) 1.16 kB
import { SeqStream } from "bytestreamjs"; import { Glyph } from "../GLYF/Glyph"; import { CMAPLanguage, CMAPSubTable, CMAPSubTableParameters, GlyphMap } from "./CMAPSubTable"; export interface Format0Parameters extends CMAPSubTableParameters { language?: number; glyphIndexArray?: number[]; } /** * Representation of Format 0. Byte encoding table * @see https://docs.microsoft.com/en-us/typography/opentype/spec/cmap#format-0-byte-encoding-table */ export declare class Format0 extends CMAPSubTable implements CMAPLanguage { protected onGetGlyphMap(): GlyphMap; /** * Format number is set to 0 */ get format(): 0; language: number; /** * An array that maps character codes to glyph index values */ glyphIndexArray: number[]; constructor(parameters?: Format0Parameters); static get className(): string; toStream(stream: SeqStream): boolean; static fromStream(stream: SeqStream): Format0; /** * Make Format0 table directly from array of code points * @param language * @param glyphs Array of glyphs */ static fromGlyphs(language: number, glyphs: Glyph[]): Format0; }