import { ClassDefTable } from './common/classdef.ts'; import { CoverageTable } from './common/coverage.ts'; /** * Glyph class values as defined by the GDEF table. */ export declare const GlyphClass: { readonly Base: 1; readonly Ligature: 2; readonly Mark: 3; readonly Component: 4; }; export type GlyphClass = (typeof GlyphClass)[keyof typeof GlyphClass]; /** * The 'GDEF' table contains glyph classification and other information * used by OpenType layout processing (GSUB/GPOS). * * See https://learn.microsoft.com/en-us/typography/opentype/spec/gdef */ export declare class GdefTable { /** * Classifies glyphs as Base (1), Ligature (2), Mark (3), or Component (4). * Glyphs not listed default to class 0 (undefined class). */ readonly glyphClassDef: ClassDefTable | undefined; /** * Maps mark glyphs to attachment classes. Used by the * MARK_ATTACHMENT_CLASS_FILTER in lookup flags. */ readonly markAttachClassDef: ClassDefTable | undefined; /** * Array of mark glyph sets, each defined by a CoverageTable. * Referenced by the USE_MARK_FILTERING_SET lookup flag. */ readonly markGlyphSets: ReadonlyArray | undefined; /** * Reads a 'GDEF' table from the given DataView. */ static read(data: DataView): GdefTable; private constructor(); /** * Returns the glyph class for a given glyph ID. * Returns 0 if the glyph has no class assigned. */ getGlyphClass(glyphId: number): number; /** * Returns the mark attachment class for a given glyph ID. * Returns 0 if the glyph has no mark attachment class. */ getMarkAttachClass(glyphId: number): number; /** * Checks whether a glyph is in the specified mark glyph set. */ isMarkInSet(glyphId: number, setIndex: number): boolean; }