opentype.features.js
Version:
Library to list opentype fonts optional features.
29 lines (28 loc) • 973 B
TypeScript
export declare enum FeatureType {
None = 0,
Hidden = 1,
DefaultOff = 16,
DefaultOn = 32
}
export interface Feature {
tag: string;
description: string;
options: string[];
alternateCharacters: string[];
type?: FeatureType;
}
export interface RegisteredFeature {
tag: string;
description: string;
type?: FeatureType;
}
export default class Features {
static getFeaturesFromFile(file: string): Promise<Feature[]>;
static getFeaturesFromUrl(url: string): Promise<Feature[] | null>;
static getFeaturesFromArrayBuffer(buffer: ArrayBuffer): Promise<Feature[]>;
static _getFeaturesFromFont(font: any): Promise<Feature[]>;
static _lookupCodePoints(glyphIndexMap: any, lookupListIndexes: number[]): string[];
static lookupTypeFlags(tag: string): FeatureType | undefined;
static lookupRegisteredTags(tag: string): string | undefined;
static _lookupData: RegisteredFeature[];
}