Layout class
@exports opentype.Layout @class
- Implementers
Constructors
- Layout(dynamic font, dynamic tableName)
Properties
Methods
-
binSearch(
dynamic arr, dynamic value) → dynamic -
createDefaultTable(
) → dynamic -
expandCoverage(
dynamic coverageTable) → dynamic - Returns the list of glyph indexes of a coverage table. Format 1: the list is stored raw Format 2: compact list as range records. @instance @param {Object} coverageTable @return {Array}
-
getCoverageIndex(
dynamic coverageTable, dynamic glyphIndex) → dynamic - Find a glyph in a coverage table https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#coverage-table @param {object} coverageTable - an OpenType Layout coverage table @param {number} glyphIndex - the index of the glyph to find @returns {number} -1 if not found
-
getDefaultScriptName(
) → dynamic - Returns the best bet for a script name. Returns 'DFLT' if it exists. If not, returns 'latn' if it exists. If neither exist, returns undefined.
-
getFeatureTable(
dynamic script, dynamic language, dynamic feature, bool create) → dynamic -
Get a specific feature table.
@instance
@param {string}
script='DFLT'
@param {string}language='dlft'
@param {string} feature - One of the codes listed at https://www.microsoft.com/typography/OTSPEC/featurelist.htm @param {boolean} create - forces the creation of the feature table if it doesn't exist. @return {Object} -
getGlyphClass(
dynamic classDefTable, dynamic glyphIndex) → dynamic - Find a glyph in a class definition table https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#class-definition-table @param {object} classDefTable - an OpenType Layout class definition table @param {number} glyphIndex - the index of the glyph to find @returns {number} -1 if not found
-
getLangSysTable(
dynamic script, dynamic language, bool create) → dynamic -
Returns a language system table
@instance
@param {string}
script='DFLT'
@param {string}language='dlft'
@param {boolean} create - forces the creation of this langSysTable if it doesn't exist. @return {Object} -
getLookupTables(
dynamic script, dynamic language, dynamic feature, dynamic lookupType, bool create) → dynamic -
Get the lookup tables of a given type for a script/language/feature.
@instance
@param {string}
script='DFLT'
@param {string}language='dlft'
@param {string} feature - 4-letter feature code @param {number} lookupType - 1 to 9 @param {boolean} create - forces the creation of the lookup table if it doesn't exist, with no subtables. @return {Object[]} -
getScriptNames(
) → dynamic - Returns all scripts in the substitution table. @instance @return {Array}
-
getScriptTable(
dynamic script, dynamic create) → dynamic -
Returns all LangSysRecords in the given script.
@instance
@param {string}
script='DFLT'
@param {boolean} create - forces the creation of this script table if it doesn't exist. @return {Object} An object with tag and script properties. -
getTable(
bool create) → dynamic - Get or create the Layout table (GSUB, GPOS etc). @param {boolean} create - Whether to create a new one. @return {Object} The GSUB or GPOS table.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchTag(
dynamic arr, dynamic tag) → dynamic -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited