Current File : //home/tradevaly/www/node_modules/fontkit/index.js.map
{"version":3,"file":null,"sources":["src/base.js","src/decorators.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/encodings.js","src/tables/name.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFIndex.js","src/cff/CFFOperand.js","src/cff/CFFDict.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/opentype.js","src/tables/variations.js","src/cff/CFFTop.js","src/cff/CFFFont.js","src/tables/VORG.js","src/tables/EBDT.js","src/tables/EBLC.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/aat.js","src/tables/bsln.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/tables/index.js","src/tables/directory.js","src/utils.js","src/CmapProcessor.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/glyph/BBox.js","src/layout/Script.js","src/layout/GlyphRun.js","src/layout/GlyphPosition.js","src/aat/AATFeatureMap.js","src/aat/AATLookupTable.js","src/aat/AATStateMachine.js","src/aat/AATMorxProcessor.js","src/aat/AATLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/GlyphIterator.js","src/opentype/OTProcessor.js","src/opentype/GlyphInfo.js","src/opentype/shapers/HangulShaper.js","src/opentype/shapers/indic-data.js","src/opentype/shapers/IndicShaper.js","src/opentype/shapers/UniversalShaper.js","src/opentype/shapers/index.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/opentype/OTLayoutEngine.js","src/layout/LayoutEngine.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/Glyph.js","src/glyph/TTFGlyph.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/TTFSubset.js","src/subset/CFFSubset.js","src/TTFFont.js","src/tables/WOFFDirectory.js","src/WOFFFont.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/WOFF2Font.js","src/TrueTypeCollection.js","src/DFont.js","src/index.js"],"sourcesContent":["import r from 'restructure';\nconst fs = require('fs');\n\nvar fontkit = {};\nexport default fontkit;\n\nfontkit.logErrors = false;\n\nlet formats = [];\nfontkit.registerFormat = function(format) {\n  formats.push(format);\n};\n\nfontkit.openSync = function(filename, postscriptName) {\n  let buffer = fs.readFileSync(filename);\n  return fontkit.create(buffer, postscriptName);\n};\n\nfontkit.open = function(filename, postscriptName, callback) {\n  if (typeof postscriptName === 'function') {\n    callback = postscriptName;\n    postscriptName = null;\n  }\n\n  fs.readFile(filename, function(err, buffer) {\n    if (err) { return callback(err); }\n\n    try {\n      var font = fontkit.create(buffer, postscriptName);\n    } catch (e) {\n      return callback(e);\n    }\n\n    return callback(null, font);\n  });\n\n  return;\n};\n\nfontkit.create = function(buffer, postscriptName) {\n  for (let i = 0; i < formats.length; i++) {\n    let format = formats[i];\n    if (format.probe(buffer)) {\n      let font = new format(new r.DecodeStream(buffer));\n      if (postscriptName) {\n        return font.getFont(postscriptName);\n      }\n\n      return font;\n    }\n  }\n\n  throw new Error('Unknown font format');\n};\n\nfontkit.defaultLanguage = 'en';\nfontkit.setDefaultLanguage = function(lang = 'en') {\n  fontkit.defaultLanguage = lang;\n};","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n  if (descriptor.get) {\n    let get = descriptor.get;\n    descriptor.get = function() {\n      let value = get.call(this);\n      Object.defineProperty(this, key, { value });\n      return value;\n    };\n  } else if (typeof descriptor.value === 'function') {\n    let fn = descriptor.value;\n\n    return {\n      get() {\n        let cache = new Map;\n        function memoized(...args) {\n          let key = args.length > 0 ? args[0] : 'value';\n          if (cache.has(key)) {\n            return cache.get(key);\n          }\n\n          let result = fn.apply(this, args);\n          cache.set(key, result);\n          return result;\n        };\n\n        Object.defineProperty(this, key, {value: memoized});\n        return memoized;\n      }\n    };\n  }\n}\n","import r from 'restructure';\n\nlet SubHeader = new r.Struct({\n  firstCode:      r.uint16,\n  entryCount:     r.uint16,\n  idDelta:        r.int16,\n  idRangeOffset:  r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n  startCharCode:  r.uint32,\n  endCharCode:    r.uint32,\n  glyphID:        r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n  startUnicodeValue:  r.uint24,\n  additionalCount:    r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n  unicodeValue: r.uint24,\n  glyphID:      r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n  varSelector:    r.uint24,\n  defaultUVS:     new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n  nonDefaultUVS:  new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n  0: { // Byte encoding\n    length:     r.uint16,   // Total table length in bytes (set to 262 for format 0)\n    language:   r.uint16,   // Language code for this encoding subtable, or zero if language-independent\n    codeMap:    new r.LazyArray(r.uint8, 256)\n  },\n\n  2: { // High-byte mapping (CJK)\n    length:           r.uint16,\n    language:         r.uint16,\n    subHeaderKeys:    new r.Array(r.uint16, 256),\n    subHeaderCount:   t => Math.max.apply(Math, t.subHeaderKeys),\n    subHeaders:       new r.LazyArray(SubHeader, 'subHeaderCount'),\n    glyphIndexArray:  new r.LazyArray(r.uint16, 'subHeaderCount')\n  },\n\n  4: { // Segment mapping to delta values\n    length:           r.uint16,              // Total table length in bytes\n    language:         r.uint16,              // Language code\n    segCountX2:       r.uint16,\n    segCount:         t => t.segCountX2 >> 1,\n    searchRange:      r.uint16,\n    entrySelector:    r.uint16,\n    rangeShift:       r.uint16,\n    endCode:          new r.LazyArray(r.uint16, 'segCount'),\n    reservedPad:      new r.Reserved(r.uint16),       // This value should be zero\n    startCode:        new r.LazyArray(r.uint16, 'segCount'),\n    idDelta:          new r.LazyArray(r.int16, 'segCount'),\n    idRangeOffset:    new r.LazyArray(r.uint16, 'segCount'),\n    glyphIndexArray:  new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n  },\n\n  6: { // Trimmed table\n    length:         r.uint16,\n    language:       r.uint16,\n    firstCode:      r.uint16,\n    entryCount:     r.uint16,\n    glyphIndices:   new r.LazyArray(r.uint16, 'entryCount')\n  },\n\n  8: { // mixed 16-bit and 32-bit coverage\n    reserved: new r.Reserved(r.uint16),\n    length:   r.uint32,\n    language: r.uint16,\n    is32:     new r.LazyArray(r.uint8, 8192),\n    nGroups:  r.uint32,\n    groups:   new r.LazyArray(CmapGroup, 'nGroups')\n  },\n\n  10: { // Trimmed Array\n    reserved:       new r.Reserved(r.uint16),\n    length:         r.uint32,\n    language:       r.uint32,\n    firstCode:      r.uint32,\n    entryCount:     r.uint32,\n    glyphIndices:   new r.LazyArray(r.uint16, 'numChars')\n  },\n\n  12: { // Segmented coverage\n    reserved: new r.Reserved(r.uint16),\n    length:   r.uint32,\n    language: r.uint32,\n    nGroups:  r.uint32,\n    groups:   new r.LazyArray(CmapGroup, 'nGroups')\n  },\n\n  13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n    reserved: new r.Reserved(r.uint16),\n    length:   r.uint32,\n    language: r.uint32,\n    nGroups:  r.uint32,\n    groups:   new r.LazyArray(CmapGroup, 'nGroups')\n  },\n\n  14: { // Unicode Variation Sequences\n    length:       r.uint32,\n    numRecords:   r.uint32,\n    varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n  }\n});\n\nlet CmapEntry = new r.Struct({\n  platformID:  r.uint16,  // Platform identifier\n  encodingID:  r.uint16,  // Platform-specific encoding identifier\n  table:       new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n  version:      r.uint16,\n  numSubtables: r.uint16,\n  tables:       new r.Array(CmapEntry, 'numSubtables')\n});\n","import r from 'restructure';\n\n// font header\nexport default new r.Struct({\n  version:            r.int32,                   // 0x00010000 (version 1.0)\n  revision:           r.int32,                   // set by font manufacturer\n  checkSumAdjustment: r.uint32,\n  magicNumber:        r.uint32,                  // set to 0x5F0F3CF5\n  flags:              r.uint16,\n  unitsPerEm:         r.uint16,                  // range from 64 to 16384\n  created:            new r.Array(r.int32, 2),\n  modified:           new r.Array(r.int32, 2),\n  xMin:               r.int16,                   // for all glyph bounding boxes\n  yMin:               r.int16,                   // for all glyph bounding boxes\n  xMax:               r.int16,                   // for all glyph bounding boxes\n  yMax:               r.int16,                   // for all glyph bounding boxes\n  macStyle:           new r.Bitfield(r.uint16, [\n    'bold', 'italic', 'underline', 'outline',\n    'shadow', 'condensed', 'extended'\n  ]),\n  lowestRecPPEM:      r.uint16,                  // smallest readable size in pixels\n  fontDirectionHint:  r.int16,\n  indexToLocFormat:   r.int16,                   // 0 for short offsets, 1 for long\n  glyphDataFormat:    r.int16                    // 0 for current format\n});\n","import r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n  version:              r.int32,\n  ascent:               r.int16,   // Distance from baseline of highest ascender\n  descent:              r.int16,   // Distance from baseline of lowest descender\n  lineGap:              r.int16,   // Typographic line gap\n  advanceWidthMax:      r.uint16,  // Maximum advance width value in 'hmtx' table\n  minLeftSideBearing:   r.int16,   // Maximum advance width value in 'hmtx' table\n  minRightSideBearing:  r.int16,   // Minimum right sidebearing value\n  xMaxExtent:           r.int16,\n  caretSlopeRise:       r.int16,   // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n  caretSlopeRun:        r.int16,   // 0 for vertical\n  caretOffset:          r.int16,   // Set to 0 for non-slanted fonts\n  reserved:             new r.Reserved(r.int16, 4),\n  metricDataFormat:     r.int16,   // 0 for current format\n  numberOfMetrics:      r.uint16   // Number of advance widths in 'hmtx' table\n});\n","import r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n  advance: r.uint16,\n  bearing: r.int16\n});\n\nexport default new r.Struct({\n  metrics:    new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n  bearings:   new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n  version:                r.int32,\n  numGlyphs:              r.uint16,  // The number of glyphs in the font\n  maxPoints:              r.uint16,  // Maximum points in a non-composite glyph\n  maxContours:            r.uint16,  // Maximum contours in a non-composite glyph\n  maxComponentPoints:     r.uint16,  // Maximum points in a composite glyph\n  maxComponentContours:   r.uint16,  // Maximum contours in a composite glyph\n  maxZones:               r.uint16,  // 1 if instructions do not use the twilight zone, 2 otherwise\n  maxTwilightPoints:      r.uint16,  // Maximum points used in Z0\n  maxStorage:             r.uint16,  // Number of Storage Area locations\n  maxFunctionDefs:        r.uint16,  // Number of FDEFs\n  maxInstructionDefs:     r.uint16,  // Number of IDEFs\n  maxStackElements:       r.uint16,  // Maximum stack depth\n  maxSizeOfInstructions:  r.uint16,  // Maximum byte count for glyph instructions\n  maxComponentElements:   r.uint16,  // Maximum number of components referenced at “top level” for any composite glyph\n  maxComponentDepth:      r.uint16   // Maximum levels of recursion; 1 for simple components\n});\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n  if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n    return MAC_LANGUAGE_ENCODINGS[languageID];\n  }\n  \n  return ENCODINGS[platformID][encodingID];\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n  // unicode\n  ['utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be'],\n  \n  // macintosh\n  // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n  // 0\tRoman                 17\tMalayalam\n  // 1\tJapanese\t            18\tSinhalese\n  // 2\tTraditional Chinese\t  19\tBurmese\n  // 3\tKorean\t              20\tKhmer\n  // 4\tArabic\t              21\tThai\n  // 5\tHebrew\t              22\tLaotian\n  // 6\tGreek\t                23\tGeorgian\n  // 7\tRussian\t              24\tArmenian\n  // 8\tRSymbol\t              25\tSimplified Chinese\n  // 9\tDevanagari\t          26\tTibetan\n  // 10\tGurmukhi\t            27\tMongolian\n  // 11\tGujarati\t            28\tGeez\n  // 12\tOriya\t                29\tSlavic\n  // 13\tBengali\t              30\tVietnamese\n  // 14\tTamil\t                31\tSindhi\n  // 15\tTelugu\t              32\t(Uninterpreted)\n  // 16\tKannada\n  ['macroman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n   'macgreek', 'maccyrillic', 'symbol', 'Devanagari', 'Gurmukhi', 'Gujarati',\n   'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n   'Burmese', 'Khmer', 'macthai', 'Laotian', 'Georgian', 'Armenian', 'gb-2312-80', \n   'Tibetan', 'Mongolian', 'Geez', 'maccenteuro', 'Vietnamese', 'Sindhi'],\n  \n  // ISO (deprecated)\n  ['ascii'],\n  \n  // windows\n  // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n  ['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n  15: 'maciceland',\n  17: 'macturkish',\n  18: 'maccroatian',\n  24: 'maccenteuro',\n  25: 'maccenteuro',\n  26: 'maccenteuro',\n  27: 'maccenteuro',\n  28: 'maccenteuro',\n  30: 'maciceland',\n  37: 'macromania',\n  38: 'maccenteuro',\n  39: 'maccenteuro',\n  40: 'maccenteuro',\n  143: 'macinuit', // Unsupported by iconv-lite\n  146: 'macgaelic' // Unsupported by iconv-lite\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n  // unicode\n  [],\n  \n  { // macintosh\n    0: 'en',        30: 'fo',       60: 'ks',       90: 'rw',\n    1: 'fr',        31: 'fa',       61: 'ku',       91: 'rn',\n    2: 'de',        32: 'ru',       62: 'sd',       92: 'ny',\n    3: 'it',        33: 'zh',       63: 'bo',       93: 'mg',\n    4: 'nl',        34: 'nl-BE',    64: 'ne',       94: 'eo',\n    5: 'sv',        35: 'ga',       65: 'sa',       128: 'cy',\n    6: 'es',        36: 'sq',       66: 'mr',       129: 'eu',\n    7: 'da',        37: 'ro',       67: 'bn',       130: 'ca',\n    8: 'pt',        38: 'cz',       68: 'as',       131: 'la',\n    9: 'no',        39: 'sk',       69: 'gu',       132: 'qu',\n    10: 'he',       40: 'si',       70: 'pa',       133: 'gn',\n    11: 'ja',       41: 'yi',       71: 'or',       134: 'ay',\n    12: 'ar',       42: 'sr',       72: 'ml',       135: 'tt',\n    13: 'fi',       43: 'mk',       73: 'kn',       136: 'ug',\n    14: 'el',       44: 'bg',       74: 'ta',       137: 'dz',\n    15: 'is',       45: 'uk',       75: 'te',       138: 'jv',\n    16: 'mt',       46: 'be',       76: 'si',       139: 'su',\n    17: 'tr',       47: 'uz',       77: 'my',       140: 'gl',\n    18: 'hr',       48: 'kk',       78: 'km',       141: 'af',\n    19: 'zh-Hant',  49: 'az-Cyrl',  79: 'lo',       142: 'br',\n    20: 'ur',       50: 'az-Arab',  80: 'vi',       143: 'iu',\n    21: 'hi',       51: 'hy',       81: 'id',       144: 'gd',\n    22: 'th',       52: 'ka',       82: 'tl',       145: 'gv',\n    23: 'ko',       53: 'mo',       83: 'ms',       146: 'ga',\n    24: 'lt',       54: 'ky',       84: 'ms-Arab',  147: 'to',\n    25: 'pl',       55: 'tg',       85: 'am',       148: 'el-polyton',\n    26: 'hu',       56: 'tk',       86: 'ti',       149: 'kl',\n    27: 'es',       57: 'mn-CN',    87: 'om',       150: 'az',\n    28: 'lv',       58: 'mn',       88: 'so',       151: 'nn',\n    29: 'se',       59: 'ps',       89: 'sw',\n  },\n  \n  // ISO (deprecated)\n  [],\n  \n  { // windows                                        \n    0x0436: 'af',       0x4009: 'en-IN',    0x0487: 'rw',          0x0432: 'tn',       \n    0x041C: 'sq',       0x1809: 'en-IE',    0x0441: 'sw',          0x045B: 'si',          \n    0x0484: 'gsw',      0x2009: 'en-JM',    0x0457: 'kok',         0x041B: 'sk',          \n    0x045E: 'am',       0x4409: 'en-MY',    0x0412: 'ko',          0x0424: 'sl',          \n    0x1401: 'ar-DZ',    0x1409: 'en-NZ',    0x0440: 'ky',          0x2C0A: 'es-AR',       \n    0x3C01: 'ar-BH',    0x3409: 'en-PH',    0x0454: 'lo',          0x400A: 'es-BO',       \n    0x0C01: 'ar',       0x4809: 'en-SG',    0x0426: 'lv',          0x340A: 'es-CL',       \n    0x0801: 'ar-IQ',    0x1C09: 'en-ZA',    0x0427: 'lt',          0x240A: 'es-CO',       \n    0x2C01: 'ar-JO',    0x2C09: 'en-TT',    0x082E: 'dsb',         0x140A: 'es-CR',       \n    0x3401: 'ar-KW',    0x0809: 'en-GB',    0x046E: 'lb',          0x1C0A: 'es-DO',       \n    0x3001: 'ar-LB',    0x0409: 'en',       0x042F: 'mk',          0x300A: 'es-EC',       \n    0x1001: 'ar-LY',    0x3009: 'en-ZW',    0x083E: 'ms-BN',       0x440A: 'es-SV',       \n    0x1801: 'ary',      0x0425: 'et',       0x043E: 'ms',          0x100A: 'es-GT',       \n    0x2001: 'ar-OM',    0x0438: 'fo',       0x044C: 'ml',          0x480A: 'es-HN',       \n    0x4001: 'ar-QA',    0x0464: 'fil',      0x043A: 'mt',          0x080A: 'es-MX',       \n    0x0401: 'ar-SA',    0x040B: 'fi',       0x0481: 'mi',          0x4C0A: 'es-NI',       \n    0x2801: 'ar-SY',    0x080C: 'fr-BE',    0x047A: 'arn',         0x180A: 'es-PA',       \n    0x1C01: 'aeb',      0x0C0C: 'fr-CA',    0x044E: 'mr',          0x3C0A: 'es-PY',       \n    0x3801: 'ar-AE',    0x040C: 'fr',       0x047C: 'moh',         0x280A: 'es-PE',       \n    0x2401: 'ar-YE',    0x140C: 'fr-LU',    0x0450: 'mn',          0x500A: 'es-PR',       \n    0x042B: 'hy',       0x180C: 'fr-MC',    0x0850: 'mn-CN',       0x0C0A: 'es',          \n    0x044D: 'as',       0x100C: 'fr-CH',    0x0461: 'ne',          0x040A: 'es',          \n    0x082C: 'az-Cyrl',  0x0462: 'fy',       0x0414: 'nb',          0x540A: 'es-US',       \n    0x042C: 'az',       0x0456: 'gl',       0x0814: 'nn',          0x380A: 'es-UY',     \n    0x046D: 'ba',       0x0437: 'ka',       0x0482: 'oc',          0x200A: 'es-VE',       \n    0x042D: 'eu',       0x0C07: 'de-AT',    0x0448: 'or',          0x081D: 'sv-FI',       \n    0x0423: 'be',       0x0407: 'de',       0x0463: 'ps',          0x041D: 'sv',          \n    0x0845: 'bn',       0x1407: 'de-LI',    0x0415: 'pl',          0x045A: 'syr',         \n    0x0445: 'bn-IN',    0x1007: 'de-LU',    0x0416: 'pt',          0x0428: 'tg',          \n    0x201A: 'bs-Cyrl',  0x0807: 'de-CH',    0x0816: 'pt-PT',       0x085F: 'tzm',         \n    0x141A: 'bs',       0x0408: 'el',       0x0446: 'pa',          0x0449: 'ta',          \n    0x047E: 'br',       0x046F: 'kl',       0x046B: 'qu-BO',       0x0444: 'tt',          \n    0x0402: 'bg',       0x0447: 'gu',       0x086B: 'qu-EC',       0x044A: 'te',          \n    0x0403: 'ca',       0x0468: 'ha',       0x0C6B: 'qu',          0x041E: 'th',          \n    0x0C04: 'zh-HK',    0x040D: 'he',       0x0418: 'ro',          0x0451: 'bo',          \n    0x1404: 'zh-MO',    0x0439: 'hi',       0x0417: 'rm',          0x041F: 'tr',          \n    0x0804: 'zh',       0x040E: 'hu',       0x0419: 'ru',          0x0442: 'tk',          \n    0x1004: 'zh-SG',    0x040F: 'is',       0x243B: 'smn',         0x0480: 'ug',          \n    0x0404: 'zh-TW',    0x0470: 'ig',       0x103B: 'smj-NO',      0x0422: 'uk',          \n    0x0483: 'co',       0x0421: 'id',       0x143B: 'smj',         0x042E: 'hsb',         \n    0x041A: 'hr',       0x045D: 'iu',       0x0C3B: 'se-FI',       0x0420: 'ur',          \n    0x101A: 'hr-BA',    0x085D: 'iu-Latn',  0x043B: 'se',          0x0843: 'uz-Cyrl',     \n    0x0405: 'cs',       0x083C: 'ga',       0x083B: 'se-SE',       0x0443: 'uz',          \n    0x0406: 'da',       0x0434: 'xh',       0x203B: 'sms',         0x042A: 'vi',          \n    0x048C: 'prs',      0x0435: 'zu',       0x183B: 'sma-NO',      0x0452: 'cy',          \n    0x0465: 'dv',       0x0410: 'it',       0x1C3B: 'sms',         0x0488: 'wo',          \n    0x0813: 'nl-BE',    0x0810: 'it-CH',    0x044F: 'sa',          0x0485: 'sah',         \n    0x0413: 'nl',       0x0411: 'ja',       0x1C1A: 'sr-Cyrl-BA',  0x0478: 'ii',          \n    0x0C09: 'en-AU',    0x044B: 'kn',       0x0C1A: 'sr',          0x046A: 'yo',           \n    0x2809: 'en-BZ',    0x043F: 'kk',       0x181A: 'sr-Latn-BA',  \n    0x1009: 'en-CA',    0x0453: 'km',       0x081A: 'sr-Latn',     \n    0x2409: 'en-029',   0x0486: 'quc',      0x046C: 'nso',         \n  }\n];\n","import r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n  platformID: r.uint16,\n  encodingID: r.uint16,\n  languageID: r.uint16,\n  nameID:     r.uint16,\n  length:     r.uint16,\n  string:     new r.Pointer(r.uint16,\n    new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n    { type: 'parent', relativeTo: 'parent.stringOffset', allowNull: false }\n  )\n});\n\nlet LangTagRecord = new r.Struct({\n  length:  r.uint16,\n  tag:     new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: 'stringOffset'})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n  0: {\n    count:          r.uint16,\n    stringOffset:   r.uint16,\n    records:        new r.Array(NameRecord, 'count')\n  },\n  1: {\n    count:          r.uint16,\n    stringOffset:   r.uint16,\n    records:        new r.Array(NameRecord, 'count'),\n    langTagCount:   r.uint16,\n    langTags:       new r.Array(LangTagRecord, 'langTagCount')\n  }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n  'copyright',\n  'fontFamily',\n  'fontSubfamily',\n  'uniqueSubfamily',\n  'fullName',\n  'version',\n  'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n  'trademark',\n  'manufacturer',\n  'designer',\n  'description',\n  'vendorURL',\n  'designerURL',\n  'license',\n  'licenseURL',\n  null, // reserved\n  'preferredFamily',\n  'preferredSubfamily',\n  'compatibleFull',\n  'sampleText',\n  'postscriptCIDFontName',\n  'wwsFamilyName',\n  'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n  var records = {};\n  for (let record of this.records) {\n    // find out what language this is for\n    let language = LANGUAGES[record.platformID][record.languageID];\n\n    if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n      language = this.langTags[record.languageID - 0x8000].tag;\n    }\n\n    if (language == null) {\n      language = record.platformID + '-' + record.languageID;\n    }\n\n    // if the nameID is >= 256, it is a font feature record (AAT)\n    let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n    if (records[key] == null) {\n      records[key] = {};\n    }\n\n    let obj = records[key];\n    if (record.nameID >= 256) {\n      obj = obj[record.nameID] || (obj[record.nameID] = {});\n    }\n\n    if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n      obj[language] = record.string;\n    }\n  }\n\n  this.records = records;\n};\n\nNameTable.preEncode = function() {\n  if (Array.isArray(this.records)) return;\n  this.version = 0;\n\n  let records = [];\n  for (let key in this.records) {\n    let val = this.records[key];\n    if (key === 'fontFeatures') continue;\n\n    records.push({\n      platformID: 3,\n      encodingID: 1,\n      languageID: 0x409,\n      nameID: NAMES.indexOf(key),\n      length: Buffer.byteLength(val.en, 'utf16le'),\n      string: val.en\n    });\n\n    if (key === 'postscriptName') {\n      records.push({\n        platformID: 1,\n        encodingID: 0,\n        languageID: 0,\n        nameID: NAMES.indexOf(key),\n        length: val.en.length,\n        string: val.en\n      });\n    }\n  }\n\n  this.records = records;\n  this.count = records.length;\n  this.stringOffset = NameTable.size(this, null, false);\n};\n","import r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n  header: {\n    xAvgCharWidth:          r.int16,   // average weighted advance width of lower case letters and space\n    usWeightClass:          r.uint16,  // visual weight of stroke in glyphs\n    usWidthClass:           r.uint16,  // relative change from the normal aspect ratio (width to height ratio)\n    fsType:                 new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n      null, 'noEmbedding', 'viewOnly', 'editable', null,\n      null, null, null, 'noSubsetting', 'bitmapOnly'\n    ]),\n    ySubscriptXSize:        r.int16,   // recommended horizontal size in pixels for subscripts\n    ySubscriptYSize:        r.int16,   // recommended vertical size in pixels for subscripts\n    ySubscriptXOffset:      r.int16,   // recommended horizontal offset for subscripts\n    ySubscriptYOffset:      r.int16,   // recommended vertical offset form the baseline for subscripts\n    ySuperscriptXSize:      r.int16,   // recommended horizontal size in pixels for superscripts\n    ySuperscriptYSize:      r.int16,   // recommended vertical size in pixels for superscripts\n    ySuperscriptXOffset:    r.int16,   // recommended horizontal offset for superscripts\n    ySuperscriptYOffset:    r.int16,   // recommended vertical offset from the baseline for superscripts\n    yStrikeoutSize:         r.int16,   // width of the strikeout stroke\n    yStrikeoutPosition:     r.int16,   // position of the strikeout stroke relative to the baseline\n    sFamilyClass:           r.int16,   // classification of font-family design\n    panose:                 new r.Array(r.uint8, 10),   // describe the visual characteristics of a given typeface\n    ulCharRange:            new r.Array(r.uint32, 4),\n    vendorID:               new r.String(4),          // four character identifier for the font vendor\n    fsSelection:            new r.Bitfield(r.uint16, [  // bit field containing information about the font\n      'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n      'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n    ]),\n    usFirstCharIndex:       r.uint16,  // The minimum Unicode index in this font\n    usLastCharIndex:        r.uint16   // The maximum Unicode index in this font\n  },\n\n  // The Apple version of this table ends here, but the Microsoft one continues on...\n  0: {},\n\n  1: {\n    typoAscender:       r.int16,\n    typoDescender:      r.int16,\n    typoLineGap:        r.int16,\n    winAscent:          r.uint16,\n    winDescent:         r.uint16,\n    codePageRange:      new r.Array(r.uint32, 2)\n  },\n\n  2: {\n    // these should be common with version 1 somehow\n    typoAscender:       r.int16,\n    typoDescender:      r.int16,\n    typoLineGap:        r.int16,\n    winAscent:          r.uint16,\n    winDescent:         r.uint16,\n    codePageRange:      new r.Array(r.uint32, 2),\n\n    xHeight:            r.int16,\n    capHeight:          r.int16,\n    defaultChar:        r.uint16,\n    breakChar:          r.uint16,\n    maxContent:         r.uint16\n  },\n\n  5: {\n    typoAscender:       r.int16,\n    typoDescender:      r.int16,\n    typoLineGap:        r.int16,\n    winAscent:          r.uint16,\n    winDescent:         r.uint16,\n    codePageRange:      new r.Array(r.uint32, 2),\n\n    xHeight:            r.int16,\n    capHeight:          r.int16,\n    defaultChar:        r.uint16,\n    breakChar:          r.uint16,\n    maxContent:         r.uint16,\n\n    usLowerOpticalPointSize: r.uint16,\n    usUpperOpticalPointSize: r.uint16\n  }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n  header: { // these fields exist at the top of all versions\n    italicAngle:        r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n    underlinePosition:  r.int16,   // Suggested distance of the top of the underline from the baseline\n    underlineThickness: r.int16,   // Suggested values for the underline thickness\n    isFixedPitch:       r.uint32,  // Whether the font is monospaced\n    minMemType42:       r.uint32,  // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n    maxMemType42:       r.uint32,  // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n    minMemType1:        r.uint32,  // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n    maxMemType1:        r.uint32   // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n  },\n\n  1: {}, // version 1 has no additional fields\n\n  2: {\n    numberOfGlyphs: r.uint16,\n    glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n    names:          new r.Array(new r.String(r.uint8))\n  },\n\n  2.5: {\n    numberOfGlyphs: r.uint16,\n    offsets:        new r.Array(r.uint8, 'numberOfGlyphs')\n  },\n\n  3: {}, // version 3 has no additional fields\n\n  4: {\n    map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n  }\n});\n","import r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n  controlValues: new r.Array(r.int16)\n});\n","import r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n  instructions: new r.Array(r.uint8)\n});\n","import r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n  0: {\n    offsets: new r.Array(r.uint16)\n  },\n  1: {\n    offsets: new r.Array(r.uint32)\n  }\n});\n\nloca.process = function() {\n  if (this.version === 0) {\n    for (let i = 0; i < this.offsets.length; i++) {\n      this.offsets[i] <<= 1;\n    }\n  }\n};\n\nloca.preEncode = function() {\n  if (this.version === 0) {\n    for (let i = 0; i < this.offsets.length; i++) {\n      this.offsets[i] >>>= 1;\n    }\n  }\n};\n\nexport default loca;\n","import r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n  controlValueProgram: new r.Array(r.uint8)\n});\n","import r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import r from 'restructure';\n\nexport default class CFFIndex {\n  constructor(type) {\n    this.type = type;\n  }\n\n  getCFFVersion(ctx) {\n    while (ctx && !ctx.hdrSize) {\n      ctx = ctx.parent;\n    }\n\n    return ctx ? ctx.version : -1;\n  }\n\n  decode(stream, parent) {\n    let version = this.getCFFVersion(parent);\n    let count = version >= 2\n      ? stream.readUInt32BE()\n      : stream.readUInt16BE();\n\n    if (count === 0) {\n      return [];\n    }\n\n    let offSize = stream.readUInt8();\n    let offsetType;\n    if (offSize === 1) {\n      offsetType = r.uint8;\n    } else if (offSize === 2) {\n      offsetType = r.uint16;\n    } else if (offSize === 3) {\n      offsetType = r.uint24;\n    } else if (offSize === 4) {\n      offsetType = r.uint32;\n    } else {\n      throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n    }\n\n    let ret = [];\n    let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n    let start = offsetType.decode(stream);\n    for (let i = 0; i < count; i++) {\n      let end = offsetType.decode(stream);\n\n      if (this.type != null) {\n        let pos = stream.pos;\n        stream.pos = startPos + start;\n\n        parent.length = end - start;\n        ret.push(this.type.decode(stream, parent));\n        stream.pos = pos;\n      } else {\n        ret.push({\n          offset: startPos + start,\n          length: end - start\n        });\n      }\n\n      start = end;\n    }\n\n    stream.pos = startPos + start;\n    return ret;\n  }\n\n  size(arr, parent) {\n    let size = 2;\n    if (arr.length === 0) {\n      return size;\n    }\n\n    let type = this.type || new r.Buffer;\n\n    // find maximum offset to detminine offset type\n    let offset = 1;\n    for (let i = 0; i < arr.length; i++) {\n      let item = arr[i];\n      offset += type.size(item, parent);\n    }\n\n    let offsetType;\n    if (offset <= 0xff) {\n      offsetType = r.uint8;\n    } else if (offset <= 0xffff) {\n      offsetType = r.uint16;\n    } else if (offset <= 0xffffff) {\n      offsetType = r.uint24;\n    } else if (offset <= 0xffffffff) {\n      offsetType = r.uint32;\n    } else {\n      throw new Error(\"Bad offset in CFFIndex\");\n    }\n\n    size += 1 + offsetType.size() * (arr.length + 1);\n    size += offset - 1;\n\n    return size;\n  }\n\n  encode(stream, arr, parent) {\n    stream.writeUInt16BE(arr.length);\n    if (arr.length === 0) {\n      return;\n    }\n\n    let type = this.type || new r.Buffer;\n\n    // find maximum offset to detminine offset type\n    let sizes = [];\n    let offset = 1;\n    for (let item of arr) {\n      let s = type.size(item, parent);\n      sizes.push(s);\n      offset += s;\n    }\n\n    let offsetType;\n    if (offset <= 0xff) {\n      offsetType = r.uint8;\n    } else if (offset <= 0xffff) {\n      offsetType = r.uint16;\n    } else if (offset <= 0xffffff) {\n      offsetType = r.uint24;\n    } else if (offset <= 0xffffffff) {\n      offsetType = r.uint32;\n    } else {\n      throw new Error(\"Bad offset in CFFIndex\");\n    }\n\n    // write offset size\n    stream.writeUInt8(offsetType.size());\n\n    // write elements\n    offset = 1;\n    offsetType.encode(stream, offset);\n\n    for (let size of sizes) {\n      offset += size;\n      offsetType.encode(stream, offset);\n    }\n\n    for (let item of arr) {\n      type.encode(stream, item, parent);\n    }\n\n    return;\n  }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n  '0', '1', '2', '3', '4', '5', '6', '7',\n  '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n  '.': 10,\n  'E': 11,\n  'E-': 12,\n  '-': 14\n};\n\nexport default class CFFOperand {\n  static decode(stream, value) {\n    if (32 <= value && value <= 246) {\n      return value - 139;\n    }\n\n    if (247 <= value && value <= 250) {\n      return (value - 247) * 256 + stream.readUInt8() + 108;\n    }\n\n    if (251 <= value && value <= 254) {\n      return -(value - 251) * 256 - stream.readUInt8() - 108;\n    }\n\n    if (value === 28) {\n      return stream.readInt16BE();\n    }\n\n    if (value === 29) {\n      return stream.readInt32BE();\n    }\n\n    if (value === 30) {\n      let str = '';\n      while (true) {\n        let b = stream.readUInt8();\n\n        let n1 = b >> 4;\n        if (n1 === FLOAT_EOF) { break; }\n        str += FLOAT_LOOKUP[n1];\n\n        let n2 = b & 15;\n        if (n2 === FLOAT_EOF) { break; }\n        str += FLOAT_LOOKUP[n2];\n      }\n\n      return parseFloat(str);\n    }\n\n    return null;\n  }\n\n  static size(value) {\n    // if the value needs to be forced to the largest size (32 bit)\n    // e.g. for unknown pointers, set to 32768\n    if (value.forceLarge) {\n      value = 32768;\n    }\n\n    if ((value | 0) !== value) { // floating point\n      let str = '' + value;\n      return 1 + Math.ceil((str.length + 1) / 2);\n\n    } else if (-107 <= value && value <= 107) {\n      return 1;\n\n    } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n      return 2;\n\n    } else if (-32768 <= value && value <= 32767) {\n      return 3;\n\n    } else {\n      return 5;\n    }\n  }\n\n  static encode(stream, value) {\n    // if the value needs to be forced to the largest size (32 bit)\n    // e.g. for unknown pointers, save the old value and set to 32768\n    let val = Number(value);\n\n    if (value.forceLarge) {\n      stream.writeUInt8(29);\n      return stream.writeInt32BE(val);\n\n    } else if ((val | 0) !== val) { // floating point\n      stream.writeUInt8(30);\n\n      let str = '' + val;\n      for (let i = 0; i < str.length; i += 2) {\n        let c1 = str[i];\n        let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n        if (i === str.length - 1) {\n          var n2 = FLOAT_EOF;\n        } else {\n          let c2 = str[i + 1];\n          var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n        }\n\n        stream.writeUInt8((n1 << 4) | (n2 & 15));\n      }\n\n      if (n2 !== FLOAT_EOF) {\n        return stream.writeUInt8((FLOAT_EOF << 4));\n      }\n\n    } else if (-107 <= val && val <= 107) {\n      return stream.writeUInt8(val + 139);\n\n    } else if (108 <= val && val <= 1131) {\n      val -= 108;\n      stream.writeUInt8((val >> 8) + 247);\n      return stream.writeUInt8(val & 0xff);\n\n    } else if (-1131 <= val && val <= -108) {\n      val = -val - 108;\n      stream.writeUInt8((val >> 8) + 251);\n      return stream.writeUInt8(val & 0xff);\n\n    } else if (-32768 <= val && val <= 32767) {\n      stream.writeUInt8(28);\n      return stream.writeInt16BE(val);\n\n    } else {\n      stream.writeUInt8(29);\n      return stream.writeInt32BE(val);\n    }\n  }\n}\n","import isEqual from 'deep-equal';\nimport r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure/src/utils';\n\nexport default class CFFDict {\n  constructor(ops = []) {\n    this.ops = ops;\n    this.fields = {};\n    for (let field of ops) {\n      let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n      this.fields[key] = field;\n    }\n  }\n\n  decodeOperands(type, stream, ret, operands) {\n    if (Array.isArray(type)) {\n      return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n    } else if (type.decode != null) {\n      return type.decode(stream, ret, operands);\n    } else {\n      switch (type) {\n        case 'number':\n        case 'offset':\n        case 'sid':\n          return operands[0];\n        case 'boolean':\n          return !!operands[0];\n        default:\n          return operands;\n      }\n    }\n  }\n\n  encodeOperands(type, stream, ctx, operands) {\n    if (Array.isArray(type)) {\n      return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n    } else if (type.encode != null) {\n      return type.encode(stream, operands, ctx);\n    } else if (typeof operands === 'number') {\n      return [operands];\n    } else if (typeof operands === 'boolean') {\n      return [+operands];\n    } else if (Array.isArray(operands)) {\n      return operands;\n    } else {\n      return [operands];\n    }\n  }\n\n  decode(stream, parent) {\n    let end = stream.pos + parent.length;\n    let ret = {};\n    let operands = [];\n\n    // define hidden properties\n    Object.defineProperties(ret, {\n      parent:         { value: parent },\n      _startOffset:   { value: stream.pos }\n    });\n\n    // fill in defaults\n    for (let key in this.fields) {\n      let field = this.fields[key];\n      ret[field[1]] = field[3];\n    }\n\n    while (stream.pos < end) {\n      let b = stream.readUInt8();\n      if (b < 28) {\n        if (b === 12) {\n          b = (b << 8) | stream.readUInt8();\n        }\n\n        let field = this.fields[b];\n        if (!field) {\n          throw new Error(`Unknown operator ${b}`);\n        }\n\n        let val = this.decodeOperands(field[2], stream, ret, operands);\n        if (val != null) {\n          if (val instanceof PropertyDescriptor) {\n            Object.defineProperty(ret, field[1], val);\n          } else {\n            ret[field[1]] = val;\n          }\n        }\n\n        operands = [];\n      } else {\n        operands.push(CFFOperand.decode(stream, b));\n      }\n    }\n\n    return ret;\n  }\n\n  size(dict, parent, includePointers = true) {\n    let ctx = {\n      parent,\n      val: dict,\n      pointerSize: 0,\n      startOffset: parent.startOffset || 0\n    };\n\n    let len = 0;\n\n    for (let k in this.fields) {\n      let field = this.fields[k];\n      let val = dict[field[1]];\n      if (val == null || isEqual(val, field[3])) {\n        continue;\n      }\n\n      let operands = this.encodeOperands(field[2], null, ctx, val);\n      for (let op of operands) {\n        len += CFFOperand.size(op);\n      }\n\n      let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n      len += key.length;\n    }\n\n    if (includePointers) {\n      len += ctx.pointerSize;\n    }\n\n    return len;\n  }\n\n  encode(stream, dict, parent) {\n    let ctx = {\n      pointers: [],\n      startOffset: stream.pos,\n      parent,\n      val: dict,\n      pointerSize: 0\n    };\n\n    ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n    for (let field of this.ops) {\n      let val = dict[field[1]];\n      if (val == null || isEqual(val, field[3])) {\n        continue;\n      }\n\n      let operands = this.encodeOperands(field[2], stream, ctx, val);\n      for (let op of operands) {\n        CFFOperand.encode(stream, op);\n      }\n\n      let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n      for (let op of key) {\n        stream.writeUInt8(op);\n      }\n    }\n\n    let i = 0;\n    while (i < ctx.pointers.length) {\n      let ptr = ctx.pointers[i++];\n      ptr.type.encode(stream, ptr.val, ptr.parent);\n    }\n\n    return;\n  }\n}\n","import r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n  constructor(type, options = {}) {\n    if (options.type == null) {\n      options.type = 'global';\n    }\n\n    super(null, type, options);\n  }\n\n  decode(stream, parent, operands) {\n    this.offsetType = {\n      decode: () => operands[0]\n    };\n\n    return super.decode(stream, parent, operands);\n  }\n\n  encode(stream, value, ctx) {\n    if (!stream) {\n      // compute the size (so ctx.pointerSize is correct)\n      this.offsetType = {\n        size: () => 0\n      };\n\n      this.size(value, ctx);\n      return [new Ptr(0)];\n    }\n\n    let ptr = null;\n    this.offsetType = {\n      encode: (stream, val) => ptr = val\n    };\n\n    super.encode(stream, value, ctx);\n    return [new Ptr(ptr)];\n  }\n}\n\nclass Ptr {\n  constructor(val) {\n    this.val = val;\n    this.forceLarge = true;\n  }\n\n  valueOf() {\n    return this.val;\n  }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n  static decode(stream, parent, operands) {\n    let numBlends = operands.pop();\n\n    // TODO: actually blend. For now just consume the deltas\n    // since we don't use any of the values anyway.\n    while (operands.length > numBlends) {\n      operands.pop();\n    }\n  }\n}\n\nexport default new CFFDict([\n  // key       name                    type                                          default\n  [6,         'BlueValues',           'delta',                                       null],\n  [7,         'OtherBlues',           'delta',                                       null],\n  [8,         'FamilyBlues',          'delta',                                       null],\n  [9,         'FamilyOtherBlues',     'delta',                                       null],\n  [[12, 9],   'BlueScale',            'number',                                      0.039625],\n  [[12, 10],  'BlueShift',            'number',                                      7],\n  [[12, 11],  'BlueFuzz',             'number',                                      1],\n  [10,        'StdHW',                'number',                                      null],\n  [11,        'StdVW',                'number',                                      null],\n  [[12, 12],  'StemSnapH',            'delta',                                       null],\n  [[12, 13],  'StemSnapV',            'delta',                                       null],\n  [[12, 14],  'ForceBold',            'boolean',                                     false],\n  [[12, 17],  'LanguageGroup',        'number',                                      0],\n  [[12, 18],  'ExpansionFactor',      'number',                                      0.06],\n  [[12, 19],  'initialRandomSeed',    'number',                                      0],\n  [20,        'defaultWidthX',        'number',                                      0],\n  [21,        'nominalWidthX',        'number',                                      0],\n  [22,        'vsindex',              'number',                                      0],\n  [23,        'blend',                CFFBlendOp,                                    null],\n  [19,        'Subrs',                new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n  \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n  \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n  \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n  \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n  \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n  \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n  \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n  \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n  \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n  \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n  \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n  \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n  \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n  \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n  \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n  \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n  \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n  \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n  \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n  \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n  \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n  \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n  \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n  \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n  \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n  \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n  \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n  \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n  \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n  \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n  \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n  \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n  \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n  \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n  \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n  \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n  \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n  \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n  \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n  \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n  \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n  \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n  \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n  \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n  \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n  \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n  \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n  \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n  \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n  \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n  \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n  \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n  \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n  \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n  \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n  \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n  \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n  \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n  \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n  \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n  \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n  \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n  \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n  \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n  \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n  \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n  \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n  '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n  '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n  'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n  'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n  'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n  'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n  'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n  'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n  '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n  'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n  'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n  'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n  'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n  'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n  'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n  '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n  'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n  '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n  '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n  'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n  'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n  'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n  'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n  'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n  'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n  'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n  'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n  'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n  'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n  '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n  'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n  'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n  '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n  'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n  '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n  'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n  'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n  'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n  'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n  'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n  'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n  'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n  'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n  '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n  'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n  'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n  'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n  'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n  'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n  'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n  'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n  'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n  'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n  'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n  'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n  'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n  'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n  'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n  'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n  'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n  'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n  'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n  'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n  'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n  'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n  'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n  'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n  'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n  'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n  'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n  'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n  'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n  'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n  'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n  'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n  'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n  'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n  '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n  'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n  'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n  'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n  'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n  'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n  'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n  'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n  'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n  'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n  'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n  'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n  'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n  'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n  'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n  'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n  'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n  'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n  'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n  'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n  'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n  'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n  'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n  'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n  'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n  'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n  'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n  'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n  'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n  'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n  'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n  'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n  'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n  'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n  'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n  'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n  'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n  '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n  'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n  'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n  'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n  'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n  'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n  'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n  'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n  'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n  'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n  'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n  'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n  'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n  'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n  'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n  'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n  'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n  'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n  'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n  'periodinferior', 'commainferior'\n];\n","import r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n  reserved:         new r.Reserved(r.uint16),\n  reqFeatureIndex:  r.uint16,\n  featureCount:     r.uint16,\n  featureIndexes:   new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n  tag:      new r.String(4),\n  langSys:  new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n  defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n  count:          r.uint16,\n  langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n  tag:    new r.String(4),\n  script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nexport let Feature = new r.Struct({\n  featureParams:      r.uint16, // pointer\n  lookupCount:        r.uint16,\n  lookupListIndexes:  new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n  tag:      new r.String(4),\n  feature:  new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Struct({\n  markAttachmentType: r.uint8,\n  flags: new r.Bitfield(r.uint8, [\n    'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n    'ignoreMarks', 'useMarkFilteringSet'\n  ])\n});\n\nexport function LookupList(SubTable) {\n  let Lookup = new r.Struct({\n    lookupType:         r.uint16,\n    flags:              LookupFlags,\n    subTableCount:      r.uint16,\n    subTables:          new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n    markFilteringSet:   new r.Optional(r.uint16, t => t.flags.flags.useMarkFilteringSet)\n  });\n\n  return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n  start:              r.uint16,\n  end:                r.uint16,\n  startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n  1: {\n    glyphCount:   r.uint16,\n    glyphs:       new r.Array(r.uint16, 'glyphCount')\n  },\n  2: {\n    rangeCount:   r.uint16,\n    rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n  }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n  start:  r.uint16,\n  end:    r.uint16,\n  class:  r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n  1: { // Class array\n    startGlyph:       r.uint16,\n    glyphCount:       r.uint16,\n    classValueArray:  new r.Array(r.uint16, 'glyphCount')\n  },\n  2: { // Class ranges\n    classRangeCount:  r.uint16,\n    classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n  }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n  a: r.uint16, // startSize for hinting Device, outerIndex for VariationIndex\n  b: r.uint16, // endSize for Device, innerIndex for VariationIndex\n  deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n  sequenceIndex:      r.uint16,\n  lookupListIndex:    r.uint16\n});\n\nlet Rule = new r.Struct({\n  glyphCount:     r.uint16,\n  lookupCount:    r.uint16,\n  input:          new r.Array(r.uint16, t => t.glyphCount - 1),\n  lookupRecords:  new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n  glyphCount:     r.uint16,\n  lookupCount:    r.uint16,\n  classes:        new r.Array(r.uint16, t => t.glyphCount - 1),\n  lookupRecords:  new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n  1: { // Simple context\n    coverage:      new r.Pointer(r.uint16, Coverage),\n    ruleSetCount:  r.uint16,\n    ruleSets:      new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n  },\n  2: { // Class-based context\n    coverage:      new r.Pointer(r.uint16, Coverage),\n    classDef:      new r.Pointer(r.uint16, ClassDef),\n    classSetCnt:   r.uint16,\n    classSet:      new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n  },\n  3: {\n    glyphCount:    r.uint16,\n    lookupCount:   r.uint16,\n    coverages:     new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n    lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n  }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n  backtrackGlyphCount:  r.uint16,\n  backtrack:            new r.Array(r.uint16, 'backtrackGlyphCount'),\n  inputGlyphCount:      r.uint16,\n  input:                new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n  lookaheadGlyphCount:  r.uint16,\n  lookahead:            new r.Array(r.uint16, 'lookaheadGlyphCount'),\n  lookupCount:          r.uint16,\n  lookupRecords:        new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n  1: { // Simple context glyph substitution\n    coverage:           new r.Pointer(r.uint16, Coverage),\n    chainCount:         r.uint16,\n    chainRuleSets:      new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n  },\n\n  2: { // Class-based chaining context\n    coverage:           new r.Pointer(r.uint16, Coverage),\n    backtrackClassDef:  new r.Pointer(r.uint16, ClassDef),\n    inputClassDef:      new r.Pointer(r.uint16, ClassDef),\n    lookaheadClassDef:  new r.Pointer(r.uint16, ClassDef),\n    chainCount:         r.uint16,\n    chainClassSet:      new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n  },\n\n  3: { // Coverage-based chaining context\n    backtrackGlyphCount:    r.uint16,\n    backtrackCoverage:      new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n    inputGlyphCount:        r.uint16,\n    inputCoverage:          new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n    lookaheadGlyphCount:    r.uint16,\n    lookaheadCoverage:      new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n    lookupCount:            r.uint16,\n    lookupRecords:          new r.Array(LookupRecord, 'lookupCount')\n  }\n});\n","import {Feature} from './opentype';\nimport r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n  startCoord: F2DOT14,\n  peakCoord: F2DOT14,\n  endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n  axisCount: r.uint16,\n  regionCount: r.uint16,\n  variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n  shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n  regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n  deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n  itemCount: r.uint16,\n  shortDeltaCount: r.uint16,\n  regionIndexCount: r.uint16,\n  regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n  deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n  format: r.uint16,\n  variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n  variationDataCount: r.uint16,\n  itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n  1: {\n    axisIndex: r.uint16,\n    axisIndex: r.uint16,\n    filterRangeMinValue: F2DOT14,\n    filterRangeMaxValue: F2DOT14\n  }\n});\n\nlet ConditionSet = new r.Struct({\n  conditionCount: r.uint16,\n  conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n  featureIndex: r.uint16,\n  alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n  version: r.fixed32,\n  substitutionCount: r.uint16,\n  substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n  conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n  featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n  majorVersion: r.uint16,\n  minorVersion: r.uint16,\n  featureVariationRecordCount: r.uint32,\n  featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import r from 'restructure';\nimport { resolveLength } from 'restructure/src/utils';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n  constructor(predefinedOps, type) {\n    this.predefinedOps = predefinedOps;\n    this.type = type;\n  }\n\n  decode(stream, parent, operands) {\n    if (this.predefinedOps[operands[0]]) {\n      return this.predefinedOps[operands[0]];\n    }\n\n    return this.type.decode(stream, parent, operands);\n  }\n\n  size(value, ctx) {\n    return this.type.size(value, ctx);\n  }\n\n  encode(stream, value, ctx) {\n    let index = this.predefinedOps.indexOf(value);\n    if (index !== -1) {\n      return index;\n    }\n\n    return this.type.encode(stream, value, ctx);\n  }\n}\n\nclass CFFEncodingVersion extends r.Number {\n  constructor() {\n    super('UInt8');\n  }\n\n  decode(stream) {\n    return r.uint8.decode(stream) & 0x7f;\n  }\n}\n\nlet Range1 = new r.Struct({\n  first: r.uint16,\n  nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n  first: r.uint16,\n  nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n  0: {\n    nCodes: r.uint8,\n    codes: new r.Array(r.uint8, 'nCodes')\n  },\n\n  1: {\n    nRanges: r.uint8,\n    ranges: new r.Array(Range1, 'nRanges')\n  }\n\n  // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n  decode(stream, parent) {\n    let length = resolveLength(this.length, stream, parent);\n    let count = 0;\n    let res = [];\n    while (count < length) {\n      let range = this.type.decode(stream, parent);\n      range.offset = count;\n      count += range.nLeft + 1;\n      res.push(range);\n    }\n\n    return res;\n  }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n  0: {\n    glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n  },\n\n  1: {\n    ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n  },\n\n  2: {\n    ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n  }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n  first: r.uint16,\n  fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n  first: r.uint32,\n  fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n  0: {\n    fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n  },\n\n  3: {\n    nRanges: r.uint16,\n    ranges: new r.Array(FDRange3, 'nRanges'),\n    sentinel: r.uint16\n  },\n\n  4: {\n    nRanges: r.uint32,\n    ranges: new r.Array(FDRange4, 'nRanges'),\n    sentinel: r.uint32\n  }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n  decode(stream, parent, operands) {\n    parent.length = operands[0];\n    return ptr.decode(stream, parent, [operands[1]]);\n  }\n\n  size(dict, ctx) {\n    return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n  }\n\n  encode(stream, dict, ctx) {\n    return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n  }\n}\n\nlet FontDict = new CFFDict([\n  // key       name                   type(s)                                 default\n  [18,        'Private',              new CFFPrivateOp,                       null],\n  [[12, 38],  'FontName',             'sid',                                  null],\n  [[12, 7],   'FontMatrix',           'array',                                [0.001, 0, 0, 0.001, 0, 0]],\n  [[12, 5],   'PaintType',            'number',                               0],\n]);\n\nlet CFFTopDict = new CFFDict([\n  // key       name                   type(s)                                 default\n  [[12, 30],  'ROS',                  ['sid', 'sid', 'number'],               null],\n\n  [0,         'version',              'sid',                                  null],\n  [1,         'Notice',               'sid',                                  null],\n  [[12, 0],   'Copyright',            'sid',                                  null],\n  [2,         'FullName',             'sid',                                  null],\n  [3,         'FamilyName',           'sid',                                  null],\n  [4,         'Weight',               'sid',                                  null],\n  [[12, 1],   'isFixedPitch',         'boolean',                              false],\n  [[12, 2],   'ItalicAngle',          'number',                               0],\n  [[12, 3],   'UnderlinePosition',    'number',                               -100],\n  [[12, 4],   'UnderlineThickness',   'number',                               50],\n  [[12, 5],   'PaintType',            'number',                               0],\n  [[12, 6],   'CharstringType',       'number',                               2],\n  [[12, 7],   'FontMatrix',           'array',                                [0.001, 0, 0, 0.001, 0, 0]],\n  [13,        'UniqueID',             'number',                               null],\n  [5,         'FontBBox',             'array',                                [0, 0, 0, 0]],\n  [[12, 8],   'StrokeWidth',          'number',                               0],\n  [14,        'XUID',                 'array',                                null],\n  [15,        'charset',              CFFCharset,                             ISOAdobeCharset],\n  [16,        'Encoding',             CFFEncoding,                            StandardEncoding],\n  [17,        'CharStrings',          new CFFPointer(new CFFIndex),           null],\n  [18,        'Private',              new CFFPrivateOp,                       null],\n  [[12, 20],  'SyntheticBase',        'number',                               null],\n  [[12, 21],  'PostScript',           'sid',                                  null],\n  [[12, 22],  'BaseFontName',         'sid',                                  null],\n  [[12, 23],  'BaseFontBlend',        'delta',                                null],\n\n  // CID font specific\n  [[12, 31],  'CIDFontVersion',       'number',                               0],\n  [[12, 32],  'CIDFontRevision',      'number',                               0],\n  [[12, 33],  'CIDFontType',          'number',                               0],\n  [[12, 34],  'CIDCount',             'number',                               8720],\n  [[12, 35],  'UIDBase',              'number',                               null],\n  [[12, 37],  'FDSelect',             new CFFPointer(FDSelect),               null],\n  [[12, 36],  'FDArray',              new CFFPointer(new CFFIndex(FontDict)), null],\n  [[12, 38],  'FontName',             'sid',                                  null]\n]);\n\nlet VariationStore = new r.Struct({\n  length: r.uint16,\n  itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n  [[12, 7],   'FontMatrix',           'array',                                [0.001, 0, 0, 0.001, 0, 0]],\n  [17,        'CharStrings',          new CFFPointer(new CFFIndex),           null],\n  [[12, 37],  'FDSelect',             new CFFPointer(FDSelect),               null],\n  [[12, 36],  'FDArray',              new CFFPointer(new CFFIndex(FontDict)), null],\n  [24,        'vstore',               new CFFPointer(VariationStore),         null],\n  [25,        'maxstack',             'number',                               193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n  1: {\n    hdrSize:            r.uint8,\n    offSize:            r.uint8,\n    nameIndex:          new CFFIndex(new r.String('length')),\n    topDictIndex:       new CFFIndex(CFFTopDict),\n    stringIndex:        new CFFIndex(new r.String('length')),\n    globalSubrIndex:    new CFFIndex\n  },\n\n  2: {\n    hdrSize:            r.uint8,\n    length:             r.uint16,\n    topDict:            CFF2TopDict,\n    globalSubrIndex:    new CFFIndex\n  }\n});\n\nexport default CFFTop;\n","import r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n  constructor(stream) {\n    this.stream = stream;\n    this.decode();\n  }\n\n  static decode(stream) {\n    return new CFFFont(stream);\n  }\n\n  decode() {\n    let start = this.stream.pos;\n    let top = CFFTop.decode(this.stream);\n    for (let key in top) {\n      let val = top[key];\n      this[key] = val;\n    }\n\n    if (this.version < 2) {\n      if (this.topDictIndex.length !== 1) {\n        throw new Error(\"Only a single font is allowed in CFF\");\n      }\n\n      this.topDict = this.topDictIndex[0];\n    }\n\n    this.isCIDFont = this.topDict.ROS != null;\n    return this;\n  }\n\n  string(sid) {\n    if (this.version >= 2) {\n      return null;\n    }\n\n    if (sid < standardStrings.length) {\n      return standardStrings[sid];\n    }\n\n    return this.stringIndex[sid - standardStrings.length];\n  }\n\n  get postscriptName() {\n    if (this.version < 2) {\n      return this.nameIndex[0];\n    }\n\n    return null;\n  }\n\n  get fullName() {\n    return this.string(this.topDict.FullName);\n  }\n\n  get familyName() {\n    return this.string(this.topDict.FamilyName);\n  }\n\n  getCharString(glyph) {\n    this.stream.pos = this.topDict.CharStrings[glyph].offset;\n    return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n  }\n\n  getGlyphName(gid) {\n    // CFF2 glyph names are in the post table.\n    if (this.version >= 2) {\n      return null;\n    }\n\n    // CID-keyed fonts don't have glyph names\n    if (this.isCIDFont) {\n      return null;\n    }\n\n    let { charset } = this.topDict;\n    if (Array.isArray(charset)) {\n      return charset[gid];\n    }\n\n    if (gid === 0) {\n      return '.notdef';\n    }\n\n    gid -= 1;\n\n    switch (charset.version) {\n      case 0:\n        return this.string(charset.glyphs[gid]);\n\n      case 1:\n      case 2:\n        for (let i = 0; i < charset.ranges.length; i++) {\n          let range = charset.ranges[i];\n          if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n            return this.string(range.first + (gid - range.offset));\n          }\n        }\n        break;\n    }\n\n    return null;\n  }\n\n  fdForGlyph(gid) {\n    if (!this.topDict.FDSelect) {\n      return null;\n    }\n\n    switch (this.topDict.FDSelect.version) {\n      case 0:\n        return this.topDict.FDSelect.fds[gid];\n\n      case 3:\n      case 4:\n        let { ranges } = this.topDict.FDSelect;\n        let low = 0;\n        let high = ranges.length - 1;\n\n        while (low <= high) {\n          let mid = (low + high) >> 1;\n\n          if (gid < ranges[mid].first) {\n            high = mid - 1;\n          } else if (mid < high && gid >= ranges[mid + 1].first) {\n            low = mid + 1;\n          } else {\n            return ranges[mid].fd;\n          }\n        }\n      default:\n        throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n    }\n  }\n\n  privateDictForGlyph(gid) {\n    if (this.topDict.FDSelect) {\n      let fd = this.fdForGlyph(gid);\n      if (this.topDict.FDArray[fd]) {\n        return this.topDict.FDArray[fd].Private;\n      }\n\n      return null;\n    }\n\n    if (this.version < 2) {\n      return this.topDict.Private;\n    }\n\n    return this.topDict.FDArray[0].Private;\n  }\n}\n\nexport default CFFFont;\n","import r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n  glyphIndex:   r.uint16,\n  vertOriginY:  r.int16\n});\n\nexport default new r.Struct({\n  majorVersion:           r.uint16,\n  minorVersion:           r.uint16,\n  defaultVertOriginY:     r.int16,\n  numVertOriginYMetrics:  r.uint16,\n  metrics:                new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n  height: r.uint8,\n  width: r.uint8,\n  horiBearingX: r.int8,\n  horiBearingY: r.int8,\n  horiAdvance: r.uint8,\n  vertBearingX: r.int8,\n  vertBearingY: r.int8,\n  vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n  height: r.uint8,\n  width: r.uint8,\n  bearingX: r.int8,\n  bearingY: r.int8,\n  advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n  glyph: r.uint16,\n  xOffset: r.int8,\n  yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n  1: {\n    metrics: SmallMetrics,\n    data: ByteAligned\n  },\n\n  2: {\n    metrics: SmallMetrics,\n    data: BitAligned\n  },\n\n  // format 3 is deprecated\n  // format 4 is not supported by Microsoft\n\n  5: {\n    data: BitAligned\n  },\n\n  6: {\n    metrics: BigMetrics,\n    data: ByteAligned\n  },\n\n  7: {\n    metrics: BigMetrics,\n    data: BitAligned\n  },\n\n  8: {\n    metrics: SmallMetrics,\n    pad: new r.Reserved(r.uint8),\n    numComponents: r.uint16,\n    components: new r.Array(EBDTComponent, 'numComponents')\n  },\n\n  9: {\n    metrics: BigMetrics,\n    pad: new r.Reserved(r.uint8),\n    numComponents: r.uint16,\n    components: new r.Array(EBDTComponent, 'numComponents')\n  },\n\n  17: {\n    metrics: SmallMetrics,\n    dataLen: r.uint32,\n    data: new r.Buffer('dataLen')\n  },\n\n  18: {\n    metrics: BigMetrics,\n    dataLen: r.uint32,\n    data: new r.Buffer('dataLen')\n  },\n\n  19: {\n    dataLen: r.uint32,\n    data: new r.Buffer('dataLen')\n  }\n});\n\n","import r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n  ascender: r.int8,\n  descender: r.int8,\n  widthMax: r.uint8,\n  caretSlopeNumerator: r.int8,\n  caretSlopeDenominator: r.int8,\n  caretOffset: r.int8,\n  minOriginSB: r.int8,\n  minAdvanceSB: r.int8,\n  maxBeforeBL: r.int8,\n  minAfterBL: r.int8,\n  pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n  glyphCode: r.uint16,\n  offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n  header: {\n    imageFormat: r.uint16,\n    imageDataOffset: r.uint32\n  },\n\n  1: {\n    offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n  },\n\n  2: {\n    imageSize: r.uint32,\n    bigMetrics: BigMetrics\n  },\n\n  3: {\n    offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n  },\n\n  4: {\n    numGlyphs: r.uint32,\n    glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n  },\n\n  5: {\n    imageSize: r.uint32,\n    bigMetrics: BigMetrics,\n    numGlyphs: r.uint32,\n    glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n  }\n});\n\nlet IndexSubtableArray = new r.Struct({\n  firstGlyphIndex: r.uint16,\n  lastGlyphIndex: r.uint16,\n  subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n  indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n  indexTablesSize: r.uint32,\n  numberOfIndexSubTables: r.uint32,\n  colorRef: r.uint32,\n  hori: SBitLineMetrics,\n  vert: SBitLineMetrics,\n  startGlyphIndex: r.uint16,\n  endGlyphIndex: r.uint16,\n  ppemX: r.uint8,\n  ppemY: r.uint8,\n  bitDepth: r.uint8,\n  flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n  version:  r.uint32, // 0x00020000\n  numSizes: r.uint32,\n  sizes:    new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import r from 'restructure';\n\nlet ImageTable = new r.Struct({\n  ppem: r.uint16,\n  resolution: r.uint16,\n  imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n  version: r.uint16,\n  flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n  numImgTables: r.uint32,\n  imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n  gid: r.uint16,          // Glyph ID of layer glyph (must be in z-order from bottom to top).\n  paletteIndex: r.uint16  // Index value to use in the appropriate palette. This value must\n});                       // be less than numPaletteEntries in the CPAL table, except for\n                          // the special case noted below. Each palette entry is 16 bits.\n                          // A palette index of 0xFFFF is a special case indicating that\n                          // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n  gid: r.uint16,             // Glyph ID of reference glyph. This glyph is for reference only\n                             // and is not rendered for color.\n  firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n                             // There will be numLayers consecutive entries for this base glyph.\n  numLayers: r.uint16\n});\n\nexport default new r.Struct({\n  version: r.uint16,\n  numBaseGlyphRecords: r.uint16,\n  baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n  layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n  numLayerRecords: r.uint16\n});\n","import r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n  blue: r.uint8,\n  green: r.uint8,\n  red: r.uint8,\n  alpha: r.uint8\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n  header: {\n    numPaletteEntries: r.uint16,\n    numPalettes: r.uint16,\n    numColorRecords: r.uint16,\n    colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n    colorRecordIndices: new r.Array(r.uint16, 'numPalettes'),\n  },\n  0: {},\n  1: {\n    offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),\n    offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),\n    offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))\n  }\n});\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n  1: { // Design units only\n    coordinate:   r.int16 // X or Y value, in design units\n  },\n\n  2: { // Design units plus contour point\n    coordinate:     r.int16,   // X or Y value, in design units\n    referenceGlyph: r.uint16,  // GlyphID of control glyph\n    baseCoordPoint: r.uint16   // Index of contour point on the referenceGlyph\n  },\n\n  3: { // Design units plus Device table\n    coordinate:   r.int16,                         // X or Y value, in design units\n    deviceTable:  new r.Pointer(r.uint16, Device)  // Device table for X or Y value\n  }\n});\n\nlet BaseValues = new r.Struct({\n  defaultIndex:   r.uint16,  // Index of default baseline for this script-same index in the BaseTagList\n  baseCoordCount: r.uint16,\n  baseCoords:     new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n  tag:        new r.String(4),  // 4-byte feature identification tag-must match FeatureTag in FeatureList\n  minCoord:   new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n  maxCoord:   new r.Pointer(r.uint16, BaseCoord, {type: 'parent'})  // May be NULL\n});\n\nlet MinMax = new r.Struct({\n  minCoord:           new r.Pointer(r.uint16, BaseCoord),  // May be NULL\n  maxCoord:           new r.Pointer(r.uint16, BaseCoord),  // May be NULL\n  featMinMaxCount:    r.uint16,                            // May be 0\n  featMinMaxRecords:  new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n  tag:    new r.String(4),  // 4-byte language system identification tag\n  minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n  baseValues:         new r.Pointer(r.uint16, BaseValues), // May be NULL\n  defaultMinMax:      new r.Pointer(r.uint16, MinMax),     // May be NULL\n  baseLangSysCount:   r.uint16,                            // May be 0\n  baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n  tag:      new r.String(4),  // 4-byte script identification tag\n  script:   new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n  baseTagList:    new r.Pointer(r.uint16, BaseTagList),  // May be NULL\n  baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n  header: {\n    horizAxis:    new r.Pointer(r.uint16, Axis),   // May be NULL\n    vertAxis:     new r.Pointer(r.uint16, Axis)    // May be NULL\n  },\n\n  0x00010000: {},\n  0x00010001: {\n    itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n  }\n});\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n  coverage:       new r.Pointer(r.uint16, Coverage),\n  glyphCount:     r.uint16,\n  attachPoints:   new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n  1: { // Design units only\n    coordinate: r.int16\n  },\n\n  2: { // Contour point\n    caretValuePoint: r.uint16\n  },\n\n  3: { // Design units plus Device table\n    coordinate:     r.int16,\n    deviceTable:    new r.Pointer(r.uint16, Device)\n  }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n  coverage:       new r.Pointer(r.uint16, Coverage),\n  ligGlyphCount:  r.uint16,\n  ligGlyphs:      new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n  markSetTableFormat: r.uint16,\n  markSetCount:       r.uint16,\n  coverage:           new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n  header: {\n    glyphClassDef:      new r.Pointer(r.uint16, ClassDef),\n    attachList:         new r.Pointer(r.uint16, AttachList),\n    ligCaretList:       new r.Pointer(r.uint16, LigCaretList),\n    markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n  },\n\n  0x00010000: {},\n  0x00010002: {\n    markGlyphSetsDef:   new r.Pointer(r.uint16, MarkGlyphSetsDef)\n  },\n  0x00010003: {\n    markGlyphSetsDef:   new r.Pointer(r.uint16, MarkGlyphSetsDef),\n    itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n  }\n});\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n  'xPlacement', 'yPlacement',\n  'xAdvance', 'yAdvance',\n  'xPlaDevice', 'yPlaDevice',\n  'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n  xPlacement: r.int16,\n  yPlacement: r.int16,\n  xAdvance:   r.int16,\n  yAdvance:   r.int16,\n  xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n  yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n  xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n  yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' })\n};\n\nclass ValueRecord {\n  constructor(key = 'valueFormat') {\n    this.key = key;\n  }\n\n  buildStruct(parent) {\n    let struct = parent;\n    while (!struct[this.key] && struct.parent) {\n      struct = struct.parent;\n    }\n\n    if (!struct[this.key]) return;\n\n    let fields = {};\n    fields.rel = () => struct._startOffset;\n\n    let format = struct[this.key];\n    for (let key in format) {\n      if (format[key]) {\n        fields[key] = types[key];\n      }\n    }\n\n    return new r.Struct(fields);\n  }\n\n  size(val, ctx) {\n    return this.buildStruct(ctx).size(val, ctx);\n  }\n\n  decode(stream, parent) {\n    let res = this.buildStruct(parent).decode(stream, parent);\n    delete res.rel;\n    return res;\n  }\n}\n\nlet PairValueRecord = new r.Struct({\n  secondGlyph:    r.uint16,\n  value1:         new ValueRecord('valueFormat1'),\n  value2:         new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n  value1: new ValueRecord('valueFormat1'),\n  value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n  1: { // Design units only\n    xCoordinate:    r.int16,\n    yCoordinate:    r.int16\n  },\n\n  2: { // Design units plus contour point\n    xCoordinate:    r.int16,\n    yCoordinate:    r.int16,\n    anchorPoint:    r.uint16\n  },\n\n  3: { // Design units plus Device tables\n    xCoordinate:    r.int16,\n    yCoordinate:    r.int16,\n    xDeviceTable:   new r.Pointer(r.uint16, Device),\n    yDeviceTable:   new r.Pointer(r.uint16, Device)\n  }\n});\n\nlet EntryExitRecord = new r.Struct({\n  entryAnchor:    new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n  exitAnchor:     new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n  class:      r.uint16,\n  markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord  = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray   = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach  = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray   = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n  1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n    1: { // Single positioning value\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      valueFormat:    ValueFormat,\n      value:          new ValueRecord()\n    },\n    2: {\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      valueFormat:    ValueFormat,\n      valueCount:     r.uint16,\n      values:         new r.LazyArray(new ValueRecord(), 'valueCount')\n    }\n  }),\n\n  2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n    1: { // Adjustments for glyph pairs\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      valueFormat1:   ValueFormat,\n      valueFormat2:   ValueFormat,\n      pairSetCount:   r.uint16,\n      pairSets:       new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n    },\n\n    2: { // Class pair adjustment\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      valueFormat1:   ValueFormat,\n      valueFormat2:   ValueFormat,\n      classDef1:      new r.Pointer(r.uint16, ClassDef),\n      classDef2:      new r.Pointer(r.uint16, ClassDef),\n      class1Count:    r.uint16,\n      class2Count:    r.uint16,\n      classRecords:   new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n    }\n  }),\n\n  3: { // Cursive Attachment Positioning\n    format:             r.uint16,\n    coverage:           new r.Pointer(r.uint16, Coverage),\n    entryExitCount:     r.uint16,\n    entryExitRecords:   new r.Array(EntryExitRecord, 'entryExitCount')\n  },\n\n  4: { // MarkToBase Attachment Positioning\n    format:             r.uint16,\n    markCoverage:       new r.Pointer(r.uint16, Coverage),\n    baseCoverage:       new r.Pointer(r.uint16, Coverage),\n    classCount:         r.uint16,\n    markArray:          new r.Pointer(r.uint16, MarkArray),\n    baseArray:          new r.Pointer(r.uint16, BaseArray)\n  },\n\n  5: { // MarkToLigature Attachment Positioning\n    format:             r.uint16,\n    markCoverage:       new r.Pointer(r.uint16, Coverage),\n    ligatureCoverage:   new r.Pointer(r.uint16, Coverage),\n    classCount:         r.uint16,\n    markArray:          new r.Pointer(r.uint16, MarkArray),\n    ligatureArray:      new r.Pointer(r.uint16, LigatureArray)\n  },\n\n  6: { // MarkToMark Attachment Positioning\n    format:             r.uint16,\n    mark1Coverage:      new r.Pointer(r.uint16, Coverage),\n    mark2Coverage:      new r.Pointer(r.uint16, Coverage),\n    classCount:         r.uint16,\n    mark1Array:         new r.Pointer(r.uint16, MarkArray),\n    mark2Array:         new r.Pointer(r.uint16, BaseArray)\n  },\n\n  7: Context,          // Contextual positioning\n  8: ChainingContext,  // Chaining contextual positioning\n\n  9: { // Extension Positioning\n    posFormat:   r.uint16,\n    lookupType:  r.uint16,   // cannot also be 9\n    extension:   new r.Pointer(r.uint32, GPOSLookup)\n  }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n  header: {\n    scriptList:     new r.Pointer(r.uint16, ScriptList),\n    featureList:    new r.Pointer(r.uint16, FeatureList),\n    lookupList:     new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n  },\n\n  0x00010000: {},\n  0x00010001: {\n    featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n  }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n  glyph:      r.uint16,\n  compCount:  r.uint16,\n  components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n  1: new r.VersionedStruct(r.uint16, {// Single Substitution\n    1: {\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      deltaGlyphID:   r.int16\n    },\n    2: {\n      coverage:       new r.Pointer(r.uint16, Coverage),\n      glyphCount:     r.uint16,\n      substitute:     new r.LazyArray(r.uint16, 'glyphCount')\n    }\n  }),\n\n  2: { // Multiple Substitution\n    substFormat:    r.uint16,\n    coverage:       new r.Pointer(r.uint16, Coverage),\n    count:          r.uint16,\n    sequences:      new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n  },\n\n  3: { // Alternate Substitution\n    substFormat:    r.uint16,\n    coverage:       new r.Pointer(r.uint16, Coverage),\n    count:          r.uint16,\n    alternateSet:   new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n  },\n\n  4: { // Ligature Substitution\n    substFormat:    r.uint16,\n    coverage:       new r.Pointer(r.uint16, Coverage),\n    count:          r.uint16,\n    ligatureSets:   new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n  },\n\n  5: Context,         // Contextual Substitution\n  6: ChainingContext, // Chaining Contextual Substitution\n\n  7: { // Extension Substitution\n    substFormat:   r.uint16,\n    lookupType:    r.uint16,   // cannot also be 7\n    extension:     new r.Pointer(r.uint32, GSUBLookup)\n  },\n\n  8: { // Reverse Chaining Contextual Single Substitution\n    substFormat:            r.uint16,\n    coverage:               new r.Pointer(r.uint16, Coverage),\n    backtrackCoverage:      new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n    lookaheadGlyphCount:    r.uint16,\n    lookaheadCoverage:      new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n    glyphCount:             r.uint16,\n    substitutes:            new r.Array(r.uint16, 'glyphCount')\n  }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n  header: {\n    scriptList:     new r.Pointer(r.uint16, ScriptList),\n    featureList:    new r.Pointer(r.uint16, FeatureList),\n    lookupList:     new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n  },\n\n  0x00010000: {},\n  0x00010001: {\n    featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n  }\n});\n","import r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n  shrinkageEnableGSUB:    new r.Pointer(r.uint16, JstfGSUBModList),\n  shrinkageDisableGSUB:   new r.Pointer(r.uint16, JstfGSUBModList),\n  shrinkageEnableGPOS:    new r.Pointer(r.uint16, JstfGSUBModList),\n  shrinkageDisableGPOS:   new r.Pointer(r.uint16, JstfGSUBModList),\n  shrinkageJstfMax:       new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n  extensionEnableGSUB:    new r.Pointer(r.uint16, JstfGSUBModList),\n  extensionDisableGSUB:   new r.Pointer(r.uint16, JstfGSUBModList),\n  extensionEnableGPOS:    new r.Pointer(r.uint16, JstfGSUBModList),\n  extensionDisableGPOS:   new r.Pointer(r.uint16, JstfGSUBModList),\n  extensionJstfMax:       new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n  tag:         new r.String(4),\n  jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n  extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n  defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n  langSysCount:   r.uint16,\n  langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n  tag:    new r.String(4),\n  script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n  version:     r.uint32,  // should be 0x00010000\n  scriptCount: r.uint16,\n  scriptList:  new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import r from 'restructure';\nimport {resolveLength} from 'restructure/src/utils';\nimport {ItemVariationStore} from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n  constructor(size) {\n    this._size = size;\n  }\n\n  decode(stream, parent) {\n    switch (this.size(0, parent)) {\n      case 1: return stream.readUInt8();\n      case 2: return stream.readUInt16BE();\n      case 3: return stream.readUInt24BE();\n      case 4: return stream.readUInt32BE();\n    }\n  }\n\n  size(val, parent) {\n    return resolveLength(this._size, null, parent);\n  }\n}\n\nlet MapDataEntry = new r.Struct({\n  entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n  outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n  innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n  entryFormat: r.uint16,\n  mapCount: r.uint16,\n  mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n  majorVersion: r.uint16,\n  minorVersion: r.uint16,\n  itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n  advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n  LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n  RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import r from 'restructure';\n\nlet Signature = new r.Struct({\n  format: r.uint32,\n  length: r.uint32,\n  offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n  reserved:       new r.Reserved(r.uint16, 2),\n  cbSignature:    r.uint32,  // Length (in bytes) of the PKCS#7 packet in pbSignature\n  signature:      new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n  ulVersion:       r.uint32,  // Version number of the DSIG table (0x00000001)\n  usNumSigs:       r.uint16,  // Number of signatures in the table\n  usFlag:          r.uint16,  // Permission flags\n  signatures:      new r.Array(Signature, 'usNumSigs'),\n  signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import r from 'restructure';\n\nlet GaspRange = new r.Struct({\n  rangeMaxPPEM:       r.uint16,                  // Upper limit of range, in ppem\n  rangeGaspBehavior:  new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n    'grayscale', 'gridfit',\n    'symmetricSmoothing', 'symmetricGridfit'     // only in version 1, for ClearType\n  ])\n});\n\nexport default new r.Struct({\n  version:    r.uint16,  // set to 0\n  numRanges:  r.uint16,\n  gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n  pixelSize:      r.uint8,\n  maximumWidth:   r.uint8,\n  widths:         new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n  version:            r.uint16,\n  numRecords:         r.int16,\n  sizeDeviceRecord:   r.int32,\n  records:            new r.Array(DeviceRecord, 'numRecords')\n});\n","import r from 'restructure';\n\nlet KernPair = new r.Struct({\n  left:   r.uint16,\n  right:  r.uint16,\n  value:  r.int16\n});\n\nlet ClassTable = new r.Struct({\n  firstGlyph: r.uint16,\n  nGlyphs: r.uint16,\n  offsets: new r.Array(r.uint16, 'nGlyphs'),\n  max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n  off: t => t._startOffset - t.parent.parent._startOffset,\n  len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n  values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n  0: {\n    nPairs:         r.uint16,\n    searchRange:    r.uint16,\n    entrySelector:  r.uint16,\n    rangeShift:     r.uint16,\n    pairs:          new r.Array(KernPair, 'nPairs')\n  },\n\n  2: {\n    rowWidth:   r.uint16,\n    leftTable:  new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n    rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n    array:      new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n  },\n\n  3: {\n    glyphCount:       r.uint16,\n    kernValueCount:   r.uint8,\n    leftClassCount:   r.uint8,\n    rightClassCount:  r.uint8,\n    flags:            r.uint8,\n    kernValue:        new r.Array(r.int16, 'kernValueCount'),\n    leftClass:        new r.Array(r.uint8, 'glyphCount'),\n    rightClass:       new r.Array(r.uint8, 'glyphCount'),\n    kernIndex:        new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n  }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n  0: { // Microsoft uses this format\n    subVersion: r.uint16,  // Microsoft has an extra sub-table version number\n    length:     r.uint16,  // Length of the subtable, in bytes\n    format:     r.uint8,   // Format of subtable\n    coverage:   new r.Bitfield(r.uint8, [\n      'horizontal',    // 1 if table has horizontal data, 0 if vertical\n      'minimum',       // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n      'crossStream',   // If set to 1, kerning is perpendicular to the flow of the text\n      'override'      // If set to 1 the value in this table replaces the accumulated value\n    ]),\n    subtable:   KernSubtable,\n    padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n  },\n  1: { // Apple uses this format\n    length:     r.uint32,\n    coverage:   new r.Bitfield(r.uint8, [\n      null, null, null, null, null,\n      'variation',     // Set if table has variation kerning values\n      'crossStream',   // Set if table has cross-stream kerning values\n      'vertical'      // Set if table has vertical kerning values\n    ]),\n    format:     r.uint8,\n    tupleIndex: r.uint16,\n    subtable:   KernSubtable,\n    padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n  }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n  0: { // Microsoft Version\n    nTables:    r.uint16,\n    tables:     new r.Array(KernTable, 'nTables')\n  },\n\n  1: { // Apple Version\n    reserved:   new r.Reserved(r.uint16), // the other half of the version number\n    nTables:    r.uint32,\n    tables:     new r.Array(KernTable, 'nTables')\n  }\n});\n","import r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n  version:    r.uint16,\n  numGlyphs:  r.uint16,\n  yPels:      new r.Array(r.uint8, 'numGlyphs')\n});\n","import r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n  version:              r.uint16,\n  fontNumber:           r.uint32,\n  pitch:                r.uint16,\n  xHeight:              r.uint16,\n  style:                r.uint16,\n  typeFamily:           r.uint16,\n  capHeight:            r.uint16,\n  symbolSet:            r.uint16,\n  typeface:             new r.String(16),\n  characterComplement:  new r.String(8),\n  fileName:             new r.String(6),\n  strokeWeight:         new r.String(1),\n  widthType:            new r.String(1),\n  serifStyle:           r.uint8,\n  reserved:             new r.Reserved(r.uint8)\n});\n","import r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n  bCharSet:       r.uint8,                             // Character set\n  xRatio:         r.uint8,                             // Value to use for x-Ratio\n  yStartRatio:    r.uint8,                             // Starting y-Ratio value\n  yEndRatio:      r.uint8                              // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n  yPelHeight:     r.uint16,                            // yPelHeight to which values apply\n  yMax:           r.int16,                             // Maximum value (in pels) for this yPelHeight\n  yMin:           r.int16                              // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n  recs:           r.uint16,                            // Number of height records in this group\n  startsz:        r.uint8,                             // Starting yPelHeight\n  endsz:          r.uint8,                             // Ending yPelHeight\n  entries:        new r.Array(vTable, 'recs')          // The VDMX records\n});\n\nexport default new r.Struct({\n  version:        r.uint16,                            // Version number (0 or 1)\n  numRecs:        r.uint16,                            // Number of VDMX groups present\n  numRatios:      r.uint16,                            // Number of aspect ratio groupings\n  ratioRanges:    new r.Array(Ratio, 'numRatios'),     // Ratio ranges\n  offsets:        new r.Array(r.uint16, 'numRatios'),  // Offset to the VDMX group for this ratio range\n  groups:         new r.Array(VdmxGroup, 'numRecs')    // The actual VDMX groupings\n});\n","import r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n  version:                r.uint16,  // Version number of the Vertical Header Table\n  ascent:                 r.int16,   // The vertical typographic ascender for this font\n  descent:                r.int16,   // The vertical typographic descender for this font\n  lineGap:                r.int16,   // The vertical typographic line gap for this font\n  advanceHeightMax:       r.int16,   // The maximum advance height measurement found in the font\n  minTopSideBearing:      r.int16,   // The minimum top side bearing measurement found in the font\n  minBottomSideBearing:   r.int16,   // The minimum bottom side bearing measurement found in the font\n  yMaxExtent:             r.int16,\n  caretSlopeRise:         r.int16,   // Caret slope (rise/run)\n  caretSlopeRun:          r.int16,\n  caretOffset:            r.int16,   // Set value equal to 0 for nonslanted fonts\n  reserved:               new r.Reserved(r.int16, 4),\n  metricDataFormat:       r.int16,   // Set to 0\n  numberOfMetrics:        r.uint16   // Number of advance heights in the Vertical Metrics table\n});\n","import r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n  advance: r.uint16,  // The advance height of the glyph\n  bearing: r.int16    // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n  metrics:  new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n  bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n  fromCoord: shortFrac,\n  toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n  pairCount: r.uint16,\n  correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n  version: r.fixed32,\n  axisCount: r.uint32,\n  segment: new r.Array(Segment, 'axisCount')\n});\n","import r from 'restructure';\n\nclass UnboundedArrayAccessor {\n  constructor(type, stream, parent) {\n    this.type = type;\n    this.stream = stream;\n    this.parent = parent;\n    this.base = this.stream.pos;\n    this._items = [];\n  }\n\n  getItem(index) {\n    if (this._items[index] == null) {\n      let pos = this.stream.pos;\n      this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n      this._items[index] = this.type.decode(this.stream, this.parent);\n      this.stream.pos = pos;\n    }\n\n    return this._items[index];\n  }\n\n  inspect() {\n    return `[UnboundedArray ${this.type.constructor.name}]`;\n  }\n}\n\nexport class UnboundedArray extends r.Array {\n  constructor(type) {\n    super(type, 0);\n  }\n\n  decode(stream, parent) {\n    return new UnboundedArrayAccessor(this.type, stream, parent);\n  }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n  // Helper class that makes internal structures invisible to pointers\n  class Shadow {\n    constructor(type) {\n      this.type = type;\n    }\n\n    decode(stream, ctx) {\n      ctx = ctx.parent.parent;\n      return this.type.decode(stream, ctx);\n    }\n\n    size(val, ctx) {\n      ctx = ctx.parent.parent;\n      return this.type.size(val, ctx);\n    }\n\n    encode(stream, val, ctx) {\n      ctx = ctx.parent.parent;\n      return this.type.encode(stream, val, ctx);\n    }\n  }\n\n  ValueType = new Shadow(ValueType);\n\n  let BinarySearchHeader = new r.Struct({\n    unitSize: r.uint16,\n    nUnits: r.uint16,\n    searchRange: r.uint16,\n    entrySelector: r.uint16,\n    rangeShift: r.uint16\n  });\n\n  let LookupSegmentSingle = new r.Struct({\n    lastGlyph: r.uint16,\n    firstGlyph: r.uint16,\n    value: ValueType\n  });\n\n  let LookupSegmentArray = new r.Struct({\n    lastGlyph: r.uint16,\n    firstGlyph: r.uint16,\n    values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n  });\n\n  let LookupSingle = new r.Struct({\n    glyph: r.uint16,\n    value: ValueType\n  });\n\n  return new r.VersionedStruct(r.uint16, {\n    0: {\n      values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n    },\n    2: {\n      binarySearchHeader: BinarySearchHeader,\n      segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n    },\n    4: {\n      binarySearchHeader: BinarySearchHeader,\n      segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n    },\n    6: {\n      binarySearchHeader: BinarySearchHeader,\n      segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n    },\n    8: {\n      firstGlyph: r.uint16,\n      count: r.uint16,\n      values: new r.Array(ValueType, 'count')\n    }\n  });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n  let entry = Object.assign({\n    newState: r.uint16,\n    flags: r.uint16\n  }, entryData);\n\n  let Entry = new r.Struct(entry);\n  let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n  let StateHeader = new r.Struct({\n    nClasses: r.uint32,\n    classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n    stateArray: new r.Pointer(r.uint32, StateArray),\n    entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n  });\n\n  return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n  let ClassLookupTable = new r.Struct({\n    version() { return 8; }, // simulate LookupTable\n    firstGlyph: r.uint16,\n    values: new r.Array(r.uint8, r.uint16)\n  });\n\n  let entry = Object.assign({\n    newStateOffset: r.uint16,\n    // convert offset to stateArray index\n    newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n    flags: r.uint16\n  }, entryData);\n\n  let Entry = new r.Struct(entry);\n  let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n  let StateHeader1 = new r.Struct({\n    nClasses: r.uint16,\n    classTable: new r.Pointer(r.uint16, ClassLookupTable),\n    stateArray: new r.Pointer(r.uint16, StateArray),\n    entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n  });\n\n  return StateHeader1;\n}\n","import r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n  0: { // Distance-based, no mapping\n    deltas: new r.Array(r.int16, 32)\n  },\n\n  1: { // Distance-based, with mapping\n    deltas: new r.Array(r.int16, 32),\n    mappingData: new LookupTable(r.uint16)\n  },\n\n  2: { // Control point-based, no mapping\n    standardGlyph: r.uint16,\n    controlPoints: new r.Array(r.uint16, 32)\n  },\n\n  3: { // Control point-based, with mapping\n    standardGlyph: r.uint16,\n    controlPoints: new r.Array(r.uint16, 32),\n    mappingData: new LookupTable(r.uint16)\n  }\n});\n\nexport default new r.Struct({\n  version: r.fixed32,\n  format: r.uint16,\n  defaultBaseline: r.uint16,\n  subtable: BslnSubtable\n});\n","import r from 'restructure';\n\nlet Setting = new r.Struct({\n  setting: r.uint16,\n  nameIndex: r.int16,\n  name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n  feature: r.uint16,\n  nSettings: r.uint16,\n  settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n  featureFlags: new r.Bitfield(r.uint8, [\n    null, null, null, null, null, null,\n    'hasDefault', 'exclusive'\n  ]),\n  defaultSetting: r.uint8,\n  nameIndex: r.int16,\n  name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n  version: r.fixed32,\n  featureNameCount: r.uint16,\n  reserved1: new r.Reserved(r.uint16),\n  reserved2: new r.Reserved(r.uint32),\n  featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import r from 'restructure';\n\nlet Axis = new r.Struct({\n  axisTag: new r.String(4),\n  minValue: r.fixed32,\n  defaultValue: r.fixed32,\n  maxValue: r.fixed32,\n  flags: r.uint16,\n  nameID: r.uint16,\n  name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n  nameID: r.uint16,\n  name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n  flags: r.uint16,\n  coord: new r.Array(r.fixed32, t => t.parent.axisCount),\n  postscriptNameID: new r.Optional(r.uint16, t => t.parent.instanceSize - t._currentOffset > 0)\n});\n\nexport default new r.Struct({\n  version: r.fixed32,\n  offsetToData: r.uint16,\n  countSizePairs: r.uint16,\n  axisCount: r.uint16,\n  axisSize: r.uint16,\n  instanceCount: r.uint16,\n  instanceSize: r.uint16,\n  axis: new r.Array(Axis, 'axisCount'),\n  instance: new r.Array(Instance, 'instanceCount')\n});\n","import r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n  static decode(stream, parent) {\n    // In short format, offsets are multiplied by 2.\n    // This doesn't seem to be documented by Apple, but it\n    // is implemented this way in Freetype.\n    return parent.flags \n      ? stream.readUInt32BE()\n      : stream.readUInt16BE() * 2;\n  }\n}\n\nlet gvar = new r.Struct({\n  version: r.uint16,\n  reserved: new r.Reserved(r.uint16),\n  axisCount: r.uint16,\n  globalCoordCount: r.uint16,\n  globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n  glyphCount: r.uint16,\n  flags: r.uint16,\n  offsetToData: r.uint32,\n  offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: 'offsetToData', allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n  length: r.uint16,\n  coverage: r.uint16,\n  subFeatureFlags: r.uint32,\n  stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n  justClass: r.uint32,\n  beforeGrowLimit: r.fixed32,\n  beforeShrinkLimit: r.fixed32,\n  afterGrowLimit: r.fixed32,\n  afterShrinkLimit: r.fixed32,\n  growFlags: r.uint16,\n  shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n  0: { // Decomposition action\n    lowerLimit: r.fixed32,\n    upperLimit: r.fixed32,\n    order: r.uint16,\n    glyphs: new r.Array(r.uint16, r.uint16)\n  },\n\n  1: { // Unconditional add glyph action\n    addGlyph: r.uint16\n  },\n\n  2: { // Conditional add glyph action\n    substThreshold: r.fixed32,\n    addGlyph: r.uint16,\n    substGlyph: r.uint16\n  },\n\n  3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n  4: { // Ductile glyph action (not supported by CoreText)\n    variationAxis: r.uint32,\n    minimumLimit: r.fixed32,\n    noStretchValue: r.fixed32,\n    maximumLimit: r.fixed32\n  },\n\n  5: { // Repeated add glyph action\n    flags: r.uint16,\n    glyph: r.uint16\n  }\n});\n\nlet Action = new r.Struct({\n  actionClass: r.uint16,\n  actionType: r.uint16,\n  actionLength: r.uint32,\n  actionData: ActionData,\n  padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n  lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n  classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n  wdcOffset: r.uint16,\n  postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n  widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: 'wdcOffset' }))\n});\n\nexport default new r.Struct({\n  version: r.uint32,\n  format: r.uint16,\n  horizontal: new r.Pointer(r.uint16, JustificationTable),\n  vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n  action: r.uint16\n};\n\nlet ContextualData = {\n  markIndex: r.uint16,\n  currentIndex: r.uint16\n};\n\nlet InsertionData = {\n  currentInsertIndex: r.uint16,\n  markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n  items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n  0: { // Indic Rearrangement Subtable\n    stateTable: new StateTable\n  },\n\n  1: { // Contextual Glyph Substitution Subtable\n    stateTable: new StateTable(ContextualData),\n    substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n  },\n\n  2: { // Ligature subtable\n    stateTable: new StateTable(LigatureData),\n    ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n    components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n    ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n  },\n\n  4: { // Non-contextual Glyph Substitution Subtable\n    lookupTable: new LookupTable\n  },\n\n  5: { // Glyph Insertion Subtable\n    stateTable: new StateTable(InsertionData),\n    insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n  }\n});\n\nlet Subtable = new r.Struct({\n  length: r.uint32,\n  coverage: r.uint24,\n  type: r.uint8,\n  subFeatureFlags: r.uint32,\n  table: SubtableData,\n  padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n  featureType:    r.uint16,\n  featureSetting: r.uint16,\n  enableFlags:    r.uint32,\n  disableFlags:   r.uint32\n});\n\nlet MorxChain = new r.Struct({\n  defaultFlags:     r.uint32,\n  chainLength:      r.uint32,\n  nFeatureEntries:  r.uint32,\n  nSubtables:       r.uint32,\n  features:         new r.Array(FeatureEntry, 'nFeatureEntries'),\n  subtables:        new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n  version:  r.uint16,\n  unused:   new r.Reserved(r.uint16),\n  nChains:  r.uint32,\n  chains:   new r.Array(MorxChain, 'nChains')\n});\n","import r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n  left: r.int16,\n  top: r.int16,\n  right: r.int16,\n  bottom: r.int16\n});\n\nexport default new r.Struct({\n  version: r.fixed32,\n  format: r.uint16,\n  lookupTable: new LookupTable(OpticalBounds)\n});\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n  tag:        new r.String(4),\n  checkSum:   r.uint32,\n  offset:     new r.Pointer(r.uint32, 'void', { type: 'global' }),\n  length:     r.uint32\n});\n\nlet Directory = new r.Struct({\n  tag:            new r.String(4),\n  numTables:      r.uint16,\n  searchRange:    r.uint16,\n  entrySelector:  r.uint16,\n  rangeShift:     r.uint16,\n  tables:         new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n  let tables = {};\n  for (let table of this.tables) {\n    tables[table.tag] = table;\n  }\n\n  this.tables = tables;\n};\n\nDirectory.preEncode = function(stream) {\n  let tables = [];\n  for (let tag in this.tables) {\n    let table = this.tables[tag];\n    if (table) {\n      tables.push({\n        tag: tag,\n        checkSum: 0,\n        offset: new r.VoidPointer(Tables[tag], table),\n        length: Tables[tag].size(table)\n      });\n    }\n  }\n\n  this.tag = 'true';\n  this.numTables = tables.length;\n  this.tables = tables;\n\n  let maxExponentFor2 = Math.floor((Math.log(this.numTables) / Math.LN2));\n  let maxPowerOf2 = Math.pow(2, maxExponentFor2);\n\n  this.searchRange =  maxPowerOf2 * 16;\n  this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;\n  this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","export function binarySearch(arr, cmp) {\n  let min = 0;\n  let max = arr.length - 1;\n  while (min <= max) {\n    let mid = (min + max) >> 1;\n    let res = cmp(arr[mid]);\n\n    if (res < 0) {\n      max = mid - 1;\n    } else if (res > 0) {\n      min = mid + 1;\n    } else {\n      return mid;\n    }\n  }\n\n  return -1;\n}\n\nexport function range(index, end) {\n  let range = [];\n  while (index < end) {\n    range.push(index++);\n  }\n  return range;\n}\n","import {binarySearch} from './utils';\nimport {getEncoding} from './encodings';\nimport {cache} from './decorators';\nimport {range} from './utils';\n\n// iconv-lite is an optional dependency.\ntry {\n  var iconv = require('iconv-lite');\n} catch (err) {}\n\nexport default class CmapProcessor {\n  constructor(cmapTable) {\n    // Attempt to find a Unicode cmap first\n    this.encoding = null;\n    this.cmap = this.findSubtable(cmapTable, [\n      // 32-bit subtables\n      [3, 10],\n      [0, 6],\n      [0, 4],\n\n      // 16-bit subtables\n      [3, 1],\n      [0, 3],\n      [0, 2],\n      [0, 1],\n      [0, 0]\n    ]);\n\n    // If not unicode cmap was found, and iconv-lite is installed,\n    // take the first table with a supported encoding.\n    if (!this.cmap && iconv) {\n      for (let cmap of cmapTable.tables) {\n        let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n        if (iconv.encodingExists(encoding)) {\n          this.cmap = cmap.table;\n          this.encoding = encoding;\n        }\n      }\n    }\n\n    if (!this.cmap) {\n      throw new Error(\"Could not find a supported cmap table\");\n    }\n\n    this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n    if (this.uvs && this.uvs.version !== 14) {\n      this.uvs = null;\n    }\n  }\n\n  findSubtable(cmapTable, pairs) {\n    for (let [platformID, encodingID] of pairs) {\n      for (let cmap of cmapTable.tables) {\n        if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n          return cmap.table;\n        }\n      }\n    }\n\n    return null;\n  }\n\n  lookup(codepoint, variationSelector) {\n    // If there is no Unicode cmap in this font, we need to re-encode\n    // the codepoint in the encoding that the cmap supports.\n    if (this.encoding) {\n      let buf = iconv.encode(String.fromCodePoint(codepoint), this.encoding);\n      codepoint = 0;\n      for (let i = 0; i < buf.length; i++) {\n        codepoint = (codepoint << 8) | buf[i];\n      }\n\n    // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n    } else if (variationSelector) {\n      let gid = this.getVariationSelector(codepoint, variationSelector);\n      if (gid) {\n        return gid;\n      }\n    }\n\n    let cmap = this.cmap;\n    switch (cmap.version) {\n      case 0:\n        return cmap.codeMap.get(codepoint) || 0;\n\n      case 4: {\n        let min = 0;\n        let max = cmap.segCount - 1;\n        while (min <= max) {\n          let mid = (min + max) >> 1;\n\n          if (codepoint < cmap.startCode.get(mid)) {\n            max = mid - 1;\n          } else if (codepoint > cmap.endCode.get(mid)) {\n            min = mid + 1;\n          } else {\n            let rangeOffset = cmap.idRangeOffset.get(mid);\n            let gid;\n\n            if (rangeOffset === 0) {\n              gid = codepoint + cmap.idDelta.get(mid);\n            } else {\n              let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n              gid = cmap.glyphIndexArray.get(index) || 0;\n              if (gid !== 0) {\n                gid += cmap.idDelta.get(mid);\n              }\n            }\n\n            return gid & 0xffff;\n          }\n        }\n\n        return 0;\n      }\n\n      case 8:\n        throw new Error('TODO: cmap format 8');\n\n      case 6:\n      case 10:\n        return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n      case 12:\n      case 13: {\n        let min = 0;\n        let max = cmap.nGroups - 1;\n        while (min <= max) {\n          let mid = (min + max) >> 1;\n          let group = cmap.groups.get(mid);\n\n          if (codepoint < group.startCharCode) {\n            max = mid - 1;\n          } else if (codepoint > group.endCharCode) {\n            min = mid + 1;\n          } else {\n            if (cmap.version === 12) {\n              return group.glyphID + (codepoint - group.startCharCode);\n            } else {\n              return group.glyphID;\n            }\n          }\n        }\n\n        return 0;\n      }\n\n      case 14:\n        throw new Error('TODO: cmap format 14');\n\n      default:\n        throw new Error(`Unknown cmap format ${cmap.version}`);\n    }\n  }\n\n  getVariationSelector(codepoint, variationSelector) {\n    if (!this.uvs) {\n      return 0;\n    }\n\n    let selectors = this.uvs.varSelectors.toArray();\n    let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n    let sel = selectors[i];\n\n    if (i !== -1 && sel.defaultUVS) {\n      i = binarySearch(sel.defaultUVS, x =>\n        codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n      );\n    }\n\n    if (i !== -1 && sel.nonDefaultUVS) {\n      i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n      if (i !== -1) {\n        return sel.nonDefaultUVS[i].glyphID;\n      }\n    }\n\n    return 0;\n  }\n\n  @cache\n  getCharacterSet() {\n    let cmap = this.cmap;\n    switch (cmap.version) {\n      case 0:\n        return range(0, cmap.codeMap.length);\n\n      case 4: {\n        let res = [];\n        let endCodes = cmap.endCode.toArray();\n        for (let i = 0; i < endCodes.length; i++) {\n          let tail = endCodes[i] + 1;\n          let start = cmap.startCode.get(i);\n          res.push(...range(start, tail));\n        }\n\n        return res;\n      }\n\n      case 8:\n        throw new Error('TODO: cmap format 8');\n\n      case 6:\n      case 10:\n        return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n      case 12:\n      case 13: {\n        let res = [];\n        for (let group of cmap.groups.toArray()) {\n          res.push(...range(group.startCharCode, group.endCharCode + 1));\n        }\n\n        return res;\n      }\n\n      case 14:\n        throw new Error('TODO: cmap format 14');\n\n      default:\n        throw new Error(`Unknown cmap format ${cmap.version}`);\n    }\n  }\n\n  @cache\n  codePointsForGlyph(gid) {\n    let cmap = this.cmap;\n    switch (cmap.version) {\n      case 0: {\n        let res = [];\n        for (let i = 0; i < 256; i++) {\n          if (cmap.codeMap.get(i) === gid) {\n            res.push(i);\n          }\n        }\n\n        return res;\n      }\n\n      case 4: {\n        let res = [];\n        for (let i = 0; i < cmap.segCount; i++) {\n          let end = cmap.endCode.get(i);\n          let start = cmap.startCode.get(i);\n          let rangeOffset = cmap.idRangeOffset.get(i);\n          let delta = cmap.idDelta.get(i);\n\n          for (var c = start; c <= end; c++) {\n            let g = 0;\n            if (rangeOffset === 0) {\n              g = c + delta;\n            } else {\n              let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n              g = cmap.glyphIndexArray.get(index) || 0;\n              if (g !== 0) {\n                g += delta;\n              }\n            }\n\n            if (g === gid) {\n              res.push(c);\n            }\n          }\n        }\n\n        return res;\n      }\n\n      case 12: {\n        let res = [];\n        for (let group of cmap.groups.toArray()) {\n          if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n            res.push(group.startCharCode + (gid - group.glyphID));\n          }\n        }\n\n        return res;\n      }\n\n      case 13: {\n        let res = [];\n        for (let group of cmap.groups.toArray()) {\n          if (gid === group.glyphID) {\n            res.push(...range(group.startCharCode, group.endCharCode + 1));\n          }\n        }\n\n        return res;\n      }\n\n      default:\n        throw new Error(`Unknown cmap format ${cmap.version}`);\n    }\n  }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n  constructor(font) {\n    this.kern = font.kern;\n  }\n\n  process(glyphs, positions) {\n    for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n      let left = glyphs[glyphIndex].id;\n      let right = glyphs[glyphIndex + 1].id;\n      positions[glyphIndex].xAdvance += this.getKerning(left, right);\n    }\n  }\n\n  getKerning(left, right) {\n    let res = 0;\n\n    for (let table of this.kern.tables) {\n      if (table.coverage.crossStream) {\n        continue;\n      }\n\n      switch (table.version) {\n        case 0:\n          if (!table.coverage.horizontal) {\n            continue;\n          }\n\n          break;\n        case 1:\n          if (table.coverage.vertical || table.coverage.variation) {\n            continue;\n          }\n\n          break;\n        default:\n          throw new Error(`Unsupported kerning table version ${table.version}`);\n      }\n\n      let val = 0;\n      let s = table.subtable;\n      switch (table.format) {\n        case 0:\n          let pairIdx = binarySearch(s.pairs, function (pair) {\n            return (left - pair.left) || (right - pair.right);\n          });\n\n          if (pairIdx >= 0) {\n            val = s.pairs[pairIdx].value;\n          }\n\n          break;\n\n        case 2:\n          let leftOffset = 0, rightOffset = 0;\n          if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n            leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n          } else {\n            leftOffset = s.array.off;\n          }\n\n          if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n            rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n          }\n\n          let index = (leftOffset + rightOffset - s.array.off) / 2;\n          val = s.array.values.get(index);\n          break;\n\n        case 3:\n          if (left >= s.glyphCount || right >= s.glyphCount) {\n            return 0;\n          }\n\n          val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n          break;\n\n        default:\n          throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n      }\n\n      // Microsoft supports the override flag, which resets the result\n      // Otherwise, the sum of the results from all subtables is returned\n      if (table.coverage.override) {\n        res = val;\n      } else {\n        res += val;\n      }\n    }\n\n    return res;\n  }\n}\n","import unicode from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n  constructor(font) {\n    this.font = font;\n  }\n\n  positionGlyphs(glyphs, positions) {\n    // find each base + mark cluster, and position the marks relative to the base\n    let clusterStart = 0;\n    let clusterEnd = 0;\n    for (let index = 0; index < glyphs.length; index++) {\n      let glyph = glyphs[index];\n      if (glyph.isMark) { // TODO: handle ligatures\n        clusterEnd = index;\n      } else {\n        if (clusterStart !== clusterEnd) {\n          this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n        }\n\n        clusterStart = clusterEnd = index;\n      }\n    }\n\n    if (clusterStart !== clusterEnd) {\n      this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n    }\n\n    return positions;\n  }\n\n  positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n    let base = glyphs[clusterStart];\n    let baseBox = base.cbox.copy();\n\n    // adjust bounding box for ligature glyphs\n    if (base.codePoints.length > 1) {\n      // LTR. TODO: RTL support.\n      baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n    }\n\n    let xOffset = -positions[clusterStart].xAdvance;\n    let yOffset = 0;\n    let yGap = this.font.unitsPerEm / 16;\n\n    // position each of the mark glyphs relative to the base glyph\n    for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n      let mark = glyphs[index];\n      let markBox = mark.cbox;\n      let position = positions[index];\n\n      let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n      if (combiningClass !== 'Not_Reordered') {\n        position.xOffset = position.yOffset = 0;\n\n        // x positioning\n        switch (combiningClass) {\n          case 'Double_Above':\n          case 'Double_Below':\n            // LTR. TODO: RTL support.\n            position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n            break;\n\n          case 'Attached_Below_Left':\n          case 'Below_Left':\n          case 'Above_Left':\n            // left align\n            position.xOffset += baseBox.minX - markBox.minX;\n            break;\n\n          case 'Attached_Above_Right':\n          case 'Below_Right':\n          case 'Above_Right':\n            // right align\n            position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n            break;\n\n          default: // Attached_Below, Attached_Above, Below, Above, other\n            // center align\n            position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n        }\n\n        // y positioning\n        switch (combiningClass) {\n          case 'Double_Below':\n          case 'Below_Left':\n          case 'Below':\n          case 'Below_Right':\n          case 'Attached_Below_Left':\n          case 'Attached_Below':\n            // add a small gap between the glyphs if they are not attached\n            if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n              baseBox.minY += yGap;\n            }\n\n            position.yOffset = -baseBox.minY - markBox.maxY;\n            baseBox.minY += markBox.height;\n            break;\n\n          case 'Double_Above':\n          case 'Above_Left':\n          case 'Above':\n          case 'Above_Right':\n          case 'Attached_Above':\n          case 'Attached_Above_Right':\n            // add a small gap between the glyphs if they are not attached\n            if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n              baseBox.maxY += yGap;\n            }\n\n            position.yOffset = baseBox.maxY - markBox.minY;\n            baseBox.maxY += markBox.height;\n            break;\n        }\n\n        position.xAdvance = position.yAdvance = 0;\n        position.xOffset += xOffset;\n        position.yOffset += yOffset;\n\n      } else {\n        xOffset -= position.xAdvance;\n        yOffset -= position.yAdvance;\n      }\n    }\n\n    return;\n  }\n\n  getCombiningClass(codePoint) {\n    let combiningClass = unicode.getCombiningClass(codePoint);\n\n    // Thai / Lao need some per-character work\n    if ((codePoint & ~0xff) === 0x0e00) {\n      if (combiningClass === 'Not_Reordered') {\n        switch (codePoint) {\n          case 0x0e31:\n          case 0x0e34:\n          case 0x0e35:\n          case 0x0e36:\n          case 0x0e37:\n          case 0x0e47:\n          case 0x0e4c:\n          case 0x0e3d:\n          case 0x0e4e:\n            return 'Above_Right';\n\n          case 0x0eb1:\n          case 0x0eb4:\n          case 0x0eb5:\n          case 0x0eb6:\n          case 0x0eb7:\n          case 0x0ebb:\n          case 0x0ecc:\n          case 0x0ecd:\n            return 'Above';\n\n          case 0x0ebc:\n            return 'Below';\n        }\n      } else if (codePoint === 0x0e3a) { // virama\n        return 'Below_Right';\n      }\n    }\n\n    switch (combiningClass) {\n      // Hebrew\n\n      case 'CCC10': // sheva\n      case 'CCC11': // hataf segol\n      case 'CCC12': // hataf patah\n      case 'CCC13': // hataf qamats\n      case 'CCC14': // hiriq\n      case 'CCC15': // tsere\n      case 'CCC16': // segol\n      case 'CCC17': // patah\n      case 'CCC18': // qamats\n      case 'CCC20': // qubuts\n      case 'CCC22': // meteg\n        return 'Below';\n\n      case 'CCC23': // rafe\n        return 'Attached_Above';\n\n      case 'CCC24': // shin dot\n        return 'Above_Right';\n\n      case 'CCC25': // sin dot\n      case 'CCC19': // holam\n        return 'Above_Left';\n\n      case 'CCC26': // point varika\n        return 'Above';\n\n      case 'CCC21': // dagesh\n        break;\n\n      // Arabic and Syriac\n\n      case 'CCC27': // fathatan\n      case 'CCC28': // dammatan\n      case 'CCC30': // fatha\n      case 'CCC31': // damma\n      case 'CCC33': // shadda\n      case 'CCC34': // sukun\n      case 'CCC35': // superscript alef\n      case 'CCC36': // superscript alaph\n        return 'Above';\n\n      case 'CCC29': // kasratan\n      case 'CCC32': // kasra\n        return 'Below';\n\n      // Thai\n\n      case 'CCC103': // sara u / sara uu\n        return 'Below_Right';\n\n      case 'CCC107': // mai\n        return 'Above_Right';\n\n      // Lao\n\n      case 'CCC118': // sign u / sign uu\n        return 'Below';\n\n      case 'CCC122': // mai\n        return 'Above';\n\n      // Tibetan\n\n      case 'CCC129': // sign aa\n      case 'CCC132': // sign u\n        return 'Below';\n\n      case 'CCC130': // sign i\n        return 'Above';\n    }\n\n    return combiningClass;\n  }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n  constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n    /**\n     * The minimum X position in the bounding box\n     * @type {number}\n     */\n    this.minX = minX;\n\n    /**\n     * The minimum Y position in the bounding box\n     * @type {number}\n     */\n    this.minY = minY;\n\n    /**\n     * The maxmimum X position in the bounding box\n     * @type {number}\n     */\n    this.maxX = maxX;\n\n    /**\n     * The maxmimum Y position in the bounding box\n     * @type {number}\n     */\n    this.maxY = maxY;\n  }\n\n  /**\n   * The width of the bounding box\n   * @type {number}\n   */\n  get width() {\n    return this.maxX - this.minX;\n  }\n\n  /**\n   * The height of the bounding box\n   * @type {number}\n   */\n  get height() {\n    return this.maxY - this.minY;\n  }\n\n  addPoint(x, y) {\n    if (Math.abs(x) !== Infinity) {\n      if (x < this.minX) {\n        this.minX = x;\n      }\n\n      if (x > this.maxX) {\n        this.maxX = x;\n      }\n    }\n\n    if (Math.abs(y) !== Infinity) {\n      if (y < this.minY) {\n        this.minY = y;\n      }\n\n      if (y > this.maxY) {\n        this.maxY = y;\n      }\n    }\n  }\n\n  copy() {\n    return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n  }\n}\n","import unicode from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n  Caucasian_Albanian: 'aghb',\n  Arabic: 'arab',\n  Imperial_Aramaic: 'armi',\n  Armenian: 'armn',\n  Avestan: 'avst',\n  Balinese: 'bali',\n  Bamum: 'bamu',\n  Bassa_Vah: 'bass',\n  Batak: 'batk',\n  Bengali: ['bng2', 'beng'],\n  Bopomofo: 'bopo',\n  Brahmi: 'brah',\n  Braille: 'brai',\n  Buginese: 'bugi',\n  Buhid: 'buhd',\n  Chakma: 'cakm',\n  Canadian_Aboriginal: 'cans',\n  Carian: 'cari',\n  Cham: 'cham',\n  Cherokee: 'cher',\n  Coptic: 'copt',\n  Cypriot: 'cprt',\n  Cyrillic: 'cyrl',\n  Devanagari: ['dev2', 'deva'],\n  Deseret: 'dsrt',\n  Duployan: 'dupl',\n  Egyptian_Hieroglyphs: 'egyp',\n  Elbasan: 'elba',\n  Ethiopic: 'ethi',\n  Georgian: 'geor',\n  Glagolitic: 'glag',\n  Gothic: 'goth',\n  Grantha: 'gran',\n  Greek: 'grek',\n  Gujarati: ['gjr2', 'gujr'],\n  Gurmukhi: ['gur2', 'guru'],\n  Hangul: 'hang',\n  Han: 'hani',\n  Hanunoo: 'hano',\n  Hebrew: 'hebr',\n  Hiragana: 'hira',\n  Pahawh_Hmong: 'hmng',\n  Katakana_Or_Hiragana: 'hrkt',\n  Old_Italic: 'ital',\n  Javanese: 'java',\n  Kayah_Li: 'kali',\n  Katakana: 'kana',\n  Kharoshthi: 'khar',\n  Khmer: 'khmr',\n  Khojki: 'khoj',\n  Kannada: ['knd2', 'knda'],\n  Kaithi: 'kthi',\n  Tai_Tham: 'lana',\n  Lao: 'lao ',\n  Latin: 'latn',\n  Lepcha: 'lepc',\n  Limbu: 'limb',\n  Linear_A: 'lina',\n  Linear_B: 'linb',\n  Lisu: 'lisu',\n  Lycian: 'lyci',\n  Lydian: 'lydi',\n  Mahajani: 'mahj',\n  Mandaic: 'mand',\n  Manichaean: 'mani',\n  Mende_Kikakui: 'mend',\n  Meroitic_Cursive: 'merc',\n  Meroitic_Hieroglyphs: 'mero',\n  Malayalam: ['mlm2', 'mlym'],\n  Modi: 'modi',\n  Mongolian: 'mong',\n  Mro: 'mroo',\n  Meetei_Mayek: 'mtei',\n  Myanmar: ['mym2', 'mymr'],\n  Old_North_Arabian: 'narb',\n  Nabataean: 'nbat',\n  Nko: 'nko ',\n  Ogham: 'ogam',\n  Ol_Chiki: 'olck',\n  Old_Turkic: 'orkh',\n  Oriya: ['ory2', 'orya'],\n  Osmanya: 'osma',\n  Palmyrene: 'palm',\n  Pau_Cin_Hau: 'pauc',\n  Old_Permic: 'perm',\n  Phags_Pa: 'phag',\n  Inscriptional_Pahlavi: 'phli',\n  Psalter_Pahlavi: 'phlp',\n  Phoenician: 'phnx',\n  Miao: 'plrd',\n  Inscriptional_Parthian: 'prti',\n  Rejang: 'rjng',\n  Runic: 'runr',\n  Samaritan: 'samr',\n  Old_South_Arabian: 'sarb',\n  Saurashtra: 'saur',\n  Shavian: 'shaw',\n  Sharada: 'shrd',\n  Siddham: 'sidd',\n  Khudawadi: 'sind',\n  Sinhala: 'sinh',\n  Sora_Sompeng: 'sora',\n  Sundanese: 'sund',\n  Syloti_Nagri: 'sylo',\n  Syriac: 'syrc',\n  Tagbanwa: 'tagb',\n  Takri: 'takr',\n  Tai_Le: 'tale',\n  New_Tai_Lue: 'talu',\n  Tamil: ['tml2', 'taml'],\n  Tai_Viet: 'tavt',\n  Telugu: ['tel2', 'telu'],\n  Tifinagh: 'tfng',\n  Tagalog: 'tglg',\n  Thaana: 'thaa',\n  Thai: 'thai',\n  Tibetan: 'tibt',\n  Tirhuta: 'tirh',\n  Ugaritic: 'ugar',\n  Vai: 'vai ',\n  Warang_Citi: 'wara',\n  Old_Persian: 'xpeo',\n  Cuneiform: 'xsux',\n  Yi: 'yi  ',\n  Inherited: 'zinh',\n  Common: 'zyyy',\n  Unknown: 'zzzz'\n};\n\nconst OPENTYPE_SCRIPTS = {};\nfor (let script in UNICODE_SCRIPTS) {\n  let tag = UNICODE_SCRIPTS[script];\n  if (Array.isArray(tag)) {\n    for (let t of tag) {\n      OPENTYPE_SCRIPTS[t] = script;\n    }\n  } else {\n    OPENTYPE_SCRIPTS[tag] = script;\n  }\n}\n\nexport function fromUnicode(script) {\n  return UNICODE_SCRIPTS[script];\n}\n\nexport function fromOpenType(tag) {\n  return OPENTYPE_SCRIPTS[tag];\n}\n\nexport function forString(string) {\n  let len = string.length;\n  let idx = 0;\n  while (idx < len) {\n    let code = string.charCodeAt(idx++);\n\n    // Check if this is a high surrogate\n    if (0xd800 <= code && code <= 0xdbff && idx < len) {\n      let next = string.charCodeAt(idx);\n\n      // Check if this is a low surrogate\n      if (0xdc00 <= next && next <= 0xdfff) {\n        idx++;\n        code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n      }\n    }\n\n    let script = unicode.getScript(code);\n    if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n      return UNICODE_SCRIPTS[script];\n    }\n  }\n\n  return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n  for (let i = 0; i < codePoints.length; i++) {\n    let codePoint = codePoints[i];\n    let script = unicode.getScript(codePoint);\n    if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n      return UNICODE_SCRIPTS[script];\n    }\n  }\n\n  return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n  arab: true,   // Arabic\n  hebr: true,   // Hebrew\n  syrc: true,   // Syriac\n  thaa: true,   // Thaana\n  cprt: true,   // Cypriot Syllabary\n  khar: true,   // Kharosthi\n  phnx: true,   // Phoenician\n  'nko ': true, // N'Ko\n  lydi: true,   // Lydian\n  avst: true,   // Avestan\n  armi: true,   // Imperial Aramaic\n  phli: true,   // Inscriptional Pahlavi\n  prti: true,   // Inscriptional Parthian\n  sarb: true,   // Old South Arabian\n  orkh: true,   // Old Turkic, Orkhon Runic\n  samr: true,   // Samaritan\n  mand: true,   // Mandaic, Mandaean\n  merc: true,   // Meroitic Cursive\n  mero: true,   // Meroitic Hieroglyphs\n\n  // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n  mani: true,   // Manichaean\n  mend: true,   // Mende Kikakui\n  nbat: true,   // Nabataean\n  narb: true,   // Old North Arabian\n  palm: true,   // Palmyrene\n  phlp: true    // Psalter Pahlavi\n};\n\nexport function direction(script) {\n  if (RTL[script]) {\n    return 'rtl';\n  }\n\n  return 'ltr';\n}\n","import BBox from '../glyph/BBox';\nimport * as Script from '../layout/Script';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n  constructor(glyphs, features, script, language, direction) {\n    /**\n     * An array of Glyph objects in the run\n     * @type {Glyph[]}\n     */\n    this.glyphs = glyphs;\n\n    /**\n     * An array of GlyphPosition objects for each glyph in the run\n     * @type {GlyphPosition[]}\n     */\n    this.positions = null;\n\n    /**\n     * The script that was requested for shaping. This was either passed in or detected automatically.\n     * @type {string}\n     */\n    this.script = script;\n\n    /**\n     * The language requested for shaping, as passed in. If `null`, the default language for the\n     * script was used.\n     * @type {string}\n     */\n    this.language = language || null;\n\n    /**\n     * The direction requested for shaping, as passed in (either ltr or rtl).\n     * If `null`, the default direction of the script is used.\n     * @type {string}\n     */\n    this.direction = direction || Script.direction(script);\n\n    /**\n     * The features requested during shaping. This is a combination of user\n     * specified features and features chosen by the shaper.\n     * @type {object}\n     */\n    this.features = {};\n\n    // Convert features to an object\n    if (Array.isArray(features)) {\n      for (let tag of features) {\n        this.features[tag] = true;\n      }\n    } else if (typeof features === 'object') {\n      this.features = features;\n    }\n  }\n\n  /**\n   * The total advance width of the run.\n   * @type {number}\n   */\n  get advanceWidth() {\n    let width = 0;\n    for (let position of this.positions) {\n      width += position.xAdvance;\n    }\n\n    return width;\n  }\n\n /**\n  * The total advance height of the run.\n  * @type {number}\n  */\n  get advanceHeight() {\n    let height = 0;\n    for (let position of this.positions) {\n      height += position.yAdvance;\n    }\n\n    return height;\n  }\n\n /**\n  * The bounding box containing all glyphs in the run.\n  * @type {BBox}\n  */\n  get bbox() {\n    let bbox = new BBox;\n\n    let x = 0;\n    let y = 0;\n    for (let index = 0; index < this.glyphs.length; index++) {\n      let glyph = this.glyphs[index];\n      let p = this.positions[index];\n      let b = glyph.bbox;\n\n      bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n      bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n      x += p.xAdvance;\n      y += p.yAdvance;\n    }\n\n    return bbox;\n  }\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n  constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n    /**\n     * The amount to move the virtual pen in the X direction after rendering this glyph.\n     * @type {number}\n     */\n    this.xAdvance = xAdvance;\n\n    /**\n     * The amount to move the virtual pen in the Y direction after rendering this glyph.\n     * @type {number}\n     */\n    this.yAdvance = yAdvance;\n\n    /**\n     * The offset from the pen position in the X direction at which to render this glyph.\n     * @type {number}\n     */\n    this.xOffset = xOffset;\n\n    /**\n     * The offset from the pen position in the Y direction at which to render this glyph.\n     * @type {number}\n     */\n    this.yOffset = yOffset;\n  }\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n  allTypographicFeatures: {\n    code: 0,\n    exclusive: false,\n    allTypeFeatures: 0\n  },\n  ligatures: {\n    code: 1,\n    exclusive: false,\n    requiredLigatures: 0,\n    commonLigatures: 2,\n    rareLigatures: 4,\n    // logos: 6\n    rebusPictures: 8,\n    diphthongLigatures: 10,\n    squaredLigatures: 12,\n    abbrevSquaredLigatures: 14,\n    symbolLigatures: 16,\n    contextualLigatures: 18,\n    historicalLigatures: 20\n  },\n  cursiveConnection: {\n    code: 2,\n    exclusive: true,\n    unconnected: 0,\n    partiallyConnected: 1,\n    cursive: 2\n  },\n  letterCase: {\n    code: 3,\n    exclusive: true\n  },\n    // upperAndLowerCase: 0          # deprecated\n    // allCaps: 1                    # deprecated\n    // allLowerCase: 2               # deprecated\n    // smallCaps: 3                  # deprecated\n    // initialCaps: 4                # deprecated\n    // initialCapsAndSmallCaps: 5    # deprecated\n  verticalSubstitution: {\n    code: 4,\n    exclusive: false,\n    substituteVerticalForms: 0\n  },\n  linguisticRearrangement: {\n    code: 5,\n    exclusive: false,\n    linguisticRearrangement: 0\n  },\n  numberSpacing: {\n    code: 6,\n    exclusive: true,\n    monospacedNumbers: 0,\n    proportionalNumbers: 1,\n    thirdWidthNumbers: 2,\n    quarterWidthNumbers: 3\n  },\n  smartSwash: {\n    code: 8,\n    exclusive: false,\n    wordInitialSwashes: 0,\n    wordFinalSwashes: 2,\n    // lineInitialSwashes: 4\n    // lineFinalSwashes: 6\n    nonFinalSwashes: 8\n  },\n  diacritics: {\n    code: 9,\n    exclusive: true,\n    showDiacritics: 0,\n    hideDiacritics: 1,\n    decomposeDiacritics: 2\n  },\n  verticalPosition: {\n    code: 10,\n    exclusive: true,\n    normalPosition: 0,\n    superiors: 1,\n    inferiors: 2,\n    ordinals: 3,\n    scientificInferiors: 4\n  },\n  fractions: {\n    code: 11,\n    exclusive: true,\n    noFractions: 0,\n    verticalFractions: 1,\n    diagonalFractions: 2\n  },\n  overlappingCharacters: {\n    code: 13,\n    exclusive: false,\n    preventOverlap: 0\n  },\n  typographicExtras: {\n    code: 14,\n    exclusive: false,\n    // hyphensToEmDash: 0\n    // hyphenToEnDash: 2\n    slashedZero: 4\n  },\n    // formInterrobang: 6\n    // smartQuotes: 8\n    // periodsToEllipsis: 10\n  mathematicalExtras: {\n    code: 15,\n    exclusive: false,\n    // hyphenToMinus: 0\n    // asteristoMultiply: 2\n    // slashToDivide: 4\n    // inequalityLigatures: 6\n    // exponents: 8\n    mathematicalGreek: 10\n  },\n  ornamentSets: {\n    code: 16,\n    exclusive: true,\n    noOrnaments: 0,\n    dingbats: 1,\n    piCharacters: 2,\n    fleurons: 3,\n    decorativeBorders: 4,\n    internationalSymbols: 5,\n    mathSymbols: 6\n  },\n  characterAlternatives: {\n    code: 17,\n    exclusive: true,\n    noAlternates: 0\n  },\n    // user defined options\n  designComplexity: {\n    code: 18,\n    exclusive: true,\n    designLevel1: 0,\n    designLevel2: 1,\n    designLevel3: 2,\n    designLevel4: 3,\n    designLevel5: 4\n  },\n  styleOptions: {\n    code: 19,\n    exclusive: true,\n    noStyleOptions: 0,\n    displayText: 1,\n    engravedText: 2,\n    illuminatedCaps: 3,\n    titlingCaps: 4,\n    tallCaps: 5\n  },\n  characterShape: {\n    code: 20,\n    exclusive: true,\n    traditionalCharacters: 0,\n    simplifiedCharacters: 1,\n    JIS1978Characters: 2,\n    JIS1983Characters: 3,\n    JIS1990Characters: 4,\n    traditionalAltOne: 5,\n    traditionalAltTwo: 6,\n    traditionalAltThree: 7,\n    traditionalAltFour: 8,\n    traditionalAltFive: 9,\n    expertCharacters: 10,\n    JIS2004Characters: 11,\n    hojoCharacters: 12,\n    NLCCharacters: 13,\n    traditionalNamesCharacters: 14\n  },\n  numberCase: {\n    code: 21,\n    exclusive: true,\n    lowerCaseNumbers: 0,\n    upperCaseNumbers: 1\n  },\n  textSpacing: {\n    code: 22,\n    exclusive: true,\n    proportionalText: 0,\n    monospacedText: 1,\n    halfWidthText: 2,\n    thirdWidthText: 3,\n    quarterWidthText: 4,\n    altProportionalText: 5,\n    altHalfWidthText: 6\n  },\n  transliteration: {\n    code: 23,\n    exclusive: true,\n    noTransliteration: 0\n  },\n    // hanjaToHangul: 1\n    // hiraganaToKatakana: 2\n    // katakanaToHiragana: 3\n    // kanaToRomanization: 4\n    // romanizationToHiragana: 5\n    // romanizationToKatakana: 6\n    // hanjaToHangulAltOne: 7\n    // hanjaToHangulAltTwo: 8\n    // hanjaToHangulAltThree: 9\n  annotation: {\n    code: 24,\n    exclusive: true,\n    noAnnotation: 0,\n    boxAnnotation: 1,\n    roundedBoxAnnotation: 2,\n    circleAnnotation: 3,\n    invertedCircleAnnotation: 4,\n    parenthesisAnnotation: 5,\n    periodAnnotation: 6,\n    romanNumeralAnnotation: 7,\n    diamondAnnotation: 8,\n    invertedBoxAnnotation: 9,\n    invertedRoundedBoxAnnotation: 10\n  },\n  kanaSpacing: {\n    code: 25,\n    exclusive: true,\n    fullWidthKana: 0,\n    proportionalKana: 1\n  },\n  ideographicSpacing: {\n    code: 26,\n    exclusive: true,\n    fullWidthIdeographs: 0,\n    proportionalIdeographs: 1,\n    halfWidthIdeographs: 2\n  },\n  unicodeDecomposition: {\n    code: 27,\n    exclusive: false,\n    canonicalComposition: 0,\n    compatibilityComposition: 2,\n    transcodingComposition: 4\n  },\n  rubyKana: {\n    code: 28,\n    exclusive: false,\n    // noRubyKana: 0     # deprecated - use rubyKanaOff instead\n    // rubyKana: 1     # deprecated - use rubyKanaOn instead\n    rubyKana: 2\n  },\n  CJKSymbolAlternatives: {\n    code: 29,\n    exclusive: true,\n    noCJKSymbolAlternatives: 0,\n    CJKSymbolAltOne: 1,\n    CJKSymbolAltTwo: 2,\n    CJKSymbolAltThree: 3,\n    CJKSymbolAltFour: 4,\n    CJKSymbolAltFive: 5\n  },\n  ideographicAlternatives: {\n    code: 30,\n    exclusive: true,\n    noIdeographicAlternatives: 0,\n    ideographicAltOne: 1,\n    ideographicAltTwo: 2,\n    ideographicAltThree: 3,\n    ideographicAltFour: 4,\n    ideographicAltFive: 5\n  },\n  CJKVerticalRomanPlacement: {\n    code: 31,\n    exclusive: true,\n    CJKVerticalRomanCentered: 0,\n    CJKVerticalRomanHBaseline: 1\n  },\n  italicCJKRoman: {\n    code: 32,\n    exclusive: false,\n    // noCJKItalicRoman: 0     # deprecated - use CJKItalicRomanOff instead\n    // CJKItalicRoman: 1     # deprecated - use CJKItalicRomanOn instead\n    CJKItalicRoman: 2\n  },\n  caseSensitiveLayout: {\n    code: 33,\n    exclusive: false,\n    caseSensitiveLayout: 0,\n    caseSensitiveSpacing: 2\n  },\n  alternateKana: {\n    code: 34,\n    exclusive: false,\n    alternateHorizKana: 0,\n    alternateVertKana: 2\n  },\n  stylisticAlternatives: {\n    code: 35,\n    exclusive: false,\n    noStylisticAlternates: 0,\n    stylisticAltOne: 2,\n    stylisticAltTwo: 4,\n    stylisticAltThree: 6,\n    stylisticAltFour: 8,\n    stylisticAltFive: 10,\n    stylisticAltSix: 12,\n    stylisticAltSeven: 14,\n    stylisticAltEight: 16,\n    stylisticAltNine: 18,\n    stylisticAltTen: 20,\n    stylisticAltEleven: 22,\n    stylisticAltTwelve: 24,\n    stylisticAltThirteen: 26,\n    stylisticAltFourteen: 28,\n    stylisticAltFifteen: 30,\n    stylisticAltSixteen: 32,\n    stylisticAltSeventeen: 34,\n    stylisticAltEighteen: 36,\n    stylisticAltNineteen: 38,\n    stylisticAltTwenty: 40\n  },\n  contextualAlternates: {\n    code: 36,\n    exclusive: false,\n    contextualAlternates: 0,\n    swashAlternates: 2,\n    contextualSwashAlternates: 4\n  },\n  lowerCase: {\n    code: 37,\n    exclusive: true,\n    defaultLowerCase: 0,\n    lowerCaseSmallCaps: 1,\n    lowerCasePetiteCaps: 2\n  },\n  upperCase: {\n    code: 38,\n    exclusive: true,\n    defaultUpperCase: 0,\n    upperCaseSmallCaps: 1,\n    upperCasePetiteCaps: 2\n  },\n  languageTag: { // indices into ltag table\n    code: 39,\n    exclusive: true\n  },\n  CJKRomanSpacing: {\n    code: 103,\n    exclusive: true,\n    halfWidthCJKRoman: 0,\n    proportionalCJKRoman: 1,\n    defaultCJKRoman: 2,\n    fullWidthCJKRoman: 3\n  }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n  rlig: feature('ligatures', 'requiredLigatures'),\n  clig: feature('ligatures', 'contextualLigatures'),\n  dlig: feature('ligatures', 'rareLigatures'),\n  hlig: feature('ligatures', 'historicalLigatures'),\n  liga: feature('ligatures', 'commonLigatures'),\n  hist: feature('ligatures', 'historicalLigatures'), // ??\n\n  smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n  pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n  frac: feature('fractions', 'diagonalFractions'),\n  dnom: feature('fractions', 'diagonalFractions'), // ??\n  numr: feature('fractions', 'diagonalFractions'), // ??\n  afrc: feature('fractions', 'verticalFractions'),\n  // aalt\n  // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n  // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n  // unic, vatu, vhal, vjmo, vpal, vrt2\n  // dist -> trak table?\n  // kern, vkrn -> kern table\n  // lfbd + opbd + rtbd -> opbd table?\n  // mark, mkmk -> acnt table?\n  // locl -> languageTag + ltag table\n\n  case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n  ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n  cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n  valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n  swsh: feature('contextualAlternates', 'swashAlternates'),\n  cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n  curs: feature('cursiveConnection', 'cursive'), // ??\n  c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n  c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n  init: feature('smartSwash', 'wordInitialSwashes'), // ??\n  fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n  medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n  med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n  fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n  fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n  pkna: feature('kanaSpacing', 'proportionalKana'),\n  half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n  halt: feature('textSpacing', 'altHalfWidthText'),\n\n  hkna: feature('alternateKana', 'alternateHorizKana'),\n  vkna: feature('alternateKana', 'alternateVertKana'),\n  // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n  ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n  lnum: feature('numberCase', 'upperCaseNumbers'),\n  onum: feature('numberCase', 'lowerCaseNumbers'),\n  mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n  // nalt: not enough info. what type of annotation?\n  // ornm: ditto, which ornament style?\n\n  calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n  vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n  vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n  tnum: feature('numberSpacing', 'monospacedNumbers'),\n  pnum: feature('numberSpacing', 'proportionalNumbers'),\n  sups: feature('verticalPosition', 'superiors'),\n  subs: feature('verticalPosition', 'inferiors'),\n  ordn: feature('verticalPosition', 'ordinals'),\n  pwid: feature('textSpacing', 'proportionalText'),\n  hwid: feature('textSpacing', 'halfWidthText'),\n  qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n  twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n  fwid: feature('textSpacing', 'proportionalText'), //??\n  palt: feature('textSpacing', 'altProportionalText'),\n  trad: feature('characterShape', 'traditionalCharacters'),\n  smpl: feature('characterShape', 'simplifiedCharacters'),\n  jp78: feature('characterShape', 'JIS1978Characters'),\n  jp83: feature('characterShape', 'JIS1983Characters'),\n  jp90: feature('characterShape', 'JIS1990Characters'),\n  jp04: feature('characterShape', 'JIS2004Characters'),\n  expt: feature('characterShape', 'expertCharacters'),\n  hojo: feature('characterShape', 'hojoCharacters'),\n  nlck: feature('characterShape', 'NLCCharacters'),\n  tnam: feature('characterShape', 'traditionalNamesCharacters'),\n  ruby: feature('rubyKana', 'rubyKana'),\n  titl: feature('styleOptions', 'titlingCaps'),\n  zero: feature('typographicExtras', 'slashedZero'),\n\n  ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n  ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n  ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n  ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n  ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n  ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n  ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n  ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n  ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n  ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n  ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n  ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n  ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n  ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n  ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n  ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n  ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n  ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n  ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n  ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n  // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n  OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n  let aat = OTMapping[ot];\n  if (AATMapping[aat[0]] == null) {\n    AATMapping[aat[0]] = {};\n  }\n\n  AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n  let res = {};\n  for (let k in features) {\n    let r;\n    if (r = OTMapping[k]) {\n      if (res[r[0]] == null) {\n        res[r[0]] = {};\n      }\n\n      res[r[0]][r[1]] = features[k];\n    }\n  }\n\n  return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n  let [type, setting] = f;\n  if (isNaN(type)) {\n    var typeCode = features[type] && features[type].code;\n  } else {\n    var typeCode = type;\n  }\n\n  if (isNaN(setting)) {\n    var settingCode = features[type] && features[type][setting];\n  } else {\n    var settingCode = setting;\n  }\n\n  return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n  let res = {};\n  if (Array.isArray(features)) {\n    for (let k = 0; k < features.length; k++) {\n      let r;\n      let f = mapFeatureStrings(features[k]);\n      if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n        res[r] = true;\n      }\n    }\n\n  } else if (typeof features === 'object') {\n    for (let type in features) {\n      let feature = features[type];\n      for (let setting in feature) {\n        let r;\n        let f = mapFeatureStrings([type, setting]);\n        if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n          res[r] = true;\n        }\n      }\n    }\n  }\n\n  return Object.keys(res);\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n  constructor(table) {\n    this.table = table;\n  }\n\n  lookup(glyph) {\n    switch (this.table.version) {\n      case 0: // simple array format\n        return this.table.values.getItem(glyph);\n\n      case 2: // segment format\n      case 4: {\n        let min = 0;\n        let max = this.table.binarySearchHeader.nUnits - 1;\n\n        while (min <= max) {\n          var mid = (min + max) >> 1;\n          var seg = this.table.segments[mid];\n\n          // special end of search value\n          if (seg.firstGlyph === 0xffff) {\n            return null;\n          }\n\n          if (glyph < seg.firstGlyph) {\n            max = mid - 1;\n          } else if (glyph > seg.lastGlyph) {\n            min = mid + 1;\n          } else {\n            if (this.table.version === 2) {\n              return seg.value;\n            } else {\n              return seg.values[glyph - seg.firstGlyph];\n            }\n          }\n        }\n\n        return null;\n      }\n\n      case 6: { // lookup single\n        let min = 0;\n        let max = this.table.binarySearchHeader.nUnits - 1;\n\n        while (min <= max) {\n          var mid = (min + max) >> 1;\n          var seg = this.table.segments[mid];\n\n          // special end of search value\n          if (seg.glyph === 0xffff) {\n            return null;\n          }\n\n          if (glyph < seg.glyph) {\n            max = mid - 1;\n          } else if (glyph > seg.glyph) {\n            min = mid + 1;\n          } else {\n            return seg.value;\n          }\n        }\n\n        return null;\n      }\n\n      case 8: // lookup trimmed\n        return this.table.values[glyph - this.table.firstGlyph];\n\n      default:\n        throw new Error(`Unknown lookup table format: ${this.table.version}`);\n    }\n  }\n\n  @cache\n  glyphsForValue(classValue) {\n    let res = [];\n\n    switch (this.table.version) {\n      case 2: // segment format\n      case 4: {\n        for (let segment of this.table.segments) {\n          if ((this.table.version === 2 && segment.value === classValue)) {\n            res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n          } else {\n            for (let index = 0; index < segment.values.length; index++) {\n              if (segment.values[index] === classValue) {\n                res.push(segment.firstGlyph + index);\n              }\n            }\n          }\n        }\n\n        break;\n      }\n\n      case 6: { // lookup single\n        for (let segment of this.table.segments) {\n          if (segment.value === classValue) {\n            res.push(segment.glyph);\n          }\n        }\n\n        break;\n      }\n\n      case 8: { // lookup trimmed\n        for (let i = 0; i < this.table.values.length; i++) {\n          if (this.table.values[i] === classValue) {\n            res.push(this.table.firstGlyph + i);\n          }\n        }\n\n        break;\n      }\n\n      default:\n        throw new Error(`Unknown lookup table format: ${this.table.version}`);\n    }\n\n    return res;\n  }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n  constructor(stateTable) {\n    this.stateTable = stateTable;\n    this.lookupTable = new AATLookupTable(stateTable.classTable);\n  }\n\n  process(glyphs, reverse, processEntry) {\n    let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n    let index = reverse ? glyphs.length - 1 : 0;\n    let dir = reverse ? -1 : 1;\n\n    while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n      let glyph = null;\n      let classCode = OUT_OF_BOUNDS_CLASS;\n      let shouldAdvance = true;\n\n      if (index === glyphs.length || index === -1) {\n        classCode = END_OF_TEXT_CLASS;\n      } else {\n        glyph = glyphs[index];\n        if (glyph.id === 0xffff) { // deleted glyph\n          classCode = DELETED_GLYPH_CLASS;\n        } else {\n          classCode = this.lookupTable.lookup(glyph.id);\n          if (classCode == null) {\n            classCode = OUT_OF_BOUNDS_CLASS;\n          }\n        }\n      }\n\n      let row = this.stateTable.stateArray.getItem(currentState);\n      let entryIndex = row[classCode];\n      let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n      if (classCode !== END_OF_TEXT_CLASS && classCode !==  DELETED_GLYPH_CLASS) {\n        processEntry(glyph, entry, index);\n        shouldAdvance = !(entry.flags & DONT_ADVANCE);\n      }\n\n      currentState = entry.newState;\n      if (shouldAdvance) {\n        index += dir;\n      }\n    }\n\n    return glyphs;\n  }\n\n  /**\n   * Performs a depth-first traversal of the glyph strings\n   * represented by the state machine.\n   */\n  traverse(opts, state = 0, visited = new Set) {\n    if (visited.has(state)) {\n      return;\n    }\n\n    visited.add(state);\n\n    let {nClasses, stateArray, entryTable} = this.stateTable;\n    let row = stateArray.getItem(state);\n\n    // Skip predefined classes\n    for (let classCode = 4; classCode < nClasses; classCode++) {\n      let entryIndex = row[classCode];\n      let entry = entryTable.getItem(entryIndex);\n\n      // Try all glyphs in the class\n      for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n        if (opts.enter) {\n          opts.enter(glyph, entry);\n        }\n\n        if (entry.newState !== 0) {\n          this.traverse(opts, entry.newState, visited);\n        }\n\n        if (opts.exit) {\n          opts.exit(glyph, entry);\n        }\n      }\n    }\n  }\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST  = 0x2000;\nconst VERB       = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT  = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK   = 0x80000000;\nconst STORE_MASK  = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY           = 0x800000;\nconst REVERSE_DIRECTION       = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE  = 0x1000;\nconst CURRENT_INSERT_BEFORE   = 0x0800;\nconst MARKED_INSERT_BEFORE    = 0x0400;\nconst CURRENT_INSERT_COUNT    = 0x03E0;\nconst MARKED_INSERT_COUNT     = 0x001F;\n\nexport default class AATMorxProcessor {\n  constructor(font) {\n    this.processIndicRearragement = this.processIndicRearragement.bind(this);\n    this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n    this.processLigature = this.processLigature.bind(this);\n    this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n    this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n    this.font = font;\n    this.morx = font.morx;\n    this.inputCache = null;\n  }\n\n  // Processes an array of glyphs and applies the specified features\n  // Features should be in the form of {featureType:{featureSetting:boolean}}\n  process(glyphs, features = {}) {\n    for (let chain of this.morx.chains) {\n      let flags = chain.defaultFlags;\n\n      // enable/disable the requested features\n      for (let feature of chain.features) {\n        let f;\n        if (f = features[feature.featureType]) {\n          if (f[feature.featureSetting]) {\n            flags &= feature.disableFlags;\n            flags |= feature.enableFlags;\n          } else if (f[feature.featureSetting] === false) {\n            flags |= ~feature.disableFlags;\n            flags &= ~feature.enableFlags;\n          }\n        }\n      }\n\n      for (let subtable of chain.subtables) {\n        if (subtable.subFeatureFlags & flags) {\n          this.processSubtable(subtable, glyphs);\n        }\n      }\n    }\n\n    // remove deleted glyphs\n    let index = glyphs.length - 1;\n    while (index >= 0) {\n      if (glyphs[index].id === 0xffff) {\n        glyphs.splice(index, 1);\n      }\n\n      index--;\n    }\n\n    return glyphs;\n  }\n\n  processSubtable(subtable, glyphs) {\n    this.subtable = subtable;\n    this.glyphs = glyphs;\n    if (this.subtable.type === 4) {\n      this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n      return;\n    }\n\n    this.ligatureStack = [];\n    this.markedGlyph = null;\n    this.firstGlyph = null;\n    this.lastGlyph = null;\n    this.markedIndex = null;\n\n    let stateMachine = this.getStateMachine(subtable);\n    let process = this.getProcessor();\n\n    let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n    return stateMachine.process(this.glyphs, reverse, process);\n  }\n\n  @cache\n  getStateMachine(subtable) {\n    return new AATStateMachine(subtable.table.stateTable);\n  }\n\n  getProcessor() {\n    switch (this.subtable.type) {\n      case 0:\n        return this.processIndicRearragement;\n      case 1:\n        return this.processContextualSubstitution;\n      case 2:\n        return this.processLigature;\n      case 4:\n        return this.processNoncontextualSubstitutions;\n      case 5:\n        return this.processGlyphInsertion;\n      default:\n        throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n    }\n  }\n\n  processIndicRearragement(glyph, entry, index) {\n    if (entry.flags & MARK_FIRST) {\n      this.firstGlyph = index;\n    }\n\n    if (entry.flags & MARK_LAST) {\n      this.lastGlyph = index;\n    }\n\n    reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n  }\n\n  processContextualSubstitution(glyph, entry, index) {\n    let subsitutions = this.subtable.table.substitutionTable.items;\n    if (entry.markIndex !== 0xffff) {\n      let lookup = subsitutions.getItem(entry.markIndex);\n      let lookupTable = new AATLookupTable(lookup);\n      glyph = this.glyphs[this.markedGlyph];\n      var gid = lookupTable.lookup(glyph.id);\n      if (gid) {\n        this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n      }\n    }\n\n    if (entry.currentIndex !== 0xffff) {\n      let lookup = subsitutions.getItem(entry.currentIndex);\n      let lookupTable = new AATLookupTable(lookup);\n      glyph = this.glyphs[index];\n      var gid = lookupTable.lookup(glyph.id);\n      if (gid) {\n        this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n      }\n    }\n\n    if (entry.flags & SET_MARK) {\n      this.markedGlyph = index;\n    }\n  }\n\n  processLigature(glyph, entry, index) {\n    if (entry.flags & SET_COMPONENT) {\n      this.ligatureStack.push(index);\n    }\n\n    if (entry.flags & PERFORM_ACTION) {\n      let actions = this.subtable.table.ligatureActions;\n      let components = this.subtable.table.components;\n      let ligatureList = this.subtable.table.ligatureList;\n\n      let actionIndex = entry.action;\n      let last = false;\n      let ligatureIndex = 0;\n      let codePoints = [];\n      let ligatureGlyphs = [];\n\n      while (!last) {\n        let componentGlyph = this.ligatureStack.pop();\n        codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n        let action = actions.getItem(actionIndex++);\n        last = !!(action & LAST_MASK);\n        let store = !!(action & STORE_MASK);\n        let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n        offset += this.glyphs[componentGlyph].id;\n\n        let component = components.getItem(offset);\n        ligatureIndex += component;\n\n        if (last || store) {\n          let ligatureEntry = ligatureList.getItem(ligatureIndex);\n          this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n          ligatureGlyphs.push(componentGlyph);\n          ligatureIndex = 0;\n          codePoints = [];\n        } else {\n          this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n        }\n      }\n\n      // Put ligature glyph indexes back on the stack\n      this.ligatureStack.push(...ligatureGlyphs);\n    }\n  }\n\n  processNoncontextualSubstitutions(subtable, glyphs, index) {\n    let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n    for (index = 0; index < glyphs.length; index++) {\n      let glyph = glyphs[index];\n      if (glyph.id !== 0xffff) {\n        let gid = lookupTable.lookup(glyph.id);\n        if (gid) { // 0 means do nothing\n          glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n        }\n      }\n    }\n  }\n\n  _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n    let insertions = [];\n    while (count--) {\n      let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n      insertions.push(this.font.getGlyph(gid));\n    }\n\n    if (!isBefore) {\n      glyphIndex++;\n    }\n\n    this.glyphs.splice(glyphIndex, 0, ...insertions);\n  }\n\n  processGlyphInsertion(glyph, entry, index) {\n    if (entry.flags & SET_MARK) {\n      this.markedIndex = index;\n    }\n\n    if (entry.markedInsertIndex !== 0xffff) {\n      let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n      let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n      this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n    }\n\n    if (entry.currentInsertIndex !== 0xffff) {\n      let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n      let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n      this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n    }\n  }\n\n  getSupportedFeatures() {\n    let features = [];\n    for (let chain of this.morx.chains) {\n      for (let feature of chain.features) {\n        features.push([feature.featureType, feature.featureSetting]);\n      }\n    }\n\n    return features;\n  }\n\n  generateInputs(gid) {\n    if (!this.inputCache) {\n      this.generateInputCache();\n    }\n\n    return this.inputCache[gid] || [];\n  }\n\n  generateInputCache() {\n    this.inputCache = {};\n\n    for (let chain of this.morx.chains) {\n      let flags = chain.defaultFlags;\n\n      for (let subtable of chain.subtables) {\n        if (subtable.subFeatureFlags & flags) {\n          this.generateInputsForSubtable(subtable);\n        }\n      }\n    }\n  }\n\n  generateInputsForSubtable(subtable) {\n    // Currently, only supporting ligature subtables.\n    if (subtable.type !== 2) {\n      return;\n    }\n\n    let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n    if (reverse) {\n      throw new Error('Reverse subtable, not supported.');\n    }\n\n    this.subtable = subtable;\n    this.ligatureStack = [];\n\n    let stateMachine = this.getStateMachine(subtable);\n    let process = this.getProcessor();\n\n    let input = [];\n    let stack = [];\n    this.glyphs = [];\n\n    stateMachine.traverse({\n      enter: (glyph, entry) => {\n        let glyphs = this.glyphs;\n        stack.push({\n          glyphs: glyphs.slice(),\n          ligatureStack: this.ligatureStack.slice()\n        });\n\n        // Add glyph to input and glyphs to process.\n        let g = this.font.getGlyph(glyph);\n        input.push(g);\n        glyphs.push(input[input.length - 1]);\n\n        // Process ligature substitution\n        process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n        // Add input to result if only one matching (non-deleted) glyph remains.\n        let count = 0;\n        let found = 0;\n        for (let i = 0; i < glyphs.length && count <= 1; i++) {\n          if (glyphs[i].id !== 0xffff) {\n            count++;\n            found = glyphs[i].id;\n          }\n        }\n\n        if (count === 1) {\n          let result = input.map(g => g.id);\n          let cache = this.inputCache[found];\n          if (cache) {\n            cache.push(result);\n          } else {\n            this.inputCache[found] = [result];\n          }\n        }\n      },\n\n      exit: () => {\n        ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n        input.pop();\n      }\n    });\n  }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n  let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n  if (reverseB) {\n    end.reverse();\n  }\n\n  let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n  if (reverseA) {\n    start.reverse();\n  }\n\n  glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n  return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n  let length = lastGlyph - firstGlyph + 1;\n  switch (verb) {\n    case 0: // no change\n      return glyphs;\n\n    case 1: // Ax => xA\n      return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n    case 2: // xD => Dx\n      return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n    case 3: // AxD => DxA\n      return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n    case 4: // ABx => xAB\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n    case 5: // ABx => xBA\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n    case 6: // xCD => CDx\n      return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n    case 7: // xCD => DCx\n      return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n    case 8: // AxCD => CDxA\n      return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n    case 9: // AxCD => DCxA\n      return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n    case 10: // ABxD => DxAB\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n    case 11: // ABxD => DxBA\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n    case 12: // ABxCD => CDxAB\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n    case 13: // ABxCD => CDxBA\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n    case 14: // ABxCD => DCxAB\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n    case 15: // ABxCD => DCxBA\n      return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n    default:\n      throw new Error(`Unknown verb: ${verb}`);\n  }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n  constructor(font) {\n    this.font = font;\n    this.morxProcessor = new AATMorxProcessor(font);\n    this.fallbackPosition = false;\n  }\n\n  substitute(glyphRun) {\n    // AAT expects the glyphs to be in visual order prior to morx processing,\n    // so reverse the glyphs if the script is right-to-left.\n    if (glyphRun.direction === 'rtl') {\n      glyphRun.glyphs.reverse();\n    }\n\n    this.morxProcessor.process(glyphRun.glyphs, AATFeatureMap.mapOTToAAT(glyphRun.features));\n  }\n\n  getAvailableFeatures(script, language) {\n    return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n  }\n\n  stringsForGlyph(gid) {\n    let glyphStrings = this.morxProcessor.generateInputs(gid);\n    let result = new Set;\n\n    for (let glyphs of glyphStrings) {\n      this._addStrings(glyphs, 0, result, '');\n    }\n\n    return result;\n  }\n\n  _addStrings(glyphs, index, strings, string) {\n    let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n    for (let codePoint of codePoints) {\n      let s = string + String.fromCodePoint(codePoint);\n      if (index < glyphs.length - 1) {\n        this._addStrings(glyphs, index + 1, strings, s);\n      } else {\n        strings.add(s);\n      }\n    }\n  }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n  constructor(font, script, direction) {\n    this.font = font;\n    this.script = script;\n    this.direction = direction;\n    this.stages = [];\n    this.globalFeatures = {};\n    this.allFeatures = {};\n  }\n\n  /**\n   * Adds the given features to the last stage.\n   * Ignores features that have already been applied.\n   */\n  _addFeatures(features, global) {\n    let stageIndex = this.stages.length - 1;\n    let stage = this.stages[stageIndex];\n    for (let feature of features) {\n      if (this.allFeatures[feature] == null) {\n        stage.push(feature);\n        this.allFeatures[feature] = stageIndex;\n\n        if (global) {\n          this.globalFeatures[feature] = true;\n        }\n      }\n    }\n  }\n\n  /**\n   * Add features to the last stage\n   */\n  add(arg, global = true) {\n    if (this.stages.length === 0) {\n      this.stages.push([]);\n    }\n\n    if (typeof arg === 'string') {\n      arg = [arg];\n    }\n\n    if (Array.isArray(arg)) {\n      this._addFeatures(arg, global);\n    } else if (typeof arg === 'object') {\n      this._addFeatures(arg.global || [], true);\n      this._addFeatures(arg.local || [], false);\n    } else {\n      throw new Error(\"Unsupported argument to ShapingPlan#add\");\n    }\n  }\n\n  /**\n   * Add a new stage\n   */\n  addStage(arg, global) {\n    if (typeof arg === 'function') {\n      this.stages.push(arg, []);\n    } else {\n      this.stages.push([]);\n      this.add(arg, global);\n    }\n  }\n\n  setFeatureOverrides(features) {\n    if (Array.isArray(features)) {\n      this.add(features);\n    } else if (typeof features === 'object') {\n      for (let tag in features) {\n        if (features[tag]) {\n          this.add(tag);\n        } else if (this.allFeatures[tag] != null) {\n          let stage = this.stages[this.allFeatures[tag]];\n          stage.splice(stage.indexOf(tag), 1);\n          delete this.allFeatures[tag];\n          delete this.globalFeatures[tag];\n        }\n      }\n    }\n  }\n\n  /**\n   * Assigns the global features to the given glyphs\n   */\n  assignGlobalFeatures(glyphs) {\n    for (let glyph of glyphs) {\n      for (let feature in this.globalFeatures) {\n        glyph.features[feature] = true;\n      }\n    }\n  }\n\n  /**\n   * Executes the planned stages using the given OTProcessor\n   */\n  process(processor, glyphs, positions) {\n    for (let stage of this.stages) {\n      if (typeof stage === 'function') {\n        if (!positions) {\n          stage(this.font, glyphs, this);\n        }\n\n      } else if (stage.length > 0) {\n        processor.applyFeatures(stage, glyphs, positions);\n      }\n    }\n  }\n}\n","import unicode from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n  ltr: ['ltra', 'ltrm'],\n  rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n  static zeroMarkWidths = 'AFTER_GPOS';\n  static plan(plan, glyphs, features) {\n    // Plan the features we want to apply\n    this.planPreprocessing(plan);\n    this.planFeatures(plan);\n    this.planPostprocessing(plan, features);\n\n    // Assign the global features to all the glyphs\n    plan.assignGlobalFeatures(glyphs);\n\n    // Assign local features to glyphs\n    this.assignFeatures(plan, glyphs);\n  }\n\n  static planPreprocessing(plan) {\n    plan.add({\n      global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n      local: FRACTIONAL_FEATURES\n    });\n  }\n\n  static planFeatures(plan) {\n    // Do nothing by default. Let subclasses override this.\n  }\n\n  static planPostprocessing(plan, userFeatures) {\n    plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES]);\n    plan.setFeatureOverrides(userFeatures);\n  }\n\n  static assignFeatures(plan, glyphs) {\n    // Enable contextual fractions\n    for (let i = 0; i < glyphs.length; i++) {\n      let glyph = glyphs[i];\n      if (glyph.codePoints[0] === 0x2044) { // fraction slash\n        let start = i;\n        let end = i + 1;\n\n        // Apply numerator\n        while (start > 0 && unicode.isDigit(glyphs[start - 1].codePoints[0])) {\n          glyphs[start - 1].features.numr = true;\n          glyphs[start - 1].features.frac = true;\n          start--;\n        }\n\n        // Apply denominator\n        while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) {\n          glyphs[end].features.dnom = true;\n          glyphs[end].features.frac = true;\n          end++;\n        }\n\n        // Apply fraction slash\n        glyph.features.frac = true;\n        i = end - 1;\n      }\n    }\n  }\n}\n","import DefaultShaper from './DefaultShaper';\nimport unicode from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\n\nconst trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/data.trie'));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n  Non_Joining: 0,\n  Left_Joining: 1,\n  Right_Joining: 2,\n  Dual_Joining: 3,\n  Join_Causing: 3,\n  ALAPH: 4,\n  'DALATH RISH': 5,\n  Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n  //   Non_Joining,        Left_Joining,       Right_Joining,     Dual_Joining,           ALAPH,            DALATH RISH\n  // State 0: prev was U,  not willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ NONE, ISOL, 1 ],  [ NONE, ISOL, 2 ],  [ NONE, ISOL, 1 ],  [ NONE, ISOL, 6 ] ],\n\n  // State 1: prev was R or ISOL/ALAPH,  not willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ NONE, ISOL, 1 ],  [ NONE, ISOL, 2 ],  [ NONE, FIN2, 5 ],  [ NONE, ISOL, 6 ] ],\n\n  // State 2: prev was D/L in ISOL form,  willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ INIT, FINA, 1 ],  [ INIT, FINA, 3 ],  [ INIT, FINA, 4 ],  [ INIT, FINA, 6 ] ],\n\n  // State 3: prev was D in FINA form,  willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ MEDI, FINA, 1 ],  [ MEDI, FINA, 3 ],  [ MEDI, FINA, 4 ],  [ MEDI, FINA, 6 ] ],\n\n  // State 4: prev was FINA ALAPH,  not willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ MED2, ISOL, 1 ],  [ MED2, ISOL, 2 ],  [ MED2, FIN2, 5 ],  [ MED2, ISOL, 6 ] ],\n\n  // State 5: prev was FIN2/FIN3 ALAPH,  not willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ ISOL, ISOL, 1 ],  [ ISOL, ISOL, 2 ],  [ ISOL, FIN2, 5 ],  [ ISOL, ISOL, 6 ] ],\n\n  // State 6: prev was DALATH/RISH,  not willing to join.\n  [ [ NONE, NONE, 0 ],  [ NONE, ISOL, 2 ],  [ NONE, ISOL, 1 ],  [ NONE, ISOL, 2 ],  [ NONE, FIN3, 5 ],  [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n  static planFeatures(plan) {\n    plan.add(['ccmp', 'locl']);\n    for (let i = 0; i < FEATURES.length; i++) {\n      let feature = FEATURES[i];\n      plan.addStage(feature, false);\n    }\n\n    plan.addStage('mset');\n  }\n\n  static assignFeatures(plan, glyphs) {\n    super.assignFeatures(plan, glyphs);\n\n    let prev = -1;\n    let state = 0;\n    let actions = [];\n\n    // Apply the state machine to map glyphs to features\n    for (let i = 0; i < glyphs.length; i++) {\n      let curAction, prevAction;\n      var glyph = glyphs[i];\n      let type = getShapingClass(glyph.codePoints[0]);\n      if (type === ShapingClasses.Transparent) {\n        actions[i] = NONE;\n        continue;\n      }\n\n      [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n      if (prevAction !== NONE && prev !== -1) {\n        actions[prev] = prevAction;\n      }\n\n      actions[i] = curAction;\n      prev = i;\n    }\n\n    // Apply the chosen features to their respective glyphs\n    for (let index = 0; index < glyphs.length; index++) {\n      let feature;\n      var glyph = glyphs[index];\n      if (feature = actions[index]) {\n        glyph.features[feature] = true;\n      }\n    }\n  }\n}\n\nfunction getShapingClass(codePoint) {\n  let res = trie.get(codePoint);\n  if (res) {\n    return res - 1;\n  }\n\n  let category = unicode.getCategory(codePoint);\n  if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n    return ShapingClasses.Transparent;\n  }\n\n  return ShapingClasses.Non_Joining;\n}\n","export default class GlyphIterator {\n  constructor(glyphs, options) {\n    this.glyphs = glyphs;\n    this.reset(options);\n  }\n\n  reset(options = {}, index = 0) {\n    this.options = options;\n    this.flags = options.flags || {};\n    this.markAttachmentType = options.markAttachmentType || 0;\n    this.index = index;\n  }\n\n  get cur() {\n    return this.glyphs[this.index] || null;\n  }\n\n  shouldIgnore(glyph) {\n    return (this.flags.ignoreMarks && glyph.isMark) ||\n           (this.flags.ignoreBaseGlyphs && glyph.isBase) ||\n           (this.flags.ignoreLigatures && glyph.isLigature) ||\n           (this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType);\n  }\n\n  move(dir) {\n    this.index += dir;\n    while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {\n      this.index += dir;\n    }\n\n    if (0 > this.index || this.index >= this.glyphs.length) {\n      return null;\n    }\n\n    return this.glyphs[this.index];\n  }\n\n  next() {\n    return this.move(+1);\n  }\n\n  prev() {\n    return this.move(-1);\n  }\n\n  peek(count = 1) {\n    let idx = this.index;\n    let res = this.increment(count);\n    this.index = idx;\n    return res;\n  }\n\n  peekIndex(count = 1) {\n    let idx = this.index;\n    this.increment(count);\n    let res = this.index;\n    this.index = idx;\n    return res;\n  }\n\n  increment(count = 1) {\n    let dir = count < 0 ? -1 : 1;\n    count = Math.abs(count);\n    while (count--) {\n      this.move(dir);\n    }\n\n    return this.glyphs[this.index];\n  }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n  constructor(font, table) {\n    this.font = font;\n    this.table = table;\n\n    this.script = null;\n    this.scriptTag = null;\n\n    this.language = null;\n    this.languageTag = null;\n\n    this.features = {};\n    this.lookups = {};\n\n    // Setup variation substitutions\n    this.variationsIndex = font._variationProcessor\n      ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n      : -1;\n\n    // initialize to default script + language\n    this.selectScript();\n\n    // current context (set by applyFeatures)\n    this.glyphs = [];\n    this.positions = []; // only used by GPOS\n    this.ligatureID = 1;\n    this.currentFeature = null;\n  }\n\n  findScript(script) {\n    if (this.table.scriptList == null) {\n      return null;\n    }\n\n    if (!Array.isArray(script)) {\n      script = [ script ];\n    }\n\n    for (let s of script) {\n      for (let entry of this.table.scriptList) {\n        if (entry.tag === s) {\n          return entry;\n        }\n      }\n    }\n\n    return null;\n  }\n\n  selectScript(script, language, direction) {\n    let changed = false;\n    let entry;\n    if (!this.script || script !== this.scriptTag) {\n      entry = this.findScript(script);\n      if (!entry) {\n        entry = this.findScript(DEFAULT_SCRIPTS);\n      }\n\n      if (!entry) {\n        return this.scriptTag;\n      }\n\n      this.scriptTag = entry.tag;\n      this.script = entry.script;\n      this.language = null;\n      this.languageTag = null;\n      changed = true;\n    }\n\n    if (!direction || direction !== this.direction) {\n      this.direction = direction || Script.direction(script);\n    }\n\n    if (language && language.length < 4) {\n      language += ' '.repeat(4 - language.length);\n    }\n\n    if (!language || language !== this.languageTag) {\n      this.language = null;\n\n      for (let lang of this.script.langSysRecords) {\n        if (lang.tag === language) {\n          this.language = lang.langSys;\n          this.languageTag = lang.tag;\n          break;\n        }\n      }\n\n      if (!this.language) {\n        this.language = this.script.defaultLangSys;\n        this.languageTag = null;\n      }\n\n      changed = true;\n    }\n\n    // Build a feature lookup table\n    if (changed) {\n      this.features = {};\n      if (this.language) {\n        for (let featureIndex of this.language.featureIndexes) {\n          let record = this.table.featureList[featureIndex];\n          let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n          this.features[record.tag] = substituteFeature || record.feature;\n        }\n      }\n    }\n\n    return this.scriptTag;\n  }\n\n  lookupsForFeatures(userFeatures = [], exclude) {\n    let lookups = [];\n    for (let tag of userFeatures) {\n      let feature = this.features[tag];\n      if (!feature) {\n        continue;\n      }\n\n      for (let lookupIndex of feature.lookupListIndexes) {\n        if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n          continue;\n        }\n\n        lookups.push({\n          feature: tag,\n          index: lookupIndex,\n          lookup: this.table.lookupList.get(lookupIndex)\n        });\n      }\n    }\n\n    lookups.sort((a, b) => a.index - b.index);\n    return lookups;\n  }\n\n  substituteFeatureForVariations(featureIndex) {\n    if (this.variationsIndex === -1) {\n      return null;\n    }\n\n    let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n    let substitutions = record.featureTableSubstitution.substitutions;\n    for (let substitution of substitutions) {\n      if (substitution.featureIndex === featureIndex) {\n        return substitution.alternateFeatureTable;\n      }\n    }\n\n    return null;\n  }\n\n  findVariationsIndex(coords) {\n    let variations = this.table.featureVariations;\n    if (!variations) {\n      return -1;\n    }\n\n    let records = variations.featureVariationRecords;\n    for (let i = 0; i < records.length; i++) {\n      let conditions = records[i].conditionSet.conditionTable;\n      if (this.variationConditionsMatch(conditions, coords)) {\n        return i;\n      }\n    }\n\n    return -1;\n  }\n\n  variationConditionsMatch(conditions, coords) {\n    return conditions.every(condition => {\n      let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n      return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n    });\n  }\n\n  applyFeatures(userFeatures, glyphs, advances) {\n    let lookups = this.lookupsForFeatures(userFeatures);\n    this.applyLookups(lookups, glyphs, advances);\n  }\n\n  applyLookups(lookups, glyphs, positions) {\n    this.glyphs = glyphs;\n    this.positions = positions;\n    this.glyphIterator = new GlyphIterator(glyphs);\n\n    for (let {feature, lookup} of lookups) {\n      this.currentFeature = feature;\n      this.glyphIterator.reset(lookup.flags);\n\n      while (this.glyphIterator.index < glyphs.length) {\n        if (!(feature in this.glyphIterator.cur.features)) {\n          this.glyphIterator.next();\n          continue;\n        }\n\n        for (let table of lookup.subTables) {\n          let res = this.applyLookup(lookup.lookupType, table);\n          if (res) {\n            break;\n          }\n        }\n\n        this.glyphIterator.next();\n      }\n    }\n  }\n\n  applyLookup(lookup, table) {\n    throw new Error(\"applyLookup must be implemented by subclasses\");\n  }\n\n  applyLookupList(lookupRecords) {\n    let options = this.glyphIterator.options;\n    let glyphIndex = this.glyphIterator.index;\n\n    for (let lookupRecord of lookupRecords) {\n      // Reset flags and find glyph index for this lookup record\n      this.glyphIterator.reset(options, glyphIndex);\n      this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n      // Get the lookup and setup flags for subtables\n      let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n      this.glyphIterator.reset(lookup.flags, this.glyphIterator.index);\n\n      // Apply lookup subtables until one matches\n      for (let table of lookup.subTables) {\n        if (this.applyLookup(lookup.lookupType, table)) {\n          break;\n        }\n      }\n    }\n\n    this.glyphIterator.reset(options, glyphIndex);\n    return true;\n  }\n\n  coverageIndex(coverage, glyph) {\n    if (glyph == null) {\n      glyph = this.glyphIterator.cur.id;\n    }\n\n    switch (coverage.version) {\n      case 1:\n        return coverage.glyphs.indexOf(glyph);\n\n      case 2:\n        for (let range of coverage.rangeRecords) {\n          if (range.start <= glyph && glyph <= range.end) {\n            return range.startCoverageIndex + glyph - range.start;\n          }\n        }\n\n        break;\n    }\n\n    return -1;\n  }\n\n  match(sequenceIndex, sequence, fn, matched) {\n    let pos = this.glyphIterator.index;\n    let glyph = this.glyphIterator.increment(sequenceIndex);\n    let idx = 0;\n\n    while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {\n      if (matched) {\n        matched.push(this.glyphIterator.index);\n      }\n\n      idx++;\n      glyph = this.glyphIterator.next();\n    }\n\n    this.glyphIterator.index = pos;\n    if (idx < sequence.length) {\n      return false;\n    }\n\n    return matched || true;\n  }\n\n  sequenceMatches(sequenceIndex, sequence) {\n    return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph.id);\n  }\n\n  sequenceMatchIndices(sequenceIndex, sequence) {\n    return this.match(sequenceIndex, sequence, (component, glyph) => {\n      // If the current feature doesn't apply to this glyph,\n      if (!(this.currentFeature in glyph.features)) {\n        return false;\n      }\n\n      return component === glyph.id;\n    }, []);\n  }\n\n  coverageSequenceMatches(sequenceIndex, sequence) {\n    return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n      this.coverageIndex(coverage, glyph.id) >= 0\n    );\n  }\n\n  getClassID(glyph, classDef) {\n    switch (classDef.version) {\n      case 1: // Class array\n        let i = glyph - classDef.startGlyph;\n        if (i >= 0 && i < classDef.classValueArray.length) {\n          return classDef.classValueArray[i];\n        }\n\n        break;\n\n      case 2:\n        for (let range of classDef.classRangeRecord) {\n          if (range.start <= glyph && glyph <= range.end) {\n            return range.class;\n          }\n        }\n\n        break;\n    }\n\n    return 0;\n  }\n\n  classSequenceMatches(sequenceIndex, sequence, classDef) {\n    return this.match(sequenceIndex, sequence, (classID, glyph) =>\n      classID === this.getClassID(glyph.id, classDef)\n    );\n  }\n\n  applyContext(table) {\n    switch (table.version) {\n      case 1:\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        let set = table.ruleSets[index];\n        for (let rule of set) {\n          if (this.sequenceMatches(1, rule.input)) {\n            return this.applyLookupList(rule.lookupRecords);\n          }\n        }\n\n        break;\n\n      case 2:\n        if (this.coverageIndex(table.coverage) === -1) {\n          return false;\n        }\n\n        index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n        if (index === -1) {\n          return false;\n        }\n\n        set = table.classSet[index];\n        for (let rule of set) {\n          if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n            return this.applyLookupList(rule.lookupRecords);\n          }\n        }\n\n        break;\n\n      case 3:\n        if (this.coverageSequenceMatches(0, table.coverages)) {\n          return this.applyLookupList(table.lookupRecords);\n        }\n\n        break;\n    }\n\n    return false;\n  }\n\n  applyChainingContext(table) {\n    switch (table.version) {\n      case 1:\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        let set = table.chainRuleSets[index];\n        for (let rule of set) {\n          if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n              && this.sequenceMatches(1, rule.input)\n              && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n            return this.applyLookupList(rule.lookupRecords);\n          }\n        }\n\n        break;\n\n      case 2:\n        if (this.coverageIndex(table.coverage) === -1) {\n          return false;\n        }\n\n        index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n        let rules = table.chainClassSet[index];\n        if (!rules) {\n          return false;\n        }\n\n        for (let rule of rules) {\n          if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n              this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n              this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n            return this.applyLookupList(rule.lookupRecords);\n          }\n        }\n\n        break;\n\n      case 3:\n        if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n            this.coverageSequenceMatches(0, table.inputCoverage) &&\n            this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n          return this.applyLookupList(table.lookupRecords);\n        }\n\n        break;\n    }\n\n    return false;\n  }\n}\n","import unicode from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n  constructor(font, id, codePoints = [], features) {\n    this._font = font;\n    this.codePoints = codePoints;\n    this.id = id;\n\n    this.features = {};\n    if (Array.isArray(features)) {\n      for (let i = 0; i < features.length; i++) {\n        let feature = features[i];\n        this.features[feature] = true;\n      }\n    } else if (typeof features === 'object') {\n      Object.assign(this.features, features);\n    }\n\n    this.ligatureID = null;\n    this.ligatureComponent = null;\n    this.isLigated = false;\n    this.cursiveAttachment = null;\n    this.markAttachment = null;\n    this.shaperInfo = null;\n    this.substituted = false;\n    this.isMultiplied = false;\n  }\n\n  get id() {\n    return this._id;\n  }\n\n  set id(id) {\n    this._id = id;\n    this.substituted = true;\n\n    let GDEF = this._font.GDEF;\n    if (GDEF && GDEF.glyphClassDef) {\n      // TODO: clean this up\n      let classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);\n      this.isBase = classID === 1;\n      this.isLigature = classID === 2;\n      this.isMark = classID === 3;\n      this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;\n    } else {\n      this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark);\n      this.isBase = !this.isMark;\n      this.isLigature = this.codePoints.length > 1;\n      this.markAttachmentType = 0;\n    }\n  }\n\n  copy() {\n    return new GlyphInfo(this._font, this.id, this.codePoints, this.features);\n  }\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n *   - decompose if unsupported by the font:\n *     <LV>   -> <L,V>\n *     <LVT>  -> <L,V,T>\n *     <LV,T> -> <L,V,T>\n *\n *   - compose if supported by the font:\n *     <L,V>   -> <LV>\n *     <L,V,T> -> <LVT>\n *     <LV,T>  -> <LVT>\n *\n *   - reorder tone marks (S is any valid syllable):\n *     <S, M> -> <M, S>\n *\n *   - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n *   - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n *   - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n  static zeroMarkWidths = 'NONE';\n  static planFeatures(plan) {\n    plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n  }\n\n  static assignFeatures(plan, glyphs) {\n    let state = 0;\n    let i = 0;\n    while (i < glyphs.length) {\n      let action;\n      let glyph = glyphs[i];\n      let code = glyph.codePoints[0];\n      let type = getType(code);\n\n      [ action, state ] = STATE_TABLE[state][type];\n\n      switch (action) {\n        case DECOMPOSE:\n          // Decompose the composed syllable if it is not supported by the font.\n          if (!plan.font.hasGlyphForCodePoint(code)) {\n            i = decompose(glyphs, i, plan.font);\n          }\n          break;\n\n        case COMPOSE:\n          // Found a decomposed syllable. Try to compose if supported by the font.\n          i = compose(glyphs, i, plan.font);\n          break;\n\n        case TONE_MARK:\n          // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n          reorderToneMark(glyphs, i, plan.font);\n          break;\n\n        case INVALID:\n          // Tone mark has no valid syllable to attach to, so insert a dotted circle\n          i = insertDottedCircle(glyphs, i, plan.font);\n          break;\n      }\n\n      i++;\n    }\n  }\n}\n\nconst HANGUL_BASE  = 0xac00;\nconst HANGUL_END   = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE  = 0x1100; // lead\nconst V_BASE  = 0x1161; // vowel\nconst T_BASE  = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END   = L_BASE + L_COUNT - 1;\nconst V_END   = V_BASE + V_COUNT - 1;\nconst T_END   = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL    = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV    = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT    = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT  = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV   = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X   = 0; // Other character\nconst L   = 1; // Leading consonant\nconst V   = 2; // Medial vowel\nconst T   = 3; // Trailing consonant\nconst LV  = 4; // Composed <LV> syllable\nconst LVT = 5; // Composed <LVT> syllable\nconst M   = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n  if (isL(code))    { return L; }\n  if (isV(code))    { return V; }\n  if (isT(code))    { return T; }\n  if (isLV(code))   { return LV; }\n  if (isLVT(code))  { return LVT; }\n  if (isTone(code)) { return M; }\n  return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE   = 2;\nconst TONE_MARK = 4;\nconst INVALID   = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n  //       X                 L                 V                T                  LV                LVT               M\n  // State 0: start state\n  [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [  INVALID, 0  ] ],\n\n  // State 1: <L>\n  [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [  COMPOSE, 2  ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [  INVALID, 0  ] ],\n\n  // State 2: <L,V> or <LV>\n  [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [  COMPOSE, 3  ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n  // State 3: <L,V,T> or <LVT>\n  [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n  return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n  let glyph = glyphs[i];\n  let code = glyph.codePoints[0];\n\n  let s = code - HANGUL_BASE;\n  let t = T_BASE + s % T_COUNT;\n  s = s / T_COUNT | 0;\n  let l = L_BASE + s / V_COUNT | 0;\n  let v = V_BASE + s % V_COUNT;\n\n  // Don't decompose if all of the components are not available\n  if (!font.hasGlyphForCodePoint(l) ||\n      !font.hasGlyphForCodePoint(v) ||\n      (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n    return i;\n  }\n\n  // Replace the current glyph with decomposed L, V, and T glyphs,\n  // and apply the proper OpenType features to each component.\n  let ljmo = getGlyph(font, l, glyph.features);\n  ljmo.features.ljmo = true;\n\n  let vjmo = getGlyph(font, v, glyph.features);\n  vjmo.features.vjmo = true;\n\n  let insert = [ ljmo, vjmo ];\n\n  if (t > T_BASE) {\n    let tjmo = getGlyph(font, t, glyph.features);\n    tjmo.features.tjmo = true;\n    insert.push(tjmo);\n  }\n\n  glyphs.splice(i, 1, ...insert);\n  return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n  let glyph = glyphs[i];\n  let code = glyphs[i].codePoints[0];\n  let type = getType(code);\n\n  let prev = glyphs[i - 1].codePoints[0];\n  let prevType = getType(prev);\n\n  // Figure out what type of syllable we're dealing with\n  let lv, ljmo, vjmo, tjmo;\n  if (prevType === LV && type === T) {\n    // <LV,T>\n    lv = prev;\n    tjmo = glyph;\n  } else {\n    if (type === V) {\n      // <L,V>\n      ljmo = glyphs[i - 1];\n      vjmo = glyph;\n    } else {\n      // <L,V,T>\n      ljmo = glyphs[i - 2];\n      vjmo = glyphs[i - 1];\n      tjmo = glyph;\n    }\n\n    let l = ljmo.codePoints[0];\n    let v = vjmo.codePoints[0];\n\n    // Make sure L and V are combining characters\n    if (isCombiningL(l) && isCombiningV(v)) {\n      lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n    }\n  }\n\n  let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n  if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n    let s = lv + (t - T_BASE);\n\n    // Replace with a composed glyph if supported by the font,\n    // otherwise apply the proper OpenType features to each component.\n    if (font.hasGlyphForCodePoint(s)) {\n      let del = prevType === V ? 3 : 2;\n      glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n      return i - del + 1;\n    }\n  }\n\n  // Didn't compose (either a non-combining component or unsupported by font).\n  if (ljmo) { ljmo.features.ljmo = true; }\n  if (vjmo) { vjmo.features.vjmo = true; }\n  if (tjmo) { tjmo.features.tjmo = true; }\n\n  if (prevType === LV) {\n    // Sequence was originally <L,V>, which got combined earlier.\n    // Either the T was non-combining, or the LVT glyph wasn't supported.\n    // Decompose the glyph again and apply OT features.\n    decompose(glyphs, i - 1, font);\n    return i + 1;\n  }\n\n  return i;\n}\n\nfunction getLength(code) {\n  switch (getType(code)) {\n    case LV:\n    case LVT:\n      return 1;\n    case V:\n      return 2;\n    case T:\n      return 3;\n  }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n  let glyph = glyphs[i];\n  let code = glyphs[i].codePoints[0];\n\n  // Move tone mark to the beginning of the previous syllable, unless it is zero width\n  if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n  let prev = glyphs[i - 1].codePoints[0];\n  let len = getLength(prev);\n\n  glyphs.splice(i, 1);\n  return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n  let glyph = glyphs[i];\n  let code = glyphs[i].codePoints[0];\n\n  if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n    let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n    // If the tone mark is zero width, insert the dotted circle before, otherwise after\n    let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n    glyphs.splice(idx, 0, dottedCircle);\n    i++;\n  }\n\n  return i;\n}\n","// Cateories used in the OpenType spec:\n// https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx\nexport const CATEGORIES = {\n  X: 1 << 0,\n  C: 1 << 1,\n  V: 1 << 2,\n  N: 1 << 3,\n  H: 1 << 4,\n  ZWNJ: 1 << 5,\n  ZWJ: 1 << 6,\n  M: 1 << 7,\n  SM: 1 << 8,\n  VD: 1 << 9,\n  A: 1 << 10,\n  Placeholder: 1 << 11,\n  Dotted_Circle: 1 << 12,\n  RS: 1 << 13,    // Register Shifter, used in Khmer OT spec.\n  Coeng: 1 << 14, // Khmer-style Virama.\n  Repha: 1 << 15, // Atomically-encoded logical or visual repha.\n  Ra: 1 << 16,\n  CM: 1 << 17,    // Consonant-Medial.\n  Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).\n};\n\n// Visual positions in a syllable from left to right.\nexport const POSITIONS = {\n  Start: 1 << 0,\n\n  Ra_To_Become_Reph: 1 << 1,\n  Pre_M: 1 << 2,\n  Pre_C: 1 << 3,\n\n  Base_C: 1 << 4,\n  After_Main: 1 << 5,\n\n  Above_C: 1 << 6,\n\n  Before_Sub: 1 << 7,\n  Below_C: 1 << 8,\n  After_Sub: 1 << 9,\n\n  Before_Post: 1 << 10,\n  Post_C: 1 << 11,\n  After_Post: 1 << 12,\n\n  Final_C: 1 << 13,\n  SMVD: 1 << 14,\n\n  End: 1 << 15\n};\n\nexport const CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;\nexport const JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;\nexport const HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;\n\nexport const INDIC_CONFIGS = {\n  Default: {\n    hasOldSpec: false,\n    virama: 0,\n    basePos: 'Last',\n    rephPos: POSITIONS.Before_Post,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Devanagari: {\n    hasOldSpec: true,\n    virama: 0x094D,\n    basePos: 'Last',\n    rephPos: POSITIONS.Before_Post,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Bengali: {\n    hasOldSpec: true,\n    virama: 0x09CD,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Sub,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Gurmukhi: {\n    hasOldSpec: true,\n    virama: 0x0A4D,\n    basePos: 'Last',\n    rephPos: POSITIONS.Before_Sub,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Gujarati: {\n    hasOldSpec: true,\n    virama: 0x0ACD,\n    basePos: 'Last',\n    rephPos: POSITIONS.Before_Post,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Oriya: {\n    hasOldSpec: true,\n    virama: 0x0B4D,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Main,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Tamil: {\n    hasOldSpec: true,\n    virama: 0x0BCD,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Post,\n    rephMode: 'Implicit',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  Telugu: {\n    hasOldSpec: true,\n    virama: 0x0C4D,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Post,\n    rephMode: 'Explicit',\n    blwfMode: 'Post_Only'\n  },\n\n  Kannada: {\n    hasOldSpec: true,\n    virama: 0x0CCD,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Post,\n    rephMode: 'Implicit',\n    blwfMode: 'Post_Only'\n  },\n\n  Malayalam: {\n    hasOldSpec: true,\n    virama: 0x0D4D,\n    basePos: 'Last',\n    rephPos: POSITIONS.After_Main,\n    rephMode: 'Log_Repha',\n    blwfMode: 'Pre_And_Post'\n  },\n\n  // Handled by UniversalShaper\n  // Sinhala: {\n  //   hasOldSpec: false,\n  //   virama: 0x0DCA,\n  //   basePos: 'Last_Sinhala',\n  //   rephPos: POSITIONS.After_Main,\n  //   rephMode: 'Explicit',\n  //   blwfMode: 'Pre_And_Post'\n  // },\n\n  Khmer: {\n    hasOldSpec: false,\n    virama: 0x17D2,\n    basePos: 'First',\n    rephPos: POSITIONS.Ra_To_Become_Reph,\n    rephMode: 'Vis_Repha',\n    blwfMode: 'Pre_And_Post'\n  }\n};\n\n// Additional decompositions that aren't in Unicode\nexport const INDIC_DECOMPOSITIONS = {\n  // Khmer\n  0x17BE: [0x17C1, 0x17BE],\n  0x17BF: [0x17C1, 0x17BF],\n  0x17C0: [0x17C1, 0x17C0],\n  0x17C4: [0x17C1, 0x17C4],\n  0x17C5: [0x17C1, 0x17C5]\n};\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport unicode from 'unicode-properties';\nimport * as Script from '../../layout/Script';\nimport GlyphInfo from '../GlyphInfo';\nimport indicMachine from './indic.json';\nimport useData from './use.json';\nimport {\n  CATEGORIES,\n  POSITIONS,\n  CONSONANT_FLAGS,\n  JOINER_FLAGS,\n  HALANT_OR_COENG_FLAGS, INDIC_CONFIGS,\n  INDIC_DECOMPOSITIONS\n} from './indic-data';\n\nconst {decompositions} = useData;\nconst trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/indic.trie'));\nconst stateMachine = new StateMachine(indicMachine);\n\n/**\n * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.\n * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc\n */\nexport default class IndicShaper extends DefaultShaper {\n  static zeroMarkWidths = 'NONE';\n  static planFeatures(plan) {\n    plan.addStage(setupSyllables);\n\n    plan.addStage(['locl', 'ccmp']);\n\n    plan.addStage(initialReordering);\n\n    plan.addStage('nukt');\n    plan.addStage('akhn');\n    plan.addStage('rphf', false);\n    plan.addStage('rkrf');\n    plan.addStage('pref', false);\n    plan.addStage('blwf', false);\n    plan.addStage('abvf', false);\n    plan.addStage('half', false);\n    plan.addStage('pstf', false);\n    plan.addStage('vatu');\n    plan.addStage('cjct');\n    plan.addStage('cfar', false);\n\n    plan.addStage(finalReordering);\n\n    plan.addStage({\n      local: ['init'],\n      global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']\n    });\n\n    // Setup the indic config for the selected script\n    plan.unicodeScript = Script.fromOpenType(plan.script);\n    plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;\n    plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2';\n\n    // TODO: turn off kern (Khmer) and liga features.\n  }\n\n  static assignFeatures(plan, glyphs) {\n    // Decompose split matras\n    // TODO: do this in a more general unicode normalizer\n    for (let i = glyphs.length - 1; i >= 0; i--) {\n      let codepoint = glyphs[i].codePoints[0];\n      let d = INDIC_DECOMPOSITIONS[codepoint] || decompositions[codepoint];\n      if (d) {\n        let decomposed = d.map(c => {\n          let g = plan.font.glyphForCodePoint(c);\n          return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n        });\n\n        glyphs.splice(i, 1, ...decomposed);\n      }\n    }\n  }\n}\n\nfunction indicCategory(glyph) {\n  return trie.get(glyph.codePoints[0]) >> 8;\n}\n\nfunction indicPosition(glyph) {\n  return 1 << (trie.get(glyph.codePoints[0]) & 0xff);\n}\n\nclass IndicInfo {\n  constructor(category, position, syllableType, syllable) {\n    this.category = category;\n    this.position = position;\n    this.syllableType = syllableType;\n    this.syllable = syllable;\n  }\n}\n\nfunction setupSyllables(font, glyphs) {\n  let syllable = 0;\n  let last = 0;\n  for (let [start, end, tags] of stateMachine.match(glyphs.map(indicCategory))) {\n    if (start > last) {\n      ++syllable;\n      for (let i = last; i < start; i++) {\n        glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n      }\n    }\n\n    ++syllable;\n\n    // Create shaper info\n    for (let i = start; i <= end; i++) {\n      glyphs[i].shaperInfo = new IndicInfo(\n        1 << indicCategory(glyphs[i]),\n        indicPosition(glyphs[i]),\n        tags[0],\n        syllable\n      );\n    }\n\n    last = end + 1;\n  }\n\n  if (last < glyphs.length) {\n    ++syllable;\n    for (let i = last; i < glyphs.length; i++) {\n      glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);\n    }\n  }\n}\n\nfunction isConsonant(glyph) {\n  return glyph.shaperInfo.category & CONSONANT_FLAGS;\n}\n\nfunction isJoiner(glyph) {\n  return glyph.shaperInfo.category & JOINER_FLAGS;\n}\n\nfunction isHalantOrCoeng(glyph) {\n  return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;\n}\n\nfunction wouldSubstitute(glyphs, feature) {\n  for (let glyph of glyphs) {\n    glyph.features = {[feature]: true};\n  }\n\n  let GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;\n  GSUB.applyFeatures([feature], glyphs);\n\n  return glyphs.length === 1;\n}\n\nfunction consonantPosition(font, consonant, virama) {\n  let glyphs = [virama, consonant, virama];\n  if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {\n    return POSITIONS.Below_C;\n  } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {\n    return POSITIONS.Post_C;\n  } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {\n    return POSITIONS.Post_C;\n  }\n\n  return POSITIONS.Base_C;\n}\n\nfunction initialReordering(font, glyphs, plan) {\n  let indicConfig = plan.indicConfig;\n  let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n  let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n  let virama = font.glyphForCodePoint(indicConfig.virama).id;\n  if (virama) {\n    let info = new GlyphInfo(font, virama, [indicConfig.virama]);\n    for (let i = 0; i < glyphs.length; i++) {\n      if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n        glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);\n      }\n    }\n  }\n\n  for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n    let {category, syllableType} = glyphs[start].shaperInfo;\n\n    if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {\n      continue;\n    }\n\n    if (syllableType === 'broken_cluster' && dottedCircle) {\n      let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n      g.shaperInfo = new IndicInfo(\n        1 << indicCategory(g),\n        indicPosition(g),\n        glyphs[start].shaperInfo.syllableType,\n        glyphs[start].shaperInfo.syllable\n      );\n\n      // Insert after possible Repha.\n      let i = start;\n      while (i < end && glyphs[i].shaperInfo.category === CATEGORIES.Repha) {\n        i++;\n      }\n\n      glyphs.splice(i++, 0, g);\n      end++;\n    }\n\n    // 1. Find base consonant:\n    //\n    // The shaping engine finds the base consonant of the syllable, using the\n    // following algorithm: starting from the end of the syllable, move backwards\n    // until a consonant is found that does not have a below-base or post-base\n    // form (post-base forms have to follow below-base forms), or that is not a\n    // pre-base reordering Ra, or arrive at the first consonant. The consonant\n    // stopped at will be the base.\n\n    let base = end;\n    let limit = start;\n    let hasReph = false;\n\n    // If the syllable starts with Ra + Halant (in a script that has Reph)\n    // and has more than one consonant, Ra is excluded from candidates for\n    // base consonants.\n    if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph &&\n      features.rphf &&\n      start + 3 <= end && (\n        (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2])) ||\n        (indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)\n      )\n    ) {\n      // See if it matches the 'rphf' feature.\n      let g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];\n      if (wouldSubstitute(g.slice(0, 2), 'rphf') || (indicConfig.rephMode === 'Explicit' && wouldSubstitute(g, 'rphf'))) {\n        limit += 2;\n        while (limit < end && isJoiner(glyphs[limit])) {\n          limit++;\n        }\n        base = start;\n        hasReph = true;\n      }\n    } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {\n      limit++;\n      while (limit < end && isJoiner(glyphs[limit])) {\n        limit++;\n      }\n      base = start;\n      hasReph = true;\n    }\n\n    switch (indicConfig.basePos) {\n      case 'Last': {\n        // starting from the end of the syllable, move backwards\n        let i = end;\n        let seenBelow = false;\n\n        do {\n          let info = glyphs[--i].shaperInfo;\n\n          // until a consonant is found\n          if (isConsonant(glyphs[i])) {\n            // that does not have a below-base or post-base form\n            // (post-base forms have to follow below-base forms),\n            if (info.position !== POSITIONS.Below_C && (info.position !== POSITIONS.Post_C || seenBelow)) {\n              base = i;\n              break;\n            }\n\n            // or that is not a pre-base reordering Ra,\n            //\n            // IMPLEMENTATION NOTES:\n            //\n            // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped\n            // by the logic above already.\n            //\n\n            // or arrive at the first consonant. The consonant stopped at will\n            // be the base.\n            if (info.position === POSITIONS.Below_C) {\n              seenBelow = true;\n            }\n\n            base = i;\n          } else if (start < i && info.category === CATEGORIES.ZWJ && glyphs[i - 1].shaperInfo.category === CATEGORIES.H) {\n            // A ZWJ after a Halant stops the base search, and requests an explicit\n            // half form.\n            // A ZWJ before a Halant, requests a subjoined form instead, and hence\n            // search continues.  This is particularly important for Bengali\n            // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.\n            break;\n          }\n        } while (i > limit);\n        break;\n      }\n\n      case 'First': {\n        // The first consonant is always the base.\n        base = start;\n\n        // Mark all subsequent consonants as below.\n        for (let i = base + 1; i < end; i++) {\n          if (isConsonant(glyphs[i])) {\n            glyphs[i].shaperInfo.position = POSITIONS.Below_C;\n          }\n        }\n      }\n    }\n\n    // If the syllable starts with Ra + Halant (in a script that has Reph)\n    // and has more than one consonant, Ra is excluded from candidates for\n    // base consonants.\n    //\n    //  Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)\n    if (hasReph && base === start && limit - base <= 2) {\n      hasReph = false;\n    }\n\n    // 2. Decompose and reorder Matras:\n    //\n    // Each matra and any syllable modifier sign in the cluster are moved to the\n    // appropriate position relative to the consonant(s) in the cluster. The\n    // shaping engine decomposes two- or three-part matras into their constituent\n    // parts before any repositioning. Matra characters are classified by which\n    // consonant in a conjunct they have affinity for and are reordered to the\n    // following positions:\n    //\n    //   o Before first half form in the syllable\n    //   o After subjoined consonants\n    //   o After post-form consonant\n    //   o After main consonant (for above marks)\n    //\n    // IMPLEMENTATION NOTES:\n    //\n    // The normalize() routine has already decomposed matras for us, so we don't\n    // need to worry about that.\n\n    // 3.  Reorder marks to canonical order:\n    //\n    // Adjacent nukta and halant or nukta and vedic sign are always repositioned\n    // if necessary, so that the nukta is first.\n    //\n    // IMPLEMENTATION NOTES:\n    //\n    // We don't need to do this: the normalize() routine already did this for us.\n\n    // Reorder characters\n\n    for (let i = start; i < base; i++) {\n      let info = glyphs[i].shaperInfo;\n      info.position = Math.min(POSITIONS.Pre_C, info.position);\n    }\n\n    if (base < end) {\n      glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n    }\n\n    // Mark final consonants.  A final consonant is one appearing after a matra,\n    // like in Khmer.\n    for (let i = base + 1; i < end; i++) {\n      if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n        for (let j = i + 1; j < end; j++) {\n          if (isConsonant(glyphs[j])) {\n            glyphs[j].shaperInfo.position = POSITIONS.Final_C;\n            break;\n          }\n        }\n        break;\n      }\n    }\n\n    // Handle beginning Ra\n    if (hasReph) {\n      glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;\n    }\n\n    // For old-style Indic script tags, move the first post-base Halant after\n    // last consonant.\n    //\n    // Reports suggest that in some scripts Uniscribe does this only if there\n    // is *not* a Halant after last consonant already (eg. Kannada), while it\n    // does it unconditionally in other scripts (eg. Malayalam).  We don't\n    // currently know about other scripts, so we single out Malayalam for now.\n    //\n    // Kannada test case:\n    // U+0C9A,U+0CCD,U+0C9A,U+0CCD\n    // With some versions of Lohit Kannada.\n    // https://bugs.freedesktop.org/show_bug.cgi?id=59118\n    //\n    // Malayalam test case:\n    // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D\n    // With lohit-ttf-20121122/Lohit-Malayalam.ttf\n    if (plan.isOldSpec) {\n      let disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';\n      for (let i = base + 1; i < end; i++) {\n        if (glyphs[i].shaperInfo.category === CATEGORIES.H) {\n          let j;\n          for (j = end - 1; j > i; j--) {\n            if (isConsonant(glyphs[j]) || (disallowDoubleHalants && glyphs[j].shaperInfo.category === CATEGORIES.H)) {\n              break;\n            }\n          }\n\n          if (glyphs[j].shaperInfo.category !== CATEGORIES.H && j > i) {\n            // Move Halant to after last consonant.\n            let t = glyphs[i];\n            glyphs.splice(i, 0, ...glyphs.splice(i + 1, j - i));\n            glyphs[j] = t;\n          }\n\n          break;\n        }\n      }\n    }\n\n    // Attach misc marks to previous char to move with them.\n    let lastPos = POSITIONS.Start;\n    for (let i = start; i < end; i++) {\n      let info = glyphs[i].shaperInfo;\n      if (info.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & info.category)) {\n        info.position = lastPos;\n        if (info.category === CATEGORIES.H && info.position === POSITIONS.Pre_M) {\n          // Uniscribe doesn't move the Halant with Left Matra.\n          // TEST: U+092B,U+093F,U+094DE\n          // We follow.  This is important for the Sinhala\n          // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA\n          // where U+0DD9 is a left matra and U+0DCA is the virama.\n          // We don't want to move the virama with the left matra.\n          // TEST: U+0D9A,U+0DDA\n          for (let j = i; j > start; j--) {\n            if (glyphs[j - 1].shaperInfo.position !== POSITIONS.Pre_M) {\n              info.position = glyphs[j - 1].shaperInfo.position;\n              break;\n            }\n          }\n        }\n      } else if (info.position !== POSITIONS.SMVD) {\n        lastPos = info.position;\n      }\n    }\n\n    // For post-base consonants let them own anything before them\n    // since the last consonant or matra.\n    let last = base;\n    for (let i = base + 1; i < end; i++) {\n      if (isConsonant(glyphs[i])) {\n        for (let j = last + 1; j < i; j++) {\n          if (glyphs[j].shaperInfo.position < POSITIONS.SMVD) {\n            glyphs[j].shaperInfo.position = glyphs[i].shaperInfo.position;\n          }\n        }\n        last = i;\n      } else if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n        last = i;\n      }\n    }\n\n    let arr = glyphs.slice(start, end);\n    arr.sort((a, b) => a.shaperInfo.position - b.shaperInfo.position);\n    glyphs.splice(start, arr.length, ...arr);\n\n    // Find base again\n    for (let i = start; i < end; i++) {\n      if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {\n        base = i;\n        break;\n      }\n    }\n\n    // Setup features now\n\n    // Reph\n    for (let i = start; i < end && glyphs[i].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; i++) {\n      glyphs[i].features.rphf = true;\n    }\n\n    // Pre-base\n    let blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';\n    for (let i = start; i < base; i++) {\n      glyphs[i].features.half = true;\n      if (blwf) {\n        glyphs[i].features.blwf = true;\n      }\n    }\n\n    // Post-base\n    for (let i = base + 1; i < end; i++) {\n      glyphs[i].features.abvf = true;\n      glyphs[i].features.pstf = true;\n      glyphs[i].features.blwf = true;\n    }\n\n    if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {\n      // Old-spec eye-lash Ra needs special handling.  From the\n      // spec:\n      //\n      // \"The feature 'below-base form' is applied to consonants\n      // having below-base forms and following the base consonant.\n      // The exception is vattu, which may appear below half forms\n      // as well as below the base glyph. The feature 'below-base\n      // form' will be applied to all such occurrences of Ra as well.\"\n      //\n      // Test case: U+0924,U+094D,U+0930,U+094d,U+0915\n      // with Sanskrit 2003 font.\n      //\n      // However, note that Ra,Halant,ZWJ is the correct way to\n      // request eyelash form of Ra, so we wouldbn't inhibit it\n      // in that sequence.\n      //\n      // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915\n      for (let i = start; i + 1 < base; i++) {\n        if (glyphs[i].shaperInfo.category === CATEGORIES.Ra &&\n          glyphs[i + 1].shaperInfo.category === CATEGORIES.H &&\n          (i + 1 === base || glyphs[i + 2].shaperInfo.category === CATEGORIES.ZWJ)\n        ) {\n          glyphs[i].features.blwf = true;\n          glyphs[i + 1].features.blwf = true;\n        }\n      }\n    }\n\n    let prefLen = 2;\n    if (features.pref && base + prefLen < end) {\n      // Find a Halant,Ra sequence and mark it for pre-base reordering processing.\n      for (let i = base + 1; i + prefLen - 1 < end; i++) {\n        let g = [glyphs[i].copy(), glyphs[i + 1].copy()];\n        if (wouldSubstitute(g, 'pref')) {\n          for (let j = 0; j < prefLen; j++) {\n            glyphs[i++].features.pref = true;\n          }\n\n          // Mark the subsequent stuff with 'cfar'.  Used in Khmer.\n          // Read the feature spec.\n          // This allows distinguishing the following cases with MS Khmer fonts:\n          // U+1784,U+17D2,U+179A,U+17D2,U+1782\n          // U+1784,U+17D2,U+1782,U+17D2,U+179A\n          if (features.cfar) {\n            for (; i < end; i++) {\n              glyphs[i].features.cfar = true;\n            }\n          }\n\n          break;\n        }\n      }\n    }\n\n    // Apply ZWJ/ZWNJ effects\n    for (let i = start + 1; i < end; i++) {\n      if (isJoiner(glyphs[i])) {\n        let nonJoiner = glyphs[i].shaperInfo.category === CATEGORIES.ZWNJ;\n        let j = i;\n\n        do {\n          j--;\n\n          // ZWJ/ZWNJ should disable CJCT.  They do that by simply\n          // being there, since we don't skip them for the CJCT\n          // feature (ie. F_MANUAL_ZWJ)\n\n          // A ZWNJ disables HALF.\n          if (nonJoiner) {\n            delete glyphs[j].features.half;\n          }\n        } while (j > start && !isConsonant(glyphs[j]));\n      }\n    }\n  }\n}\n\nfunction finalReordering(font, glyphs, plan) {\n  let indicConfig = plan.indicConfig;\n  let features = font._layoutEngine.engine.GSUBProcessor.features;\n\n  for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n    // 4. Final reordering:\n    //\n    // After the localized forms and basic shaping forms GSUB features have been\n    // applied (see below), the shaping engine performs some final glyph\n    // reordering before applying all the remaining font features to the entire\n    // cluster.\n\n    let tryPref = !!features.pref;\n\n    // Find base again\n    let base = start;\n    for (; base < end; base++) {\n      if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {\n        if (tryPref && base + 1 < end) {\n          for (let i = base + 1; i < end; i++) {\n            if (glyphs[i].features.pref) {\n              if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {\n                // Ok, this was a 'pref' candidate but didn't form any.\n                // Base is around here...\n                base = i;\n                while (base < end && isHalantOrCoeng(glyphs[base])) {\n                  base++;\n                }\n                glyphs[base].shaperInfo.position = POSITIONS.BASE_C;\n                tryPref = false;\n              }\n              break;\n            }\n          }\n        }\n\n        // For Malayalam, skip over unformed below- (but NOT post-) forms.\n        if (plan.unicodeScript === 'Malayalam') {\n          for (let i = base + 1; i < end; i++) {\n            while (i < end && isJoiner(glyphs[i])) {\n              i++;\n            }\n\n            if (i === end || !isHalantOrCoeng(glyphs[i])) {\n              break;\n            }\n\n            i++; // Skip halant.\n            while (i < end && isJoiner(glyphs[i])) {\n              i++;\n            }\n\n            if (i < end && isConsonant(glyphs[i]) && glyphs[i].shaperInfo.position === POSITIONS.Below_C) {\n              base = i;\n              glyphs[base].shaperInfo.position = POSITIONS.Base_C;\n            }\n          }\n        }\n\n        if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {\n          base--;\n        }\n        break;\n      }\n    }\n\n    if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {\n      base--;\n    }\n\n    if (base < end) {\n      while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {\n        base--;\n      }\n    }\n\n    // o Reorder matras:\n    //\n    // If a pre-base matra character had been reordered before applying basic\n    // features, the glyph can be moved closer to the main consonant based on\n    // whether half-forms had been formed. Actual position for the matra is\n    // defined as “after last standalone halant glyph, after initial matra\n    // position and before the main consonant”. If ZWJ or ZWNJ follow this\n    // halant, position is moved after it.\n    //\n\n    if (start + 1 < end && start < base) { // Otherwise there can't be any pre-base matra characters.\n      // If we lost track of base, alas, position before last thingy.\n      let newPos = base === end ? base - 2 : base - 1;\n\n      // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n      // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n      // We want to position matra after them.\n      if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n        while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n          newPos--;\n        }\n\n        // If we found no Halant we are done.\n        // Otherwise only proceed if the Halant does\n        // not belong to the Matra itself!\n        if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n          // If ZWJ or ZWNJ follow this halant, position is moved after it.\n          if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {\n            newPos++;\n          }\n        } else {\n          newPos = start; // No move.\n        }\n      }\n\n      if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {\n        // Now go see if there's actually any matras...\n        for (let i = newPos; i > start; i--) {\n          if (glyphs[i - 1].shaperInfo.position === POSITIONS.Pre_M) {\n            let oldPos = i - 1;\n            if (oldPos < base && base <= newPos) { // Shouldn't actually happen.\n              base--;\n            }\n\n            let tmp = glyphs[oldPos];\n            glyphs.splice(oldPos, 0, ...glyphs.splice(oldPos + 1, newPos - oldPos));\n            glyphs[newPos] = tmp;\n\n            newPos--;\n          }\n        }\n      }\n    }\n\n    // o Reorder reph:\n    //\n    // Reph’s original position is always at the beginning of the syllable,\n    // (i.e. it is not reordered at the character reordering stage). However,\n    // it will be reordered according to the basic-forms shaping results.\n    // Possible positions for reph, depending on the script, are; after main,\n    // before post-base consonant forms, and after post-base consonant forms.\n\n    // Two cases:\n    //\n    // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then\n    //   we should only move it if the sequence ligated to the repha form.\n    //\n    // - If repha is encoded separately and in the logical position, we should only\n    //   move it if it did NOT ligate.  If it ligated, it's probably the font trying\n    //   to make it work without the reordering.\n    if (start + 1 < end &&\n      glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph &&\n      (glyphs[start].shaperInfo.category === CATEGORIES.Repha) !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)\n    ) {\n      let newRephPos;\n      let rephPos = indicConfig.rephPos;\n      let found = false;\n\n      // 1. If reph should be positioned after post-base consonant forms,\n      //    proceed to step 5.\n      if (rephPos !== POSITIONS.After_Post) {\n        //  2. If the reph repositioning class is not after post-base: target\n        //     position is after the first explicit halant glyph between the\n        //     first post-reph consonant and last main consonant. If ZWJ or ZWNJ\n        //     are following this halant, position is moved after it. If such\n        //     position is found, this is the target position. Otherwise,\n        //     proceed to the next step.\n        //\n        //     Note: in old-implementation fonts, where classifications were\n        //     fixed in shaping engine, there was no case where reph position\n        //     will be found on this step.\n        newRephPos = start + 1;\n        while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n          newRephPos++;\n        }\n\n        if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n          // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n          if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n            newRephPos++;\n          }\n\n          found = true;\n        }\n\n        // 3. If reph should be repositioned after the main consonant: find the\n        //    first consonant not ligated with main, or find the first\n        //    consonant that is not a potential pre-base reordering Ra.\n        if (!found && rephPos === POSITIONS.After_Main) {\n          newRephPos = base;\n          while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {\n            newRephPos++;\n          }\n\n          found = newRephPos < end;\n        }\n\n        // 4. If reph should be positioned before post-base consonant, find\n        //    first post-base classified consonant not ligated with main. If no\n        //    consonant is found, the target position should be before the\n        //    first matra, syllable modifier sign or vedic sign.\n        //\n        // This is our take on what step 4 is trying to say (and failing, BADLY).\n        if (!found && rephPos === POSITIONS.After_Sub) {\n          newRephPos = base;\n          while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {\n            newRephPos++;\n          }\n\n          found = newRephPos < end;\n        }\n      }\n\n      //  5. If no consonant is found in steps 3 or 4, move reph to a position\n      //     immediately before the first post-base matra, syllable modifier\n      //     sign or vedic sign that has a reordering class after the intended\n      //     reph position. For example, if the reordering position for reph\n      //     is post-main, it will skip above-base matras that also have a\n      //     post-main position.\n      if (!found) {\n        // Copied from step 2.\n        newRephPos = start + 1;\n        while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {\n          newRephPos++;\n        }\n\n        if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {\n          // ->If ZWJ or ZWNJ are following this halant, position is moved after it.\n          if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {\n            newRephPos++;\n          }\n\n          found = true;\n        }\n      }\n\n      // 6. Otherwise, reorder reph to the end of the syllable.\n      if (!found) {\n        newRephPos = end - 1;\n        while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {\n          newRephPos--;\n        }\n\n        // If the Reph is to be ending up after a Matra,Halant sequence,\n        // position it before that Halant so it can interact with the Matra.\n        // However, if it's a plain Consonant,Halant we shouldn't do that.\n        // Uniscribe doesn't do this.\n        // TEST: U+0930,U+094D,U+0915,U+094B,U+094D\n        if (isHalantOrCoeng(glyphs[newRephPos])) {\n          for (let i = base + 1; i < newRephPos; i++) {\n            if (glyphs[i].shaperInfo.category === CATEGORIES.M) {\n              newRephPos--;\n            }\n          }\n        }\n      }\n\n      let reph = glyphs[start];\n      glyphs.splice(start, 0, ...glyphs.splice(start + 1, newRephPos - start));\n      glyphs[newRephPos] = reph;\n\n      if (start < base && base <= newRephPos) {\n        base--;\n      }\n    }\n\n    // o Reorder pre-base reordering consonants:\n    //\n    // If a pre-base reordering consonant is found, reorder it according to\n    // the following rules:\n    if (tryPref && base + 1 < end) {\n      for (let i = base + 1; i < end; i++) {\n        if (glyphs[i].features.pref) {\n           // 1. Only reorder a glyph produced by substitution during application\n           //    of the <pref> feature. (Note that a font may shape a Ra consonant with\n           //    the feature generally but block it in certain contexts.)\n\n          // Note: We just check that something got substituted.  We don't check that\n          // the <pref> feature actually did it...\n          //\n          // Reorder pref only if it ligated.\n          if (glyphs[i].isLigated && !glyphs[i].isMultiplied) {\n            // 2. Try to find a target position the same way as for pre-base matra.\n            //    If it is found, reorder pre-base consonant glyph.\n            //\n            // 3. If position is not found, reorder immediately before main\n            //    consonant.\n            let newPos = base;\n\n            // Malayalam / Tamil do not have \"half\" forms or explicit virama forms.\n            // The glyphs formed by 'half' are Chillus or ligated explicit viramas.\n            // We want to position matra after them.\n            if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {\n              while (newPos > start && !(glyphs[newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {\n                newPos--;\n              }\n\n              // In Khmer coeng model, a H,Ra can go *after* matras.  If it goes after a\n              // split matra, it should be reordered to *before* the left part of such matra.\n              if (newPos > start && glyphs[newPos - 1].shaperInfo.category === CATEGORIES.M) {\n                let oldPos = i;\n                for (let j = base + 1; j < oldPos; j++) {\n                  if (glyphs[j].shaperInfo.category === CATEGORIES.M) {\n                    newPos--;\n                    break;\n                  }\n                }\n              }\n            }\n\n            if (newPos > start && isHalantOrCoeng(glyphs[newPos - 1])) {\n              // -> If ZWJ or ZWNJ follow this halant, position is moved after it.\n              if (newPos < end && isJoiner(glyphs[newPos])) {\n                newPos++;\n              }\n            }\n\n            let oldPos = i;\n            let tmp = glyphs[oldPos];\n            glyphs.splice(newPos + 1, 0, ...glyphs.splice(newPos, oldPos - newPos));\n            glyphs[newPos] = tmp;\n\n            if (newPos <= base && base < oldPos) {\n              base++;\n            }\n          }\n\n          break;\n        }\n      }\n    }\n\n    // Apply 'init' to the Left Matra if it's a word start.\n    if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(unicode.getCategory(glyphs[start - 1].codePoints[0])))) {\n      glyphs[start].features.init = true;\n    }\n  }\n}\n\nfunction nextSyllable(glyphs, start) {\n  if (start >= glyphs.length) return start;\n  let syllable = glyphs[start].shaperInfo.syllable;\n  while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n  return start;\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/use.trie'));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n  static zeroMarkWidths = 'BEFORE_GPOS';\n  static planFeatures(plan) {\n    plan.addStage(setupSyllables);\n\n    // Default glyph pre-processing group\n    plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n    // Reordering group\n    plan.addStage(clearSubstitutionFlags);\n    plan.addStage(['rphf'], false);\n    plan.addStage(recordRphf);\n    plan.addStage(clearSubstitutionFlags);\n    plan.addStage(['pref']);\n    plan.addStage(recordPref);\n\n    // Orthographic unit shaping group\n    plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n    plan.addStage(reorder);\n\n    // Topographical features\n    // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n    // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n    // Standard topographic presentation and positional feature application\n    plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n  }\n\n  static assignFeatures(plan, glyphs) {\n    // Decompose split vowels\n    // TODO: do this in a more general unicode normalizer\n    for (let i = glyphs.length - 1; i >= 0; i--) {\n      let codepoint = glyphs[i].codePoints[0];\n      if (decompositions[codepoint]) {\n        let decomposed = decompositions[codepoint].map(c => {\n          let g = plan.font.glyphForCodePoint(c);\n          return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n        });\n\n        glyphs.splice(i, 1, ...decomposed);\n      }\n    }\n  }\n}\n\nfunction useCategory(glyph) {\n  return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n  constructor(category, syllableType, syllable) {\n    this.category = category;\n    this.syllableType = syllableType;\n    this.syllable = syllable;\n  }\n}\n\nfunction setupSyllables(font, glyphs) {\n  let syllable = 0;\n  for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n    ++syllable;\n\n    // Create shaper info\n    for (let i = start; i <= end; i++) {\n      glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n    }\n\n    // Assign rphf feature\n    let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n    for (let i = start; i < start + limit; i++) {\n      glyphs[i].features.rphf = true;\n    }\n  }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n  for (let glyph of glyphs) {\n    glyph.substituted = false;\n  }\n}\n\nfunction recordRphf(font, glyphs) {\n  for (let glyph of glyphs) {\n    if (glyph.substituted && glyph.features.rphf) {\n      // Mark a substituted repha.\n      glyph.shaperInfo.category = 'R';\n    }\n  }\n}\n\nfunction recordPref(font, glyphs) {\n  for (let glyph of glyphs) {\n    if (glyph.substituted) {\n      // Mark a substituted pref as VPre, as they behave the same way.\n      glyph.shaperInfo.category = 'VPre';\n    }\n  }\n}\n\nfunction reorder(font, glyphs) {\n  let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n  for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n    let i, j;\n    let info = glyphs[start].shaperInfo;\n    let type = info.syllableType;\n\n    // Only a few syllable types need reordering.\n    if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n      continue;\n    }\n\n    // Insert a dotted circle glyph in broken clusters.\n    if (type === 'broken_cluster' && dottedCircle) {\n      let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n      g.shaperInfo = info;\n\n      // Insert after possible Repha.\n      for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n      glyphs.splice(++i, 0, g);\n      end++;\n    }\n\n    // Move things forward.\n    if (info.category === 'R' && end - start > 1) {\n      // Got a repha. Reorder it to after first base, before first halant.\n      for (i = start + 1; i < end; i++) {\n        info = glyphs[i].shaperInfo;\n        if (isBase(info) || isHalant(glyphs[i])) {\n          // If we hit a halant, move before it; otherwise it's a base: move to it's\n          // place, and shift things in between backward.\n          if (isHalant(glyphs[i])) {\n            i--;\n          }\n\n          glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n          break;\n        }\n      }\n    }\n\n    // Move things back.\n    for (i = start, j = end; i < end; i++) {\n      info = glyphs[i].shaperInfo;\n      if (isBase(info) || isHalant(glyphs[i])) {\n        // If we hit a halant, move after it; otherwise it's a base: move to it's\n        // place, and shift things in between backward.\n        j = isHalant(glyphs[i]) ? i + 1 : i;\n      } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n        glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n      }\n    }\n  }\n}\n\nfunction nextSyllable(glyphs, start) {\n  if (start >= glyphs.length) return start;\n  let syllable = glyphs[start].shaperInfo.syllable;\n  while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n  return start;\n}\n\nfunction isHalant(glyph) {\n  return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n  return info.category === 'B' || info.category === 'GB';\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport IndicShaper from './IndicShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n  arab: ArabicShaper,    // Arabic\n  mong: ArabicShaper,    // Mongolian\n  syrc: ArabicShaper,    // Syriac\n  'nko ': ArabicShaper,  // N'Ko\n  phag: ArabicShaper,    // Phags Pa\n  mand: ArabicShaper,    // Mandaic\n  mani: ArabicShaper,    // Manichaean\n  phlp: ArabicShaper,    // Psalter Pahlavi\n\n  hang: HangulShaper,    // Hangul\n\n  bng2: IndicShaper,     // Bengali\n  beng: IndicShaper,     // Bengali\n  dev2: IndicShaper,     // Devanagari\n  deva: IndicShaper,     // Devanagari\n  gjr2: IndicShaper,     // Gujarati\n  gujr: IndicShaper,     // Gujarati\n  guru: IndicShaper,     // Gurmukhi\n  gur2: IndicShaper,     // Gurmukhi\n  knda: IndicShaper,     // Kannada\n  knd2: IndicShaper,     // Kannada\n  mlm2: IndicShaper,     // Malayalam\n  mlym: IndicShaper,     // Malayalam\n  ory2: IndicShaper,     // Oriya\n  orya: IndicShaper,     // Oriya\n  taml: IndicShaper,     // Tamil\n  tml2: IndicShaper,     // Tamil\n  telu: IndicShaper,     // Telugu\n  tel2: IndicShaper,     // Telugu\n  khmr: IndicShaper,     // Khmer\n\n  bali: UniversalShaper, // Balinese\n  batk: UniversalShaper, // Batak\n  brah: UniversalShaper, // Brahmi\n  bugi: UniversalShaper, // Buginese\n  buhd: UniversalShaper, // Buhid\n  cakm: UniversalShaper, // Chakma\n  cham: UniversalShaper, // Cham\n  dupl: UniversalShaper, // Duployan\n  egyp: UniversalShaper, // Egyptian Hieroglyphs\n  gran: UniversalShaper, // Grantha\n  hano: UniversalShaper, // Hanunoo\n  java: UniversalShaper, // Javanese\n  kthi: UniversalShaper, // Kaithi\n  kali: UniversalShaper, // Kayah Li\n  khar: UniversalShaper, // Kharoshthi\n  khoj: UniversalShaper, // Khojki\n  sind: UniversalShaper, // Khudawadi\n  lepc: UniversalShaper, // Lepcha\n  limb: UniversalShaper, // Limbu\n  mahj: UniversalShaper, // Mahajani\n  // mand: UniversalShaper, // Mandaic\n  // mani: UniversalShaper, // Manichaean\n  mtei: UniversalShaper, // Meitei Mayek\n  modi: UniversalShaper, // Modi\n  // mong: UniversalShaper, // Mongolian\n  // 'nko ': UniversalShaper, // N’Ko\n  hmng: UniversalShaper, // Pahawh Hmong\n  // phag: UniversalShaper, // Phags-pa\n  // phlp: UniversalShaper, // Psalter Pahlavi\n  rjng: UniversalShaper, // Rejang\n  saur: UniversalShaper, // Saurashtra\n  shrd: UniversalShaper, // Sharada\n  sidd: UniversalShaper, // Siddham\n  sinh: UniversalShaper, // Sinhala\n  sund: UniversalShaper, // Sundanese\n  sylo: UniversalShaper, // Syloti Nagri\n  tglg: UniversalShaper, // Tagalog\n  tagb: UniversalShaper, // Tagbanwa\n  tale: UniversalShaper, // Tai Le\n  lana: UniversalShaper, // Tai Tham\n  tavt: UniversalShaper, // Tai Viet\n  takr: UniversalShaper, // Takri\n  tibt: UniversalShaper, // Tibetan\n  tfng: UniversalShaper, // Tifinagh\n  tirh: UniversalShaper, // Tirhuta\n\n  latn: DefaultShaper,   // Latin\n  DFLT: DefaultShaper    // Default\n};\n\nexport function choose(script) {\n  if (!Array.isArray(script)) {\n    script = [script];\n  }\n\n  for (let s of script) {\n    let shaper = SHAPERS[s];\n    if (shaper) {\n      return shaper;\n    }\n  }\n\n  return DefaultShaper;\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n  applyLookup(lookupType, table) {\n    switch (lookupType) {\n      case 1: { // Single Substitution\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        let glyph = this.glyphIterator.cur;\n        switch (table.version) {\n          case 1:\n            glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n            break;\n\n          case 2:\n            glyph.id = table.substitute.get(index);\n            break;\n        }\n\n        return true;\n      }\n\n      case 2: { // Multiple Substitution\n        let index = this.coverageIndex(table.coverage);\n        if (index !== -1) {\n          let sequence = table.sequences.get(index);\n\n          if (sequence.length === 0) {\n            // If the sequence length is zero, delete the glyph.\n            // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.\n            this.glyphs.splice(this.glyphIterator.index, 1);\n            return true;\n          }\n\n          this.glyphIterator.cur.id = sequence[0];\n          this.glyphIterator.cur.ligatureComponent = 0;\n\n          let features = this.glyphIterator.cur.features;\n          let curGlyph = this.glyphIterator.cur;\n          let replacement = sequence.slice(1).map((gid, i) => {\n            let glyph = new GlyphInfo(this.font, gid, undefined, features);\n            glyph.shaperInfo = curGlyph.shaperInfo;\n            glyph.isLigated = curGlyph.isLigated;\n            glyph.ligatureComponent = i + 1;\n            glyph.substituted = true;\n            glyph.isMultiplied = true;\n            return glyph;\n          });\n\n          this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n          return true;\n        }\n\n        return false;\n      }\n\n      case 3: { // Alternate Substitution\n        let index = this.coverageIndex(table.coverage);\n        if (index !== -1) {\n          let USER_INDEX = 0; // TODO\n          this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n          return true;\n        }\n\n        return false;\n      }\n\n      case 4: { // Ligature Substitution\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        for (let ligature of table.ligatureSets.get(index)) {\n          let matched = this.sequenceMatchIndices(1, ligature.components);\n          if (!matched) {\n            continue;\n          }\n\n          let curGlyph = this.glyphIterator.cur;\n\n          // Concatenate all of the characters the new ligature will represent\n          let characters = curGlyph.codePoints.slice();\n          for (let index of matched) {\n            characters.push(...this.glyphs[index].codePoints);\n          }\n\n          // Create the replacement ligature glyph\n          let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n          ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n          ligatureGlyph.isLigated = true;\n          ligatureGlyph.substituted = true;\n\n          // From Harfbuzz:\n          // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n          //   the ligature to keep its old ligature id.  This will allow it to attach to\n          //   a base ligature in GPOS.  Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n          //   and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n          //   ligature id and component value of 2.  Then if SHADDA,FATHA form a ligature\n          //   later, we don't want them to lose their ligature id/component, otherwise\n          //   GPOS will fail to correctly position the mark ligature on top of the\n          //   LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n          //\n          // - If a ligature is formed of components that some of which are also ligatures\n          //   themselves, and those ligature components had marks attached to *their*\n          //   components, we have to attach the marks to the new ligature component\n          //   positions!  Now *that*'s tricky!  And these marks may be following the\n          //   last component of the whole sequence, so we should loop forward looking\n          //   for them and update them.\n          //\n          //   Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n          //   'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n          //   id and component == 1.  Now, during 'liga', the LAM and the LAM-HEH ligature\n          //   form a LAM-LAM-HEH ligature.  We need to reassign the SHADDA and FATHA to\n          //   the new ligature with a component value of 2.\n          //\n          //   This in fact happened to a font...  See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n          let isMarkLigature = curGlyph.isMark;\n          for (let i = 0; i < matched.length && isMarkLigature; i++) {\n            isMarkLigature = this.glyphs[matched[i]].isMark;\n          }\n\n          ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n          let lastLigID = curGlyph.ligatureID;\n          let lastNumComps = curGlyph.codePoints.length;\n          let curComps = lastNumComps;\n          let idx = this.glyphIterator.index + 1;\n\n          // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n          // This allows GPOS to attach marks to the correct ligature components.\n          for (let matchIndex of matched) {\n            // Don't assign new ligature components for mark ligatures (see above)\n            if (isMarkLigature) {\n              idx = matchIndex;\n            } else {\n              while (idx < matchIndex) {\n                var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n                this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n                this.glyphs[idx].ligatureComponent = ligatureComponent;\n                idx++;\n              }\n            }\n\n            lastLigID = this.glyphs[idx].ligatureID;\n            lastNumComps = this.glyphs[idx].codePoints.length;\n            curComps += lastNumComps;\n            idx++; // skip base glyph\n          }\n\n          // Adjust ligature components for any marks following\n          if (lastLigID && !isMarkLigature) {\n            for (let i = idx; i < this.glyphs.length; i++) {\n              if (this.glyphs[i].ligatureID === lastLigID) {\n                var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n                this.glyphs[i].ligatureComponent = ligatureComponent;\n              } else {\n                break;\n              }\n            }\n          }\n\n          // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n          for (let i = matched.length - 1; i >= 0; i--) {\n            this.glyphs.splice(matched[i], 1);\n          }\n\n          this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n          return true;\n        }\n\n        return false;\n      }\n\n      case 5: // Contextual Substitution\n        return this.applyContext(table);\n\n      case 6: // Chaining Contextual Substitution\n        return this.applyChainingContext(table);\n\n      case 7: // Extension Substitution\n        return this.applyLookup(table.lookupType, table.extension);\n\n      default:\n        throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n    }\n  }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n  applyPositionValue(sequenceIndex, value) {\n    let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n    if (value.xAdvance != null) {\n      position.xAdvance += value.xAdvance;\n    }\n\n    if (value.yAdvance != null) {\n      position.yAdvance += value.yAdvance;\n    }\n\n    if (value.xPlacement != null) {\n      position.xOffset += value.xPlacement;\n    }\n\n    if (value.yPlacement != null) {\n      position.yOffset += value.yPlacement;\n    }\n\n    // Adjustments for font variations\n    let variationProcessor = this.font._variationProcessor;\n    let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n    if (variationProcessor && variationStore) {\n      if (value.xPlaDevice) {\n        position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);\n      }\n\n      if (value.yPlaDevice) {\n        position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);\n      }\n\n      if (value.xAdvDevice) {\n        position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);\n      }\n\n      if (value.yAdvDevice) {\n        position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);\n      }\n    }\n\n    // TODO: device tables\n  }\n\n  applyLookup(lookupType, table) {\n    switch (lookupType) {\n      case 1: { // Single positioning value\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        switch (table.version) {\n          case 1:\n            this.applyPositionValue(0, table.value);\n            break;\n\n          case 2:\n            this.applyPositionValue(0, table.values.get(index));\n            break;\n        }\n\n        return true;\n      }\n\n      case 2: { // Pair Adjustment Positioning\n        let nextGlyph = this.glyphIterator.peek();\n        if (!nextGlyph) {\n          return false;\n        }\n\n        let index = this.coverageIndex(table.coverage);\n        if (index === -1) {\n          return false;\n        }\n\n        switch (table.version) {\n          case 1: // Adjustments for glyph pairs\n            let set = table.pairSets.get(index);\n\n            for (let pair of set) {\n              if (pair.secondGlyph === nextGlyph.id) {\n                this.applyPositionValue(0, pair.value1);\n                this.applyPositionValue(1, pair.value2);\n                return true;\n              }\n            }\n\n            return false;\n\n          case 2: // Class pair adjustment\n            let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n            let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n            if (class1 === -1 || class2 === -1) {\n              return false;\n            }\n\n            var pair = table.classRecords.get(class1).get(class2);\n            this.applyPositionValue(0, pair.value1);\n            this.applyPositionValue(1, pair.value2);\n            return true;\n        }\n      }\n\n      case 3: { // Cursive Attachment Positioning\n        let nextIndex = this.glyphIterator.peekIndex();\n        let nextGlyph = this.glyphs[nextIndex];\n        if (!nextGlyph) {\n          return false;\n        }\n\n        let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n        if (!curRecord || !curRecord.exitAnchor) {\n          return false;\n        }\n\n        let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n        if (!nextRecord || !nextRecord.entryAnchor) {\n          return false;\n        }\n\n        let entry = this.getAnchor(nextRecord.entryAnchor);\n        let exit = this.getAnchor(curRecord.exitAnchor);\n\n        let cur = this.positions[this.glyphIterator.index];\n        let next = this.positions[nextIndex];\n\n        switch (this.direction) {\n          case 'ltr':\n            cur.xAdvance = exit.x + cur.xOffset;\n\n            let d = entry.x + next.xOffset;\n            next.xAdvance -= d;\n            next.xOffset -= d;\n            break;\n\n          case 'rtl':\n            d = exit.x + cur.xOffset;\n            cur.xAdvance -= d;\n            cur.xOffset -= d;\n            next.xAdvance = entry.x + next.xOffset;\n            break;\n        }\n\n        if (this.glyphIterator.flags.rightToLeft) {\n          this.glyphIterator.cur.cursiveAttachment = nextIndex;\n          cur.yOffset = entry.y - exit.y;\n        } else {\n          nextGlyph.cursiveAttachment = this.glyphIterator.index;\n          cur.yOffset = exit.y - entry.y;\n        }\n\n        return true;\n      }\n\n      case 4: { // Mark to base positioning\n        let markIndex = this.coverageIndex(table.markCoverage);\n        if (markIndex === -1) {\n          return false;\n        }\n\n        // search backward for a base glyph\n        let baseGlyphIndex = this.glyphIterator.index;\n        while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0));\n\n        if (baseGlyphIndex < 0) {\n          return false;\n        }\n\n        let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n        if (baseIndex === -1) {\n          return false;\n        }\n\n        let markRecord = table.markArray[markIndex];\n        let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n        this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n        return true;\n      }\n\n      case 5: { // Mark to ligature positioning\n        let markIndex = this.coverageIndex(table.markCoverage);\n        if (markIndex === -1) {\n          return false;\n        }\n\n        // search backward for a base glyph\n        let baseGlyphIndex = this.glyphIterator.index;\n        while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n        if (baseGlyphIndex < 0) {\n          return false;\n        }\n\n        let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n        if (ligIndex === -1) {\n          return false;\n        }\n\n        let ligAttach = table.ligatureArray[ligIndex];\n        let markGlyph = this.glyphIterator.cur;\n        let ligGlyph = this.glyphs[baseGlyphIndex];\n        let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent > 0)\n          ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n          : ligGlyph.codePoints.length - 1;\n\n        let markRecord = table.markArray[markIndex];\n        let baseAnchor = ligAttach[compIndex][markRecord.class];\n        this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n        return true;\n      }\n\n      case 6: { // Mark to mark positioning\n        let mark1Index = this.coverageIndex(table.mark1Coverage);\n        if (mark1Index === -1) {\n          return false;\n        }\n\n        // get the previous mark to attach to\n        let prevIndex = this.glyphIterator.peekIndex(-1);\n        let prev = this.glyphs[prevIndex];\n        if (!prev || !prev.isMark) {\n          return false;\n        }\n\n        let cur = this.glyphIterator.cur;\n\n        // The following logic was borrowed from Harfbuzz\n        let good = false;\n        if (cur.ligatureID === prev.ligatureID) {\n          if (!cur.ligatureID) { // Marks belonging to the same base\n            good = true;\n          } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n            good = true;\n          }\n        } else {\n          // If ligature ids don't match, it may be the case that one of the marks\n          // itself is a ligature, in which case match.\n          if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n            good = true;\n          }\n        }\n\n        if (!good) {\n          return false;\n        }\n\n        let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n        if (mark2Index === -1) {\n          return false;\n        }\n\n        let markRecord = table.mark1Array[mark1Index];\n        let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n        this.applyAnchor(markRecord, baseAnchor, prevIndex);\n        return true;\n      }\n\n      case 7: // Contextual positioning\n        return this.applyContext(table);\n\n      case 8: // Chaining contextual positioning\n        return this.applyChainingContext(table);\n\n      case 9: // Extension positioning\n        return this.applyLookup(table.lookupType, table.extension);\n\n      default:\n        throw new Error(`Unsupported GPOS table: ${lookupType}`);\n    }\n  }\n\n  applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n    let baseCoords = this.getAnchor(baseAnchor);\n    let markCoords = this.getAnchor(markRecord.markAnchor);\n\n    let basePos = this.positions[baseGlyphIndex];\n    let markPos = this.positions[this.glyphIterator.index];\n\n    markPos.xOffset = baseCoords.x - markCoords.x;\n    markPos.yOffset = baseCoords.y - markCoords.y;\n    this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n  }\n\n  getAnchor(anchor) {\n    // TODO: contour point, device tables\n    let x = anchor.xCoordinate;\n    let y = anchor.yCoordinate;\n\n    // Adjustments for font variations\n    let variationProcessor = this.font._variationProcessor;\n    let variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;\n    if (variationProcessor && variationStore) {\n      if (anchor.xDeviceTable) {\n        x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);\n      }\n\n      if (anchor.yDeviceTable) {\n        y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);\n      }\n    }\n\n    return {x, y};\n  }\n\n  applyFeatures(userFeatures, glyphs, advances) {\n    super.applyFeatures(userFeatures, glyphs, advances);\n\n    for (var i = 0; i < this.glyphs.length; i++) {\n      this.fixCursiveAttachment(i);\n    }\n\n    this.fixMarkAttachment();\n  }\n\n  fixCursiveAttachment(i) {\n    let glyph = this.glyphs[i];\n    if (glyph.cursiveAttachment != null) {\n      let j = glyph.cursiveAttachment;\n\n      glyph.cursiveAttachment = null;\n      this.fixCursiveAttachment(j);\n\n      this.positions[i].yOffset += this.positions[j].yOffset;\n    }\n  }\n\n  fixMarkAttachment() {\n    for (let i = 0; i < this.glyphs.length; i++) {\n      let glyph = this.glyphs[i];\n      if (glyph.markAttachment != null) {\n        let j = glyph.markAttachment;\n\n        this.positions[i].xOffset += this.positions[j].xOffset;\n        this.positions[i].yOffset += this.positions[j].yOffset;\n\n        if (this.direction === 'ltr') {\n          for (let k = j; k < i; k++) {\n            this.positions[i].xOffset -= this.positions[k].xAdvance;\n            this.positions[i].yOffset -= this.positions[k].yAdvance;\n          }\n        } else {\n          for (let k = j + 1; k < i + 1; k++) {\n            this.positions[i].xOffset += this.positions[k].xAdvance;\n            this.positions[i].yOffset += this.positions[k].yAdvance;\n          }\n        }\n      }\n    }\n  }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n  constructor(font) {\n    this.font = font;\n    this.glyphInfos = null;\n    this.plan = null;\n    this.GSUBProcessor = null;\n    this.GPOSProcessor = null;\n    this.fallbackPosition = true;\n\n    if (font.GSUB) {\n      this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n    }\n\n    if (font.GPOS) {\n      this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n    }\n  }\n\n  setup(glyphRun) {\n    // Map glyphs to GlyphInfo objects so data can be passed between\n    // GSUB and GPOS without mutating the real (shared) Glyph objects.\n    this.glyphInfos = glyphRun.glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n    // Select a script based on what is available in GSUB/GPOS.\n    let script = null;\n    if (this.GPOSProcessor) {\n      script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n    }\n\n    if (this.GSUBProcessor) {\n      script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);\n    }\n\n    // Choose a shaper based on the script, and setup a shaping plan.\n    // This determines which features to apply to which glyphs.\n    this.shaper = Shapers.choose(script);\n    this.plan = new ShapingPlan(this.font, script, glyphRun.direction);\n    this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features);\n\n    // Assign chosen features to output glyph run\n    for (let key in this.plan.allFeatures) {\n      glyphRun.features[key] = true;\n    }\n  }\n\n  substitute(glyphRun) {\n    if (this.GSUBProcessor) {\n      this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n      // Map glyph infos back to normal Glyph objects\n      glyphRun.glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n    }\n  }\n\n  position(glyphRun) {\n    if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n      this.zeroMarkAdvances(glyphRun.positions);\n    }\n\n    if (this.GPOSProcessor) {\n      this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);\n    }\n\n    if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n      this.zeroMarkAdvances(glyphRun.positions);\n    }\n\n    // Reverse the glyphs and positions if the script is right-to-left\n    if (glyphRun.direction === 'rtl') {\n      glyphRun.glyphs.reverse();\n      glyphRun.positions.reverse();\n    }\n\n    return this.GPOSProcessor && this.GPOSProcessor.features;\n  }\n\n  zeroMarkAdvances(positions) {\n    for (let i = 0; i < this.glyphInfos.length; i++) {\n      if (this.glyphInfos[i].isMark) {\n        positions[i].xAdvance = 0;\n        positions[i].yAdvance = 0;\n      }\n    }\n  }\n\n  cleanup() {\n    this.glyphInfos = null;\n    this.plan = null;\n    this.shaper = null;\n  }\n\n  getAvailableFeatures(script, language) {\n    let features = [];\n\n    if (this.GSUBProcessor) {\n      this.GSUBProcessor.selectScript(script, language);\n      features.push(...Object.keys(this.GSUBProcessor.features));\n    }\n\n    if (this.GPOSProcessor) {\n      this.GPOSProcessor.selectScript(script, language);\n      features.push(...Object.keys(this.GPOSProcessor.features));\n    }\n\n    return features;\n  }\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport unicode from 'unicode-properties';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n  constructor(font) {\n    this.font = font;\n    this.unicodeLayoutEngine = null;\n    this.kernProcessor = null;\n\n    // Choose an advanced layout engine. We try the AAT morx table first since more\n    // scripts are currently supported because the shaping logic is built into the font.\n    if (this.font.morx) {\n      this.engine = new AATLayoutEngine(this.font);\n\n    } else if (this.font.GSUB || this.font.GPOS) {\n      this.engine = new OTLayoutEngine(this.font);\n    }\n  }\n\n  layout(string, features, script, language, direction) {\n    // Make the features parameter optional\n    if (typeof features === 'string') {\n      direction = language;\n      language = script;\n      script = features;\n      features = [];\n    }\n\n    // Map string to glyphs if needed\n    if (typeof string === 'string') {\n      // Attempt to detect the script from the string if not provided.\n      if (script == null) {\n        script = Script.forString(string);\n      }\n\n      var glyphs = this.font.glyphsForString(string);\n    } else {\n      // Attempt to detect the script from the glyph code points if not provided.\n      if (script == null) {\n        let codePoints = [];\n        for (let glyph of string) {\n          codePoints.push(...glyph.codePoints);\n        }\n\n        script = Script.forCodePoints(codePoints);\n      }\n\n      var glyphs = string;\n    }\n\n    let glyphRun = new GlyphRun(glyphs, features, script, language, direction);\n\n    // Return early if there are no glyphs\n    if (glyphs.length === 0) {\n      glyphRun.positions = [];\n      return glyphRun;\n    }\n\n    // Setup the advanced layout engine\n    if (this.engine && this.engine.setup) {\n      this.engine.setup(glyphRun);\n    }\n\n    // Substitute and position the glyphs\n    this.substitute(glyphRun);\n    this.position(glyphRun);\n\n    this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions);\n\n    // Let the layout engine clean up any state it might have\n    if (this.engine && this.engine.cleanup) {\n      this.engine.cleanup();\n    }\n\n    return glyphRun;\n  }\n\n  substitute(glyphRun) {\n    // Call the advanced layout engine to make substitutions\n    if (this.engine && this.engine.substitute) {\n      this.engine.substitute(glyphRun);\n    }\n  }\n\n  position(glyphRun) {\n    // Get initial glyph positions\n    glyphRun.positions = glyphRun.glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n    let positioned = null;\n\n    // Call the advanced layout engine. Returns the features applied.\n    if (this.engine && this.engine.position) {\n      positioned = this.engine.position(glyphRun);\n    }\n\n    // if there is no GPOS table, use unicode properties to position marks.\n    if (!positioned && (!this.engine || this.engine.fallbackPosition)) {\n      if (!this.unicodeLayoutEngine) {\n        this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n      }\n\n      this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);\n    }\n\n    // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n    if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {\n      if (!this.kernProcessor) {\n        this.kernProcessor = new KernProcessor(this.font);\n      }\n\n      this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);\n      glyphRun.features.kern = true;\n    }\n  }\n\n  hideDefaultIgnorables(glyphs, positions) {\n    let space = this.font.glyphForCodePoint(0x20);\n    for (let i = 0; i < glyphs.length; i++) {\n      if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {\n        glyphs[i] = space;\n        positions[i].xAdvance = 0;\n        positions[i].yAdvance = 0;\n      }\n    }\n  }\n\n  isDefaultIgnorable(ch) {\n    // From DerivedCoreProperties.txt in the Unicode database,\n    // minus U+115F, U+1160, U+3164 and U+FFA0, which is what\n    // Harfbuzz and Uniscribe do.\n    let plane = ch >> 16;\n    if (plane === 0) {\n      // BMP\n      switch (ch >> 8) {\n      \tcase 0x00: return ch === 0x00AD;\n      \tcase 0x03: return ch === 0x034F;\n      \tcase 0x06: return ch === 0x061C;\n      \tcase 0x17: return 0x17B4 <= ch && ch <= 0x17B5;\n      \tcase 0x18: return 0x180B <= ch && ch <= 0x180E;\n      \tcase 0x20: return (0x200B <= ch && ch <= 0x200F) || (0x202A <= ch && ch <= 0x202E) || (0x2060 <= ch && ch <= 0x206F);\n      \tcase 0xFE: return (0xFE00 <= ch && ch <= 0xFE0F) || ch === 0xFEFF;\n      \tcase 0xFF: return 0xFFF0 <= ch && ch <= 0xFFF8;\n      \tdefault:   return false;\n      }\n    } else {\n      // Other planes\n      switch (plane) {\n      \tcase 0x01: return (0x1BCA0 <= ch && ch <= 0x1BCA3) || (0x1D173 <= ch && ch <= 0x1D17A);\n      \tcase 0x0E: return 0xE0000 <= ch && ch <= 0xE0FFF;\n      \tdefault:   return false;\n      }\n    }\n  }\n\n  getAvailableFeatures(script, language) {\n    let features = [];\n\n    if (this.engine) {\n      features.push(...this.engine.getAvailableFeatures(script, language));\n    }\n\n    if (this.font.kern && features.indexOf('kern') === -1) {\n      features.push('kern');\n    }\n\n    return features;\n  }\n\n  stringsForGlyph(gid) {\n    let result = new Set;\n\n    let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n    for (let codePoint of codePoints) {\n      result.add(String.fromCodePoint(codePoint));\n    }\n\n    if (this.engine && this.engine.stringsForGlyph) {\n      for (let string of this.engine.stringsForGlyph(gid)) {\n        result.add(string);\n      }\n    }\n\n    return Array.from(result);\n  }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n  moveTo: 'M',\n  lineTo: 'L',\n  quadraticCurveTo: 'Q',\n  bezierCurveTo: 'C',\n  closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n  constructor() {\n    this.commands = [];\n    this._bbox = null;\n    this._cbox = null;\n  }\n\n  /**\n   * Compiles the path to a JavaScript function that can be applied with\n   * a graphics context in order to render the path.\n   * @return {string}\n   */\n  toFunction() {\n    return ctx => {\n      this.commands.forEach(c => {\n        return ctx[c.command].apply(ctx, c.args)\n      })\n    };\n  }\n\n  /**\n   * Converts the path to an SVG path data string\n   * @return {string}\n   */\n  toSVG() {\n    let cmds = this.commands.map(c => {\n      let args = c.args.map(arg => Math.round(arg * 100) / 100);\n      return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n    });\n\n    return cmds.join('');\n  }\n\n  /**\n   * Gets the \"control box\" of a path.\n   * This is like the bounding box, but it includes all points including\n   * control points of bezier segments and is much faster to compute than\n   * the real bounding box.\n   * @type {BBox}\n   */\n  get cbox() {\n    if (!this._cbox) {\n      let cbox = new BBox;\n      for (let command of this.commands) {\n        for (let i = 0; i < command.args.length; i += 2) {\n          cbox.addPoint(command.args[i], command.args[i + 1]);\n        }\n      }\n\n      this._cbox = Object.freeze(cbox);\n    }\n\n    return this._cbox;\n  }\n\n  /**\n   * Gets the exact bounding box of the path by evaluating curve segments.\n   * Slower to compute than the control box, but more accurate.\n   * @type {BBox}\n   */\n  get bbox() {\n    if (this._bbox) {\n      return this._bbox;\n    }\n\n    let bbox = new BBox;\n    let cx = 0, cy = 0;\n\n    let f = t => (\n      Math.pow(1 - t, 3) * p0[i]\n        + 3 * Math.pow(1 - t, 2) * t * p1[i]\n        + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n        + Math.pow(t, 3) * p3[i]\n    );\n\n    for (let c of this.commands) {\n      switch (c.command) {\n        case 'moveTo':\n        case 'lineTo':\n          let [x, y] = c.args;\n          bbox.addPoint(x, y);\n          cx = x;\n          cy = y;\n          break;\n\n        case 'quadraticCurveTo':\n        case 'bezierCurveTo':\n          if (c.command === 'quadraticCurveTo') {\n            // http://fontforge.org/bezier.html\n            var [qp1x, qp1y, p3x, p3y] = c.args;\n            var cp1x = cx + 2 / 3 * (qp1x - cx);    // CP1 = QP0 + 2/3 * (QP1-QP0)\n            var cp1y = cy + 2 / 3 * (qp1y - cy);\n            var cp2x = p3x + 2 / 3 * (qp1x - p3x);  // CP2 = QP2 + 2/3 * (QP1-QP2)\n            var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n          } else {\n            var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n          }\n\n          // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n          bbox.addPoint(p3x, p3y);\n\n          var p0 = [cx, cy];\n          var p1 = [cp1x, cp1y];\n          var p2 = [cp2x, cp2y];\n          var p3 = [p3x, p3y];\n\n          for (var i = 0; i <= 1; i++) {\n            let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n            let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n            c = 3 * p1[i] - 3 * p0[i];\n\n            if (a === 0) {\n              if (b === 0) {\n                continue;\n              }\n\n              let t = -c / b;\n              if (0 < t && t < 1) {\n                if (i === 0) {\n                  bbox.addPoint(f(t), bbox.maxY);\n                } else if (i === 1) {\n                  bbox.addPoint(bbox.maxX, f(t));\n                }\n              }\n\n              continue;\n            }\n\n            let b2ac = Math.pow(b, 2) - 4 * c * a;\n            if (b2ac < 0) {\n              continue;\n            }\n\n            let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n            if (0 < t1 && t1 < 1) {\n              if (i === 0) {\n                bbox.addPoint(f(t1), bbox.maxY);\n              } else if (i === 1) {\n                bbox.addPoint(bbox.maxX, f(t1));\n              }\n            }\n\n            let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n            if (0 < t2 && t2 < 1) {\n              if (i === 0) {\n                bbox.addPoint(f(t2), bbox.maxY);\n              } else if (i === 1) {\n                bbox.addPoint(bbox.maxX, f(t2));\n              }\n            }\n          }\n\n          cx = p3x;\n          cy = p3y;\n          break;\n      }\n    }\n\n    return this._bbox = Object.freeze(bbox);\n  }\n\n  /**\n   * Applies a mapping function to each point in the path.\n   * @param {function} fn\n   * @return {Path}\n   */\n  mapPoints(fn) {\n    let path = new Path;\n\n    for (let c of this.commands) {\n      let args = [];\n      for (let i = 0; i < c.args.length; i += 2) {\n        let [x, y] = fn(c.args[i], c.args[i + 1]);\n        args.push(x, y);\n      }\n\n      path[c.command](...args);\n    }\n\n    return path;\n  }\n\n  /**\n   * Transforms the path by the given matrix.\n   */\n  transform(m0, m1, m2, m3, m4, m5) {\n    return this.mapPoints((x, y) => {\n      x = m0 * x + m2 * y + m4;\n      y = m1 * x + m3 * y + m5;\n      return [x, y];\n    });\n  }\n\n  /**\n   * Translates the path by the given offset.\n   */\n  translate(x, y) {\n    return this.transform(1, 0, 0, 1, x, y);\n  }\n\n  /**\n   * Rotates the path by the given angle (in radians).\n   */\n  rotate(angle) {\n    let cos = Math.cos(angle);\n    let sin = Math.sin(angle);\n    return this.transform(cos, sin, -sin, cos, 0, 0);\n  }\n\n  /**\n   * Scales the path.\n   */\n  scale(scaleX, scaleY = scaleX) {\n    return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n  }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n  Path.prototype[command] = function(...args) {\n    this._bbox = this._cbox = null;\n    this.commands.push({\n      command,\n      args\n    });\n\n    return this;\n  };\n}\n","export default [\n  '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n  'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n  'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n  'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n  'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n  'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n  'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n  'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n  'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n  'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n  'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n  'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n  'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n  'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n  'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n  'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n  'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n  'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n  'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n  'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n  'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n  'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n  'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n  'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n  'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport unicode from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n  constructor(id, codePoints, font) {\n    /**\n     * The glyph id in the font\n     * @type {number}\n     */\n    this.id = id;\n\n    /**\n     * An array of unicode code points that are represented by this glyph.\n     * There can be multiple code points in the case of ligatures and other glyphs\n     * that represent multiple visual characters.\n     * @type {number[]}\n     */\n    this.codePoints = codePoints;\n    this._font = font;\n\n    // TODO: get this info from GDEF if available\n    this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark);\n    this.isLigature = this.codePoints.length > 1;\n  }\n\n  _getPath() {\n    return new Path();\n  }\n\n  _getCBox() {\n    return this.path.cbox;\n  }\n\n  _getBBox() {\n    return this.path.bbox;\n  }\n\n  _getTableMetrics(table) {\n    if (this.id < table.metrics.length) {\n      return table.metrics.get(this.id);\n    }\n\n    let metric = table.metrics.get(table.metrics.length - 1);\n    let res = {\n      advance: metric ? metric.advance : 0,\n      bearing: table.bearings.get(this.id - table.metrics.length) || 0\n    };\n\n    return res;\n  }\n\n  _getMetrics(cbox) {\n    if (this._metrics) { return this._metrics; }\n\n    let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n    // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n    if (this._font.vmtx) {\n      var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n    } else {\n      let os2;\n      if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n      if ((os2 = this._font['OS/2']) && os2.version > 0) {\n        var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n        var topBearing = os2.typoAscender - cbox.maxY;\n\n      } else {\n        let { hhea } = this._font;\n        var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n        var topBearing = hhea.ascent - cbox.maxY;\n      }\n    }\n\n    if (this._font._variationProcessor && this._font.HVAR) {\n      advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n    }\n\n    return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n  }\n\n  /**\n   * The glyph’s control box.\n   * This is often the same as the bounding box, but is faster to compute.\n   * Because of the way bezier curves are defined, some of the control points\n   * can be outside of the bounding box. Where `bbox` takes this into account,\n   * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n   * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n   * for a more detailed description.\n   *\n   * @type {BBox}\n   */\n  @cache\n  get cbox() {\n    return this._getCBox();\n  }\n\n  /**\n   * The glyph’s bounding box, i.e. the rectangle that encloses the\n   * glyph outline as tightly as possible.\n   * @type {BBox}\n   */\n  @cache\n  get bbox() {\n    return this._getBBox();\n  }\n\n  /**\n   * A vector Path object representing the glyph outline.\n   * @type {Path}\n   */\n  @cache\n  get path() {\n    // Cache the path so we only decode it once\n    // Decoding is actually performed by subclasses\n    return this._getPath();\n  }\n\n  /**\n   * Returns a path scaled to the given font size.\n   * @param {number} size\n   * @return {Path}\n   */\n  getScaledPath(size) {\n    let scale = 1 / this._font.unitsPerEm * size;\n    return this.path.scale(scale);\n  }\n\n  /**\n   * The glyph's advance width.\n   * @type {number}\n   */\n  @cache\n  get advanceWidth() {\n    return this._getMetrics().advanceWidth;\n  }\n\n  /**\n   * The glyph's advance height.\n   * @type {number}\n   */\n  @cache\n  get advanceHeight() {\n    return this._getMetrics().advanceHeight;\n  }\n\n  get ligatureCaretPositions() {}\n\n  _getName() {\n    let { post } = this._font;\n    if (!post) {\n      return null;\n    }\n\n    switch (post.version) {\n      case 1:\n        return StandardNames[this.id];\n\n      case 2:\n        let id = post.glyphNameIndex[this.id];\n        if (id < StandardNames.length) {\n          return StandardNames[id];\n        }\n\n        return post.names[id - StandardNames.length];\n\n      case 2.5:\n        return StandardNames[this.id + post.offsets[this.id]];\n\n      case 4:\n        return String.fromCharCode(post.map[this.id]);\n    }\n  }\n\n  /**\n   * The glyph's name\n   * @type {string}\n   */\n  @cache\n  get name() {\n    return this._getName();\n  }\n\n  /**\n   * Renders the glyph to the given graphics context, at the specified font size.\n   * @param {CanvasRenderingContext2d} ctx\n   * @param {number} size\n   */\n  render(ctx, size) {\n    ctx.save();\n\n    let scale = 1 / this._font.head.unitsPerEm * size;\n    ctx.scale(scale, scale);\n\n    let fn = this.path.toFunction();\n    fn(ctx);\n    ctx.fill();\n\n    ctx.restore();\n  }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n  numberOfContours: r.int16, // if negative, this is a composite glyph\n  xMin:             r.int16,\n  yMin:             r.int16,\n  xMax:             r.int16,\n  yMax:             r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE        = 1 << 0;\nconst X_SHORT_VECTOR  = 1 << 1;\nconst Y_SHORT_VECTOR  = 1 << 2;\nconst REPEAT          = 1 << 3;\nconst SAME_X          = 1 << 4;\nconst SAME_Y          = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS     = 1 << 0;\nconst ARGS_ARE_XY_VALUES        = 1 << 1;\nconst ROUND_XY_TO_GRID          = 1 << 2;\nconst WE_HAVE_A_SCALE           = 1 << 3;\nconst MORE_COMPONENTS           = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE  = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO      = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS      = 1 << 8;\nconst USE_MY_METRICS            = 1 << 9;\nconst OVERLAP_COMPOUND          = 1 << 10;\nconst SCALED_COMPONENT_OFFSET   = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n  constructor(onCurve, endContour, x = 0, y = 0) {\n    this.onCurve = onCurve;\n    this.endContour = endContour;\n    this.x = x;\n    this.y = y;\n  }\n\n  copy() {\n    return new Point(this.onCurve, this.endContour, this.x, this.y);\n  }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n  constructor(glyphID, dx, dy) {\n    this.glyphID = glyphID;\n    this.dx = dx;\n    this.dy = dy;\n    this.pos = 0;\n    this.scaleX = this.scaleY = 1;\n    this.scale01 = this.scale10 = 0;\n  }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n  // Parses just the glyph header and returns the bounding box\n  _getCBox(internal) {\n    // We need to decode the glyph if variation processing is requested,\n    // so it's easier just to recompute the path's cbox after decoding.\n    if (this._font._variationProcessor && !internal) {\n      return this.path.cbox;\n    }\n\n    let stream = this._font._getTableStream('glyf');\n    stream.pos += this._font.loca.offsets[this.id];\n    let glyph = GlyfHeader.decode(stream);\n\n    let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n    return Object.freeze(cbox);\n  }\n\n  // Parses a single glyph coordinate\n  _parseGlyphCoord(stream, prev, short, same) {\n    if (short) {\n      var val = stream.readUInt8();\n      if (!same) {\n        val = -val;\n      }\n\n      val += prev;\n    } else {\n      if (same) {\n        var val = prev;\n      } else {\n        var val = prev + stream.readInt16BE();\n      }\n    }\n\n    return val;\n  }\n\n  // Decodes the glyph data into points for simple glyphs,\n  // or components for composite glyphs\n  _decode() {\n    let glyfPos = this._font.loca.offsets[this.id];\n    let nextPos = this._font.loca.offsets[this.id + 1];\n\n    // Nothing to do if there is no data for this glyph\n    if (glyfPos === nextPos) { return null; }\n\n    let stream = this._font._getTableStream('glyf');\n    stream.pos += glyfPos;\n    let startPos = stream.pos;\n\n    let glyph = GlyfHeader.decode(stream);\n\n    if (glyph.numberOfContours > 0) {\n      this._decodeSimple(glyph, stream);\n\n    } else if (glyph.numberOfContours < 0) {\n      this._decodeComposite(glyph, stream, startPos);\n    }\n\n    return glyph;\n  }\n\n  _decodeSimple(glyph, stream) {\n    // this is a simple glyph\n    glyph.points = [];\n\n    let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n    glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n    let flags = [];\n    let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n    while (flags.length < numCoords) {\n      var flag = stream.readUInt8();\n      flags.push(flag);\n\n      // check for repeat flag\n      if (flag & REPEAT) {\n        let count = stream.readUInt8();\n        for (let j = 0; j < count; j++) {\n          flags.push(flag);\n        }\n      }\n    }\n\n    for (var i = 0; i < flags.length; i++) {\n      var flag = flags[i];\n      let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n      glyph.points.push(point);\n    }\n\n    let px = 0;\n    for (var i = 0; i < flags.length; i++) {\n      var flag = flags[i];\n      glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n    }\n\n    let py = 0;\n    for (var i = 0; i < flags.length; i++) {\n      var flag = flags[i];\n      glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n    }\n\n    if (this._font._variationProcessor) {\n      let points = glyph.points.slice();\n      points.push(...this._getPhantomPoints(glyph));\n\n      this._font._variationProcessor.transformPoints(this.id, points);\n      glyph.phantomPoints = points.slice(-4);\n    }\n\n    return;\n  }\n\n  _decodeComposite(glyph, stream, offset = 0) {\n    // this is a composite glyph\n    glyph.components = [];\n    let haveInstructions = false;\n    let flags = MORE_COMPONENTS;\n\n    while (flags & MORE_COMPONENTS) {\n      flags = stream.readUInt16BE();\n      let gPos = stream.pos - offset;\n      let glyphID = stream.readUInt16BE();\n      if (!haveInstructions) {\n        haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n      }\n\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        var dx = stream.readInt16BE();\n        var dy = stream.readInt16BE();\n      } else {\n        var dx = stream.readInt8();\n        var dy = stream.readInt8();\n      }\n\n      var component = new Component(glyphID, dx, dy);\n      component.pos = gPos;\n\n      if (flags & WE_HAVE_A_SCALE) {\n        // fixed number with 14 bits of fraction\n        component.scaleX =\n        component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n        component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n      } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        component.scaleX  = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n        component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n        component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n        component.scaleY  = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n      }\n\n      glyph.components.push(component);\n    }\n\n    if (this._font._variationProcessor) {\n      let points = [];\n      for (let j = 0; j < glyph.components.length; j++) {\n        var component = glyph.components[j];\n        points.push(new Point(true, true, component.dx, component.dy));\n      }\n\n      points.push(...this._getPhantomPoints(glyph));\n\n      this._font._variationProcessor.transformPoints(this.id, points);\n      glyph.phantomPoints = points.splice(-4, 4);\n\n      for (let i = 0; i < points.length; i++) {\n        let point = points[i];\n        glyph.components[i].dx = point.x;\n        glyph.components[i].dy = point.y;\n      }\n    }\n\n    return haveInstructions;\n  }\n\n  _getPhantomPoints(glyph) {\n    let cbox = this._getCBox(true);\n    if (this._metrics == null) {\n      this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n    }\n\n    let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n    return [\n      new Point(false, true, glyph.xMin - leftBearing, 0),\n      new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n      new Point(false, true, 0, glyph.yMax + topBearing),\n      new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n    ];\n  }\n\n  // Decodes font data, resolves composite glyphs, and returns an array of contours\n  _getContours() {\n    let glyph = this._decode();\n    if (!glyph) {\n      return [];\n    }\n\n    let points = [];\n\n    if (glyph.numberOfContours < 0) {\n      // resolve composite glyphs\n      for (let component of glyph.components) {\n        let contours = this._font.getGlyph(component.glyphID)._getContours();\n        for (let i = 0; i < contours.length; i++) {\n          let contour = contours[i];\n          for (let j = 0; j < contour.length; j++) {\n            let point = contour[j];\n            let x = point.x * component.scaleX + point.y * component.scale01 + component.dx;\n            let y = point.y * component.scaleY + point.x * component.scale10 + component.dy;\n            points.push(new Point(point.onCurve, point.endContour, x, y));\n          }\n        }\n      }\n    } else {\n      points = glyph.points || [];\n    }\n\n    // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n    if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n      this._metrics.advanceWidth  = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n      this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n      this._metrics.leftBearing   = glyph.xMin - glyph.phantomPoints[0].x;\n      this._metrics.topBearing    = glyph.phantomPoints[2].y - glyph.yMax;\n    }\n\n    let contours = [];\n    let cur = [];\n    for (let k = 0; k < points.length; k++) {\n      var point = points[k];\n      cur.push(point);\n      if (point.endContour) {\n        contours.push(cur);\n        cur = [];\n      }\n    }\n\n    return contours;\n  }\n\n  _getMetrics() {\n    if (this._metrics) {\n      return this._metrics;\n    }\n\n    let cbox = this._getCBox(true);\n    super._getMetrics(cbox);\n\n    if (this._font._variationProcessor && !this._font.HVAR) {\n      // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n      this.path;\n    }\n\n    return this._metrics;\n  }\n\n  // Converts contours to a Path object that can be rendered\n  _getPath() {\n    let contours = this._getContours();\n    let path = new Path;\n\n    for (let i = 0; i < contours.length; i++) {\n      let contour = contours[i];\n      let firstPt = contour[0];\n      let lastPt = contour[contour.length - 1];\n      let start = 0;\n\n      if (firstPt.onCurve) {\n        // The first point will be consumed by the moveTo command, so skip in the loop\n        var curvePt = null;\n        start = 1;\n      } else {\n        if (lastPt.onCurve) {\n          // Start at the last point if the first point is off curve and the last point is on curve\n          firstPt = lastPt;\n        } else {\n          // Start at the middle if both the first and last points are off curve\n          firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n        }\n\n        var curvePt = firstPt;\n      }\n\n      path.moveTo(firstPt.x, firstPt.y);\n\n      for (let j = start; j < contour.length; j++) {\n        let pt = contour[j];\n        let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n        if (prevPt.onCurve && pt.onCurve) {\n          path.lineTo(pt.x, pt.y);\n\n        } else if (prevPt.onCurve && !pt.onCurve) {\n          var curvePt = pt;\n\n        } else if (!prevPt.onCurve && !pt.onCurve) {\n          let midX = (prevPt.x + pt.x) / 2;\n          let midY = (prevPt.y + pt.y) / 2;\n          path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n          var curvePt = pt;\n\n        } else if (!prevPt.onCurve && pt.onCurve) {\n          path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n          var curvePt = null;\n\n        } else {\n          throw new Error(\"Unknown TTF path state\");\n        }\n      }\n\n      // Connect the first and last points\n      if (curvePt) {\n        path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n      }\n\n      path.closePath();\n    }\n\n    return path;\n  }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n  _getName() {\n    if (this._font.CFF2) {\n      return super._getName();\n    }\n\n    return this._font['CFF '].getGlyphName(this.id);\n  }\n\n  bias(s) {\n    if (s.length < 1240) {\n      return 107;\n    } else if (s.length < 33900) {\n      return 1131;\n    } else {\n      return 32768;\n    }\n  }\n\n  _getPath() {\n    let cff = this._font.CFF2 || this._font['CFF '];\n    let { stream } = cff;\n    let str = cff.topDict.CharStrings[this.id];\n    let end = str.offset + str.length;\n    stream.pos = str.offset;\n\n    let path = new Path;\n    let stack = [];\n    let trans = [];\n\n    let width = null;\n    let nStems = 0;\n    let x = 0, y = 0;\n    let usedGsubrs;\n    let usedSubrs;\n    let open = false;\n\n    this._usedGsubrs = usedGsubrs = {};\n    this._usedSubrs = usedSubrs = {};\n\n    let gsubrs = cff.globalSubrIndex || [];\n    let gsubrsBias = this.bias(gsubrs);\n\n    let privateDict = cff.privateDictForGlyph(this.id) || {};\n    let subrs = privateDict.Subrs || [];\n    let subrsBias = this.bias(subrs);\n\n    let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n    let vsindex = privateDict.vsindex;\n    let variationProcessor = this._font._variationProcessor;\n\n    function checkWidth() {\n      if (width == null) {\n        width = stack.shift() + privateDict.nominalWidthX;\n      }\n    }\n\n    function parseStems() {\n      if (stack.length % 2 !== 0) {\n        checkWidth();\n      }\n\n      nStems += stack.length >> 1;\n      return stack.length = 0;\n    }\n\n    function moveTo(x, y) {\n      if (open) {\n        path.closePath();\n      }\n\n      path.moveTo(x, y);\n      open = true;\n    }\n\n    let parse = function() {\n      while (stream.pos < end) {\n        let op = stream.readUInt8();\n        if (op < 32) {\n          switch (op) {\n            case 1:  // hstem\n            case 3:  // vstem\n            case 18: // hstemhm\n            case 23: // vstemhm\n              parseStems();\n              break;\n\n            case 4: // vmoveto\n              if (stack.length > 1) {\n                checkWidth();\n              }\n\n              y += stack.shift();\n              moveTo(x, y);\n              break;\n\n            case 5: // rlineto\n              while (stack.length >= 2) {\n                x += stack.shift();\n                y += stack.shift();\n                path.lineTo(x, y);\n              }\n              break;\n\n            case 6: // hlineto\n            case 7: // vlineto\n              let phase = op === 6;\n              while (stack.length >= 1) {\n                if (phase) {\n                  x += stack.shift();\n                } else {\n                  y += stack.shift();\n                }\n\n                path.lineTo(x, y);\n                phase = !phase;\n              }\n              break;\n\n            case 8: // rrcurveto\n              while (stack.length > 0) {\n                var c1x = x + stack.shift();\n                var c1y = y + stack.shift();\n                var c2x = c1x + stack.shift();\n                var c2y = c1y + stack.shift();\n                x = c2x + stack.shift();\n                y = c2y + stack.shift();\n                path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n              }\n              break;\n\n            case 10: // callsubr\n              let index = stack.pop() + subrsBias;\n              let subr = subrs[index];\n              if (subr) {\n                usedSubrs[index] = true;\n                var p = stream.pos;\n                var e = end;\n                stream.pos = subr.offset;\n                end = subr.offset + subr.length;\n                parse();\n                stream.pos = p;\n                end = e;\n              }\n              break;\n\n            case 11: // return\n              if (cff.version >= 2) {\n                break;\n              }\n              return;\n\n            case 14: // endchar\n              if (cff.version >= 2) {\n                break;\n              }\n\n              if (stack.length > 0) {\n                checkWidth();\n              }\n\n              if (open) {\n                path.closePath();\n                open = false;\n              }\n              break;\n\n            case 15: { // vsindex\n              if (cff.version < 2) {\n                throw new Error('vsindex operator not supported in CFF v1');\n              }\n\n              vsindex = stack.pop();\n              break;\n            }\n\n            case 16: { // blend\n              if (cff.version < 2) {\n                throw new Error('blend operator not supported in CFF v1');\n              }\n\n              if (!variationProcessor) {\n                throw new Error('blend operator in non-variation font');\n              }\n\n              let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n              let numBlends = stack.pop();\n              let numOperands = numBlends * blendVector.length;\n              let delta = stack.length - numOperands;\n              let base = delta - numBlends;\n\n              for (let i = 0; i < numBlends; i++) {\n                let sum = stack[base + i];\n                for (let j = 0; j < blendVector.length; j++) {\n                  sum += blendVector[j] * stack[delta++];\n                }\n\n                stack[base + i] = sum;\n              }\n\n              while (numOperands--) {\n                stack.pop();\n              }\n\n              break;\n            }\n\n            case 19: // hintmask\n            case 20: // cntrmask\n              parseStems();\n              stream.pos += (nStems + 7) >> 3;\n              break;\n\n            case 21: // rmoveto\n              if (stack.length > 2) {\n                checkWidth();\n              }\n\n              x += stack.shift();\n              y += stack.shift();\n              moveTo(x, y);\n              break;\n\n            case 22: // hmoveto\n              if (stack.length > 1) {\n                checkWidth();\n              }\n\n              x += stack.shift();\n              moveTo(x, y);\n              break;\n\n            case 24: // rcurveline\n              while (stack.length >= 8) {\n                var c1x = x + stack.shift();\n                var c1y = y + stack.shift();\n                var c2x = c1x + stack.shift();\n                var c2y = c1y + stack.shift();\n                x = c2x + stack.shift();\n                y = c2y + stack.shift();\n                path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n              }\n\n              x += stack.shift();\n              y += stack.shift();\n              path.lineTo(x, y);\n              break;\n\n            case 25: // rlinecurve\n              while (stack.length >= 8) {\n                x += stack.shift();\n                y += stack.shift();\n                path.lineTo(x, y);\n              }\n\n              var c1x = x + stack.shift();\n              var c1y = y + stack.shift();\n              var c2x = c1x + stack.shift();\n              var c2y = c1y + stack.shift();\n              x = c2x + stack.shift();\n              y = c2y + stack.shift();\n              path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n              break;\n\n            case 26: // vvcurveto\n              if (stack.length % 2) {\n                x += stack.shift();\n              }\n\n              while (stack.length >= 4) {\n                c1x = x;\n                c1y = y + stack.shift();\n                c2x = c1x + stack.shift();\n                c2y = c1y + stack.shift();\n                x = c2x;\n                y = c2y + stack.shift();\n                path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n              }\n              break;\n\n            case 27: // hhcurveto\n              if (stack.length % 2) {\n                y += stack.shift();\n              }\n\n              while (stack.length >= 4) {\n                c1x = x + stack.shift();\n                c1y = y;\n                c2x = c1x + stack.shift();\n                c2y = c1y + stack.shift();\n                x = c2x + stack.shift();\n                y = c2y;\n                path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n              }\n              break;\n\n            case 28: // shortint\n              stack.push(stream.readInt16BE());\n              break;\n\n            case 29: // callgsubr\n              index = stack.pop() + gsubrsBias;\n              subr = gsubrs[index];\n              if (subr) {\n                usedGsubrs[index] = true;\n                var p = stream.pos;\n                var e = end;\n                stream.pos = subr.offset;\n                end = subr.offset + subr.length;\n                parse();\n                stream.pos = p;\n                end = e;\n              }\n              break;\n\n            case 30: // vhcurveto\n            case 31: // hvcurveto\n              phase = op === 31;\n              while (stack.length >= 4) {\n                if (phase) {\n                  c1x = x + stack.shift();\n                  c1y = y;\n                  c2x = c1x + stack.shift();\n                  c2y = c1y + stack.shift();\n                  y = c2y + stack.shift();\n                  x = c2x + (stack.length === 1 ? stack.shift() : 0);\n                } else {\n                  c1x = x;\n                  c1y = y + stack.shift();\n                  c2x = c1x + stack.shift();\n                  c2y = c1y + stack.shift();\n                  x = c2x + stack.shift();\n                  y = c2y + (stack.length === 1 ? stack.shift() : 0);\n                }\n\n                path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n                phase = !phase;\n              }\n              break;\n\n            case 12:\n              op = stream.readUInt8();\n              switch (op) {\n                case 3: // and\n                  let a = stack.pop();\n                  let b = stack.pop();\n                  stack.push(a && b ? 1 : 0);\n                  break;\n\n                case 4: // or\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a || b ? 1 : 0);\n                  break;\n\n                case 5: // not\n                  a = stack.pop();\n                  stack.push(a ? 0 : 1);\n                  break;\n\n                case 9: // abs\n                  a = stack.pop();\n                  stack.push(Math.abs(a));\n                  break;\n\n                case 10: // add\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a + b);\n                  break;\n\n                case 11: // sub\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a - b);\n                  break;\n\n                case 12: // div\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a / b);\n                  break;\n\n                case 14: // neg\n                  a = stack.pop();\n                  stack.push(-a);\n                  break;\n\n                case 15: // eq\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a === b ? 1 : 0);\n                  break;\n\n                case 18: // drop\n                  stack.pop();\n                  break;\n\n                case 20: // put\n                  let val = stack.pop();\n                  let idx = stack.pop();\n                  trans[idx] = val;\n                  break;\n\n                case 21: // get\n                  idx = stack.pop();\n                  stack.push(trans[idx] || 0);\n                  break;\n\n                case 22: // ifelse\n                  let s1 = stack.pop();\n                  let s2 = stack.pop();\n                  let v1 = stack.pop();\n                  let v2 = stack.pop();\n                  stack.push(v1 <= v2 ? s1 : s2);\n                  break;\n\n                case 23: // random\n                  stack.push(Math.random());\n                  break;\n\n                case 24: // mul\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(a * b);\n                  break;\n\n                case 26: // sqrt\n                  a = stack.pop();\n                  stack.push(Math.sqrt(a));\n                  break;\n\n                case 27: // dup\n                  a = stack.pop();\n                  stack.push(a, a);\n                  break;\n\n                case 28: // exch\n                  a = stack.pop();\n                  b = stack.pop();\n                  stack.push(b, a);\n                  break;\n\n                case 29: // index\n                  idx = stack.pop();\n                  if (idx < 0) {\n                    idx = 0;\n                  } else if (idx > stack.length - 1) {\n                    idx = stack.length - 1;\n                  }\n\n                  stack.push(stack[idx]);\n                  break;\n\n                case 30: // roll\n                  let n = stack.pop();\n                  let j = stack.pop();\n\n                  if (j >= 0) {\n                    while (j > 0) {\n                      var t = stack[n - 1];\n                      for (let i = n - 2; i >= 0; i--) {\n                        stack[i + 1] = stack[i];\n                      }\n\n                      stack[0] = t;\n                      j--;\n                    }\n                  } else {\n                    while (j < 0) {\n                      var t = stack[0];\n                      for (let i = 0; i <= n; i++) {\n                        stack[i] = stack[i + 1];\n                      }\n\n                      stack[n - 1] = t;\n                      j++;\n                    }\n                  }\n                  break;\n\n                case 34: // hflex\n                  c1x = x + stack.shift();\n                  c1y = y;\n                  c2x = c1x + stack.shift();\n                  c2y = c1y + stack.shift();\n                  let c3x = c2x + stack.shift();\n                  let c3y = c2y;\n                  let c4x = c3x + stack.shift();\n                  let c4y = c3y;\n                  let c5x = c4x + stack.shift();\n                  let c5y = c4y;\n                  let c6x = c5x + stack.shift();\n                  let c6y = c5y;\n                  x = c6x;\n                  y = c6y;\n\n                  path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n                  path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n                  break;\n\n                case 35: // flex\n                  let pts = [];\n\n                  for (let i = 0; i <= 5; i++) {\n                    x += stack.shift();\n                    y += stack.shift();\n                    pts.push(x, y);\n                  }\n\n                  path.bezierCurveTo(...pts.slice(0, 6));\n                  path.bezierCurveTo(...pts.slice(6));\n                  stack.shift(); // fd\n                  break;\n\n                case 36: // hflex1\n                  c1x = x + stack.shift();\n                  c1y = y + stack.shift();\n                  c2x = c1x + stack.shift();\n                  c2y = c1y + stack.shift();\n                  c3x = c2x + stack.shift();\n                  c3y = c2y;\n                  c4x = c3x + stack.shift();\n                  c4y = c3y;\n                  c5x = c4x + stack.shift();\n                  c5y = c4y + stack.shift();\n                  c6x = c5x + stack.shift();\n                  c6y = c5y;\n                  x = c6x;\n                  y = c6y;\n\n                  path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n                  path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n                  break;\n\n                case 37: // flex1\n                  let startx = x;\n                  let starty = y;\n\n                  pts = [];\n                  for (let i = 0; i <= 4; i++) {\n                    x += stack.shift();\n                    y += stack.shift();\n                    pts.push(x, y);\n                  }\n\n                  if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n                    x += stack.shift();\n                    y = starty;\n                  } else {\n                    x = startx;\n                    y += stack.shift();\n                  }\n\n                  pts.push(x, y);\n                  path.bezierCurveTo(...pts.slice(0, 6));\n                  path.bezierCurveTo(...pts.slice(6));\n                  break;\n\n                default:\n                  throw new Error(`Unknown op: 12 ${op}`);\n              }\n              break;\n\n            default:\n              throw new Error(`Unknown op: ${op}`);\n          }\n\n        } else if (op < 247) {\n          stack.push(op - 139);\n        } else if (op < 251) {\n          var b1 = stream.readUInt8();\n          stack.push((op - 247) * 256 + b1 + 108);\n        } else if (op < 255) {\n          var b1 = stream.readUInt8();\n          stack.push(-(op - 251) * 256 - b1 - 108);\n        } else {\n          stack.push(stream.readInt32BE() / 65536);\n        }\n      }\n    };\n\n    parse();\n\n    if (open) {\n      path.closePath();\n    }\n\n    return path;\n  }\n}\n","import TTFGlyph from './TTFGlyph';\nimport r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n  originX: r.uint16,\n  originY: r.uint16,\n  type: new r.String(4),\n  data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n  /**\n   * Returns an object representing a glyph image at the given point size.\n   * The object has a data property with a Buffer containing the actual image data,\n   * along with the image type, and origin.\n   *\n   * @param {number} size\n   * @return {object}\n   */\n  getImageForSize(size) {\n    for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n      var table = this._font.sbix.imageTables[i];\n      if (table.ppem >= size) { break; }\n    }\n\n    let offsets = table.imageOffsets;\n    let start = offsets[this.id];\n    let end = offsets[this.id + 1];\n\n    if (start === end) {\n      return null;\n    }\n\n    this._font.stream.pos = start;\n    return SBIXImage.decode(this._font.stream, {buflen: end - start});\n  }\n\n  render(ctx, size) {\n    let img = this.getImageForSize(size);\n    if (img != null) {\n      let scale = size / this._font.unitsPerEm;\n      ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n    }\n\n    if (this._font.sbix.flags.renderOutlines) {\n      super.render(ctx, size);\n    }\n  }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n  constructor(glyph, color) {\n    this.glyph = glyph;\n    this.color = color;\n  }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which  is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n  _getBBox() {\n    let bbox = new BBox;\n    for (let i = 0; i < this.layers.length; i++) {\n      let layer = this.layers[i];\n      let b = layer.glyph.bbox;\n      bbox.addPoint(b.minX, b.minY);\n      bbox.addPoint(b.maxX, b.maxY);\n    }\n\n    return bbox;\n  }\n\n  /**\n   * Returns an array of objects containing the glyph and color for\n   * each layer in the composite color glyph.\n   * @type {object[]}\n   */\n  get layers() {\n    let cpal = this._font.CPAL;\n    let colr = this._font.COLR;\n    let low = 0;\n    let high = colr.baseGlyphRecord.length - 1;\n\n    while (low <= high) {\n      let mid = (low + high) >> 1;\n      var rec = colr.baseGlyphRecord[mid];\n\n      if (this.id < rec.gid) {\n        high = mid - 1;\n      } else if (this.id > rec.gid) {\n        low = mid + 1;\n      } else {\n        var baseLayer = rec;\n        break;\n      }\n    }\n\n    // if base glyph not found in COLR table,\n    // default to normal glyph from glyf or CFF\n    if (baseLayer == null) {\n      var g = this._font._getBaseGlyph(this.id);\n      var color = {\n        red: 0,\n        green: 0,\n        blue: 0,\n        alpha: 255\n      };\n\n      return [new COLRLayer(g, color)];\n    }\n\n    // otherwise, return an array of all the layers\n    let layers = [];\n    for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n      var rec = colr.layerRecords[i];\n      var color = cpal.colorRecords[rec.paletteIndex];\n      var g = this._font._getBaseGlyph(rec.gid);\n      layers.push(new COLRLayer(g, color));\n    }\n\n    return layers;\n  }\n\n  render(ctx, size) {\n    for (let {glyph, color} of this.layers) {\n      ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n      glyph.render(ctx, size);\n    }\n\n    return;\n  }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK           = 0x0fff;\nconst EMBEDDED_TUPLE_COORD       = 0x8000;\nconst INTERMEDIATE_TUPLE         = 0x4000;\nconst PRIVATE_POINT_NUMBERS      = 0x2000;\nconst TUPLE_INDEX_MASK           = 0x0fff;\nconst POINTS_ARE_WORDS           = 0x80;\nconst POINT_RUN_COUNT_MASK       = 0x7f;\nconst DELTAS_ARE_ZERO            = 0x80;\nconst DELTAS_ARE_WORDS           = 0x40;\nconst DELTA_RUN_COUNT_MASK       = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n  constructor(font, coords) {\n    this.font = font;\n    this.normalizedCoords = this.normalizeCoords(coords);\n    this.blendVectors = new Map;\n  }\n\n  normalizeCoords(coords) {\n    // the default mapping is linear along each axis, in two segments:\n    // from the minValue to defaultValue, and from defaultValue to maxValue.\n    let normalized = [];\n    for (var i = 0; i < this.font.fvar.axis.length; i++) {\n      let axis = this.font.fvar.axis[i];\n      if (coords[i] < axis.defaultValue) {\n        normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n      } else {\n        normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n      }\n    }\n\n    // if there is an avar table, the normalized value is calculated\n    // by interpolating between the two nearest mapped values.\n    if (this.font.avar) {\n      for (var i = 0; i < this.font.avar.segment.length; i++) {\n        let segment = this.font.avar.segment[i];\n        for (let j = 0; j < segment.correspondence.length; j++) {\n          let pair = segment.correspondence[j];\n          if (j >= 1 && normalized[i] < pair.fromCoord) {\n            let prev = segment.correspondence[j - 1];\n            normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n              (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n              prev.toCoord;\n\n            break;\n          }\n        }\n      }\n    }\n\n    return normalized;\n  }\n\n  transformPoints(gid, glyphPoints) {\n    if (!this.font.fvar || !this.font.gvar) { return; }\n\n    let { gvar } = this.font;\n    if (gid >= gvar.glyphCount) { return; }\n\n    let offset = gvar.offsets[gid];\n    if (offset === gvar.offsets[gid + 1]) { return; }\n\n    // Read the gvar data for this glyph\n    let { stream } = this.font;\n    stream.pos = offset;\n    if (stream.pos >= stream.length) {\n      return;\n    }\n\n    let tupleCount = stream.readUInt16BE();\n    let offsetToData = offset + stream.readUInt16BE();\n\n    if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n      var here = stream.pos;\n      stream.pos = offsetToData;\n      var sharedPoints = this.decodePoints();\n      offsetToData = stream.pos;\n      stream.pos = here;\n    }\n\n    let origPoints = glyphPoints.map(pt => pt.copy());\n\n    tupleCount &= TUPLE_COUNT_MASK;\n    for (let i = 0; i < tupleCount; i++) {\n      let tupleDataSize = stream.readUInt16BE();\n      let tupleIndex = stream.readUInt16BE();\n\n      if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n        var tupleCoords = [];\n        for (let a = 0; a < gvar.axisCount; a++) {\n          tupleCoords.push(stream.readInt16BE() / 16384);\n        }\n\n      } else {\n        if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n          throw new Error('Invalid gvar table');\n        }\n\n        var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n      }\n\n      if (tupleIndex & INTERMEDIATE_TUPLE) {\n        var startCoords = [];\n        for (let a = 0; a < gvar.axisCount; a++) {\n          startCoords.push(stream.readInt16BE() / 16384);\n        }\n\n        var endCoords = [];\n        for (let a = 0; a < gvar.axisCount; a++) {\n          endCoords.push(stream.readInt16BE() / 16384);\n        }\n      }\n\n      // Get the factor at which to apply this tuple\n      let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n      if (factor === 0) {\n        offsetToData += tupleDataSize;\n        continue;\n      }\n\n      var here = stream.pos;\n      stream.pos = offsetToData;\n\n      if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n        var points = this.decodePoints();\n      } else {\n        var points = sharedPoints;\n      }\n\n      // points.length = 0 means there are deltas for all points\n      let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n      let xDeltas = this.decodeDeltas(nPoints);\n      let yDeltas = this.decodeDeltas(nPoints);\n\n      if (points.length === 0) { // all points\n        for (let i = 0; i < glyphPoints.length; i++) {\n          var point = glyphPoints[i];\n          point.x += Math.round(xDeltas[i] * factor);\n          point.y += Math.round(yDeltas[i] * factor);\n        }\n      } else {\n        let outPoints = origPoints.map(pt => pt.copy());\n        let hasDelta = glyphPoints.map(() => false);\n\n        for (let i = 0; i < points.length; i++) {\n          let idx = points[i];\n          if (idx < glyphPoints.length) {\n            let point = outPoints[idx];\n            hasDelta[idx] = true;\n\n            point.x += Math.round(xDeltas[i] * factor);\n            point.y += Math.round(yDeltas[i] * factor);\n          }\n        }\n\n        this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n        for (let i = 0; i < glyphPoints.length; i++) {\n          let deltaX = outPoints[i].x - origPoints[i].x;\n          let deltaY = outPoints[i].y - origPoints[i].y;\n\n          glyphPoints[i].x += deltaX;\n          glyphPoints[i].y += deltaY;\n        }\n      }\n\n      offsetToData += tupleDataSize;\n      stream.pos = here;\n    }\n  }\n\n  decodePoints() {\n    let stream = this.font.stream;\n    let count = stream.readUInt8();\n\n    if (count & POINTS_ARE_WORDS) {\n      count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n    }\n\n    let points = new Uint16Array(count);\n    let i = 0;\n    let point = 0;\n    while (i < count) {\n      let run = stream.readUInt8();\n      let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n      let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n      for (let j = 0; j < runCount && i < count; j++) {\n        point += fn.call(stream);\n        points[i++] = point;\n      }\n    }\n\n    return points;\n  }\n\n  decodeDeltas(count) {\n    let stream = this.font.stream;\n    let i = 0;\n    let deltas = new Int16Array(count);\n\n    while (i < count) {\n      let run = stream.readUInt8();\n      let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n      if (run & DELTAS_ARE_ZERO) {\n        i += runCount;\n\n      } else {\n        let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n        for (let j = 0; j < runCount && i < count; j++) {\n          deltas[i++] = fn.call(stream);\n        }\n      }\n    }\n\n    return deltas;\n  }\n\n  tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n    let normalized = this.normalizedCoords;\n    let { gvar } = this.font;\n    let factor = 1;\n\n    for (let i = 0; i < gvar.axisCount; i++) {\n      if (tupleCoords[i] === 0) {\n        continue;\n      }\n\n      if (normalized[i] === 0) {\n        return 0;\n      }\n\n      if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n        if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n            (normalized[i] > Math.max(0, tupleCoords[i]))) {\n          return 0;\n        }\n\n        factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n      } else {\n        if ((normalized[i] < startCoords[i]) ||\n            (normalized[i] > endCoords[i])) {\n          return 0;\n\n        } else if (normalized[i] < tupleCoords[i]) {\n          factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n        } else {\n          factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n        }\n      }\n    }\n\n    return factor;\n  }\n\n  // Interpolates points without delta values.\n  // Needed for the Ø and Q glyphs in Skia.\n  // Algorithm from Freetype.\n  interpolateMissingDeltas(points, inPoints, hasDelta) {\n    if (points.length === 0) {\n      return;\n    }\n\n    let point = 0;\n    while (point < points.length) {\n      let firstPoint = point;\n\n      // find the end point of the contour\n      let endPoint = point;\n      let pt = points[endPoint];\n      while (!pt.endContour) {\n        pt = points[++endPoint];\n      }\n\n      // find the first point that has a delta\n      while (point <= endPoint && !hasDelta[point]) {\n        point++;\n      }\n\n      if (point > endPoint) {\n        continue;\n      }\n\n      let firstDelta = point;\n      let curDelta = point;\n      point++;\n\n      while (point <= endPoint) {\n        // find the next point with a delta, and interpolate intermediate points\n        if (hasDelta[point]) {\n          this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n          curDelta = point;\n        }\n\n        point++;\n      }\n\n      // shift contour if we only have a single delta\n      if (curDelta === firstDelta) {\n        this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n      } else {\n        // otherwise, handle the remaining points at the end and beginning of the contour\n        this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n        if (firstDelta > 0) {\n          this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n        }\n      }\n\n      point = endPoint + 1;\n    }\n  }\n\n  deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n    if (p1 > p2) {\n      return;\n    }\n\n    let iterable = ['x', 'y'];\n    for (let i = 0; i < iterable.length; i++) {\n      let k = iterable[i];\n      if (inPoints[ref1][k] > inPoints[ref2][k]) {\n        var p = ref1;\n        ref1 = ref2;\n        ref2 = p;\n      }\n\n      let in1 = inPoints[ref1][k];\n      let in2 = inPoints[ref2][k];\n      let out1 = outPoints[ref1][k];\n      let out2 = outPoints[ref2][k];\n\n      // If the reference points have the same coordinate but different\n      // delta, inferred delta is zero.  Otherwise interpolate.\n      if (in1 !== in2 || out1 === out2) {\n        let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n        for (let p = p1; p <= p2; p++) {\n          let out = inPoints[p][k];\n\n          if (out <= in1) {\n            out += out1 - in1;\n          } else if (out >= in2) {\n            out += out2 - in2;\n          } else {\n            out = out1 + (out - in1) * scale;\n          }\n\n          outPoints[p][k] = out;\n        }\n      }\n    }\n  }\n\n  deltaShift(p1, p2, ref, inPoints, outPoints) {\n    let deltaX = outPoints[ref].x - inPoints[ref].x;\n    let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n    if (deltaX === 0 && deltaY === 0) {\n      return;\n    }\n\n    for (let p = p1; p <= p2; p++) {\n      if (p !== ref) {\n        outPoints[p].x += deltaX;\n        outPoints[p].y += deltaY;\n      }\n    }\n  }\n\n  getAdvanceAdjustment(gid, table) {\n    let outerIndex, innerIndex;\n\n    if (table.advanceWidthMapping) {\n      let idx = gid;\n      if (idx >= table.advanceWidthMapping.mapCount) {\n        idx = table.advanceWidthMapping.mapCount - 1;\n      }\n\n      let entryFormat = table.advanceWidthMapping.entryFormat;\n      ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n    } else {\n      outerIndex = 0;\n      innerIndex = gid;\n    }\n\n    return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);\n  }\n\n  // See pseudo code from `Font Variations Overview'\n  // in the OpenType specification.\n  getDelta(itemStore, outerIndex, innerIndex) {\n    if (outerIndex >= itemStore.itemVariationData.length) {\n      return 0;\n    }\n\n    let varData = itemStore.itemVariationData[outerIndex];\n    if (innerIndex >= varData.deltaSets.length) {\n      return 0;\n    }\n\n    let deltaSet = varData.deltaSets[innerIndex];\n    let blendVector = this.getBlendVector(itemStore, outerIndex);\n    let netAdjustment = 0;\n\n    for (let master = 0; master < varData.regionIndexCount; master++) {\n      netAdjustment += deltaSet.deltas[master] * blendVector[master];\n    }\n\n    return netAdjustment;\n  }\n\n  getBlendVector(itemStore, outerIndex) {\n    let varData = itemStore.itemVariationData[outerIndex];\n    if (this.blendVectors.has(varData)) {\n      return this.blendVectors.get(varData);\n    }\n\n    let normalizedCoords = this.normalizedCoords;\n    let blendVector = [];\n\n    // outer loop steps through master designs to be blended\n    for (let master = 0; master < varData.regionIndexCount; master++) {\n      let scalar = 1;\n      let regionIndex = varData.regionIndexes[master];\n      let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n      // inner loop steps through axes in this region\n      for (let j = 0; j < axes.length; j++) {\n        let axis = axes[j];\n        let axisScalar;\n\n        // compute the scalar contribution of this axis\n        // ignore invalid ranges\n        if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n          axisScalar = 1;\n\n        } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n          axisScalar = 1;\n\n        // peak of 0 means ignore this axis\n        } else if (axis.peakCoord === 0) {\n          axisScalar = 1;\n\n        // ignore this region if coords are out of range\n        } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n          axisScalar = 0;\n\n        // calculate a proportional factor\n        } else {\n          if (normalizedCoords[j] === axis.peakCoord) {\n            axisScalar = 1;\n          } else if (normalizedCoords[j] < axis.peakCoord) {\n            axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n              (axis.peakCoord - axis.startCoord + Number.EPSILON);\n          } else {\n            axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n              (axis.endCoord - axis.peakCoord + Number.EPSILON);\n          }\n        }\n\n        // take product of all the axis scalars\n        scalar *= axisScalar;\n      }\n\n      blendVector[master] = scalar;\n    }\n\n    this.blendVectors.set(varData, blendVector);\n    return blendVector;\n  }\n}\n","import r from 'restructure';\n\nconst resolved = Promise.resolve();\n\nexport default class Subset {\n  constructor(font) {\n    this.font = font;\n    this.glyphs = [];\n    this.mapping = {};\n\n    // always include the missing glyph\n    this.includeGlyph(0);\n  }\n\n  includeGlyph(glyph) {\n    if (typeof glyph === 'object') {\n      glyph = glyph.id;\n    }\n\n    if (this.mapping[glyph] == null) {\n      this.glyphs.push(glyph);\n      this.mapping[glyph] = this.glyphs.length - 1;\n    }\n\n    return this.mapping[glyph];\n  }\n\n  encodeStream() {\n    let s = new r.EncodeStream();\n\n    resolved.then(() => {\n      this.encode(s);\n      return s.end();\n    });\n\n    return s;\n  }\n}\n","import r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE        = 1 << 0;\nconst X_SHORT_VECTOR  = 1 << 1;\nconst Y_SHORT_VECTOR  = 1 << 2;\nconst REPEAT          = 1 << 3;\nconst SAME_X          = 1 << 4;\nconst SAME_Y          = 1 << 5;\n\nclass Point {\n  static size(val) {\n    return val >= 0 && val <= 255 ? 1 : 2;\n  }\n  \n  static encode(stream, value) {\n    if (value >= 0 && value <= 255) {\n      stream.writeUInt8(value);\n    } else {\n      stream.writeInt16BE(value);\n    }\n  }\n}\n\nlet Glyf = new r.Struct({\n  numberOfContours: r.int16, // if negative, this is a composite glyph\n  xMin: r.int16,\n  yMin: r.int16,\n  xMax: r.int16,\n  yMax: r.int16,\n  endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n  instructions: new r.Array(r.uint8, r.uint16),\n  flags: new r.Array(r.uint8, 0),\n  xPoints: new r.Array(Point, 0),\n  yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n  encodeSimple(path, instructions = []) {\n    let endPtsOfContours = [];\n    let xPoints = [];\n    let yPoints = [];\n    let flags = [];\n    let same = 0;\n    let lastX = 0, lastY = 0, lastFlag = 0;\n    let pointCount = 0;\n    \n    for (let i = 0; i < path.commands.length; i++) {\n      let c = path.commands[i];\n      \n      for (let j = 0; j < c.args.length; j += 2) {\n        let x = c.args[j];\n        let y = c.args[j + 1];\n        let flag = 0;\n        \n        // If the ending point of a quadratic curve is the midpoint\n        // between the control point and the control point of the next\n        // quadratic curve, we can omit the ending point.\n        if (c.command === 'quadraticCurveTo' && j === 2) {\n          let next = path.commands[i + 1];\n          if (next && next.command === 'quadraticCurveTo') {\n            let midX = (lastX + next.args[0]) / 2;\n            let midY = (lastY + next.args[1]) / 2;\n            \n            if (x === midX && y === midY) {\n              continue;\n            }\n          }\n        }\n        \n        // All points except control points are on curve.\n        if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n          flag |= ON_CURVE;\n        }\n        \n        flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n        flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n        \n        if (flag === lastFlag && same < 255) {\n          flags[flags.length - 1] |= REPEAT;\n          same++;\n        } else {\n          if (same > 0) {\n            flags.push(same);\n            same = 0;\n          }\n      \n          flags.push(flag);\n          lastFlag = flag;\n        }\n        \n        lastX = x;\n        lastY = y;\n        pointCount++;\n      }\n  \n      if (c.command === 'closePath') {\n        endPtsOfContours.push(pointCount - 1);\n      }\n    }\n\n    // Close the path if the last command didn't already\n    if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n      endPtsOfContours.push(pointCount - 1);\n    }\n    \n    let bbox = path.bbox;\n    let glyf = {\n      numberOfContours: endPtsOfContours.length,\n      xMin: bbox.minX,\n      yMin: bbox.minY,\n      xMax: bbox.maxX,\n      yMax: bbox.maxY,\n      endPtsOfContours: endPtsOfContours,\n      instructions: instructions,\n      flags: flags,\n      xPoints: xPoints,\n      yPoints: yPoints\n    };\n    \n    let size = Glyf.size(glyf);\n    let tail = 4 - (size % 4);\n    \n    let stream = new r.EncodeStream(size + tail);\n    Glyf.encode(stream, glyf);\n    \n    // Align to 4-byte length\n    if (tail !== 0) {\n      stream.fill(0, tail);\n    }\n    \n    return stream.buffer;\n  }\n  \n  _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n    let diff = value - last;\n    \n    if (value === last) {\n      flag |= sameFlag;\n    } else {\n      if (-255 <= diff && diff <= 255) {\n        flag |= shortFlag;\n        if (diff < 0) {\n          diff = -diff;\n        } else {\n          flag |= sameFlag;\n        }\n      }\n      \n      points.push(diff);\n    }\n    \n    return flag;\n  }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n  constructor(font) {\n    super(font);\n    this.glyphEncoder = new TTFGlyphEncoder;\n  }\n  \n  _addGlyph(gid) {\n    let glyph = this.font.getGlyph(gid);\n    let glyf = glyph._decode();\n\n    // get the offset to the glyph from the loca table\n    let curOffset = this.font.loca.offsets[gid];\n    let nextOffset = this.font.loca.offsets[gid + 1];\n\n    let stream = this.font._getTableStream('glyf');\n    stream.pos += curOffset;\n\n    let buffer = stream.readBuffer(nextOffset - curOffset);\n\n    // if it is a compound glyph, include its components\n    if (glyf && glyf.numberOfContours < 0) {\n      buffer = new Buffer(buffer);\n      for (let component of glyf.components) {\n        gid = this.includeGlyph(component.glyphID);\n        buffer.writeUInt16BE(gid, component.pos);\n      }\n    } else if (glyf && this.font._variationProcessor) {\n      // If this is a TrueType variation glyph, re-encode the path\n      buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n    }\n\n    this.glyf.push(buffer);\n    this.loca.offsets.push(this.offset);\n    \n    this.hmtx.metrics.push({\n      advance: glyph.advanceWidth,\n      bearing: glyph._getMetrics().leftBearing\n    });\n\n    this.offset += buffer.length;\n    return this.glyf.length - 1;\n  }\n\n  encode(stream) {\n    // tables required by PDF spec:\n    //   head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n    //\n    // additional tables required for standalone fonts:\n    //   name, cmap, OS/2, post\n\n    this.glyf = [];\n    this.offset = 0;\n    this.loca = {\n      offsets: [],\n      version: this.font.loca.version\n    };\n\n    this.hmtx = {\n      metrics: [],\n      bearings: []\n    };\n\n    // include all the glyphs\n    // not using a for loop because we need to support adding more\n    // glyphs to the array as we go, and CoffeeScript caches the length.\n    let i = 0;\n    while (i < this.glyphs.length) {\n      this._addGlyph(this.glyphs[i++]);\n    }\n\n    let maxp = cloneDeep(this.font.maxp);\n    maxp.numGlyphs = this.glyf.length;\n\n    this.loca.offsets.push(this.offset);\n\n    let head = cloneDeep(this.font.head);\n    head.indexToLocFormat = this.loca.version;\n\n    let hhea = cloneDeep(this.font.hhea);\n    hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n    // map = []\n    // for index in [0...256]\n    //     if index < @numGlyphs\n    //         map[index] = index\n    //     else\n    //         map[index] = 0\n    //\n    // cmapTable =\n    //     version: 0\n    //     length: 262\n    //     language: 0\n    //     codeMap: map\n    //\n    // cmap =\n    //     version: 0\n    //     numSubtables: 1\n    //     tables: [\n    //         platformID: 1\n    //         encodingID: 0\n    //         table: cmapTable\n    //     ]\n\n    // TODO: subset prep, cvt, fpgm?\n    Directory.encode(stream, {\n      tables: {\n        head,\n        hhea,\n        loca: this.loca,\n        maxp,\n        'cvt ': this.font['cvt '],\n        prep: this.font.prep,\n        glyf: this.glyf,\n        hmtx: this.hmtx,\n        fpgm: this.font.fpgm\n\n        // name: clone @font.name\n        // 'OS/2': clone @font['OS/2']\n        // post: clone @font.post\n        // cmap: cmap\n      }\n    });\n  }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n  constructor(font) {\n    super(font);\n\n    this.cff = this.font['CFF '];\n    if (!this.cff) {\n      throw new Error('Not a CFF Font');\n    }\n  }\n\n  subsetCharstrings() {\n    this.charstrings = [];\n    let gsubrs = {};\n\n    for (let gid of this.glyphs) {\n      this.charstrings.push(this.cff.getCharString(gid));\n\n      let glyph = this.font.getGlyph(gid);\n      let path = glyph.path; // this causes the glyph to be parsed\n\n      for (let subr in glyph._usedGsubrs) {\n        gsubrs[subr] = true;\n      }\n    }\n\n    this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n  }\n\n  subsetSubrs(subrs, used) {\n    let res = [];\n    for (let i = 0; i < subrs.length; i++) {\n      let subr = subrs[i];\n      if (used[i]) {\n        this.cff.stream.pos = subr.offset;\n        res.push(this.cff.stream.readBuffer(subr.length));\n      } else {\n        res.push(new Buffer([11])); // return\n      }\n    }\n\n    return res;\n  }\n\n  subsetFontdict(topDict) {\n    topDict.FDArray = [];\n    topDict.FDSelect = {\n      version: 0,\n      fds: []\n    };\n\n    let used_fds = {};\n    let used_subrs = [];\n    for (let gid of this.glyphs) {\n      let fd = this.cff.fdForGlyph(gid);\n      if (fd == null) {\n        continue;\n      }\n\n      if (!used_fds[fd]) {\n        topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n        used_subrs.push({});\n      }\n\n      used_fds[fd] = true;\n      topDict.FDSelect.fds.push(topDict.FDArray.length - 1);\n\n      let glyph = this.font.getGlyph(gid);\n      let path = glyph.path; // this causes the glyph to be parsed\n      for (let subr in glyph._usedSubrs) {\n        used_subrs[used_subrs.length - 1][subr] = true;\n      }\n    }\n\n    for (let i = 0; i < topDict.FDArray.length; i++) {\n      let dict = topDict.FDArray[i];\n      delete dict.FontName;\n      if (dict.Private && dict.Private.Subrs) {\n        dict.Private = Object.assign({}, dict.Private);\n        dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n      }\n    }\n\n    return;\n  }\n\n  createCIDFontdict(topDict) {\n    let used_subrs = {};\n    for (let gid of this.glyphs) {\n      let glyph = this.font.getGlyph(gid);\n      let path = glyph.path; // this causes the glyph to be parsed\n\n      for (let subr in glyph._usedSubrs) {\n        used_subrs[subr] = true;\n      }\n    }\n\n    let privateDict = Object.assign({}, this.cff.topDict.Private);\n    if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {\n      privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n    }\n\n    topDict.FDArray = [{ Private: privateDict }];\n    return topDict.FDSelect = {\n      version: 3,\n      nRanges: 1,\n      ranges: [{ first: 0, fd: 0 }],\n      sentinel: this.charstrings.length\n    };\n  }\n\n  addString(string) {\n    if (!string) {\n      return null;\n    }\n\n    if (!this.strings) {\n      this.strings = [];\n    }\n\n    this.strings.push(string);\n    return standardStrings.length + this.strings.length - 1;\n  }\n\n  encode(stream) {\n    this.subsetCharstrings();\n\n    let charset = {\n      version: this.charstrings.length > 255 ? 2 : 1,\n      ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n    };\n\n    let topDict = Object.assign({}, this.cff.topDict);\n    topDict.Private = null;\n    topDict.charset = charset;\n    topDict.Encoding = null;\n    topDict.CharStrings = this.charstrings;\n\n    for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n      topDict[key] = this.addString(this.cff.string(topDict[key]));\n    }\n\n    topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n    topDict.CIDCount = this.charstrings.length;\n\n    if (this.cff.isCIDFont) {\n      this.subsetFontdict(topDict);\n    } else {\n      this.createCIDFontdict(topDict);\n    }\n\n    let top = {\n      version: 1,\n      hdrSize: this.cff.hdrSize,\n      offSize: 4,\n      header: this.cff.header,\n      nameIndex: [this.cff.postscriptName],\n      topDictIndex: [topDict],\n      stringIndex: this.strings,\n      globalSubrIndex: this.gsubrs\n    };\n\n    CFFTop.encode(stream, top);\n  }\n}\n","import r from 'restructure';\nimport { cache } from './decorators';\nimport fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n  static probe(buffer) {\n    let format = buffer.toString('ascii', 0, 4);\n    return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n  }\n\n  constructor(stream, variationCoords = null) {\n    this.defaultLanguage = null;\n    this.stream = stream;\n    this.variationCoords = variationCoords;\n\n    this._directoryPos = this.stream.pos;\n    this._tables = {};\n    this._glyphs = {};\n    this._decodeDirectory();\n\n    // define properties for each table to lazily parse\n    for (let tag in this.directory.tables) {\n      let table = this.directory.tables[tag];\n      if (tables[tag] && table.length > 0) {\n        Object.defineProperty(this, tag, {\n          get: this._getTable.bind(this, table)\n        });\n      }\n    }\n  }\n\n  setDefaultLanguage(lang = null) {\n    this.defaultLanguage = lang;\n  }\n\n  _getTable(table) {\n    if (!(table.tag in this._tables)) {\n      try {\n        this._tables[table.tag] = this._decodeTable(table);\n      } catch (e) {\n        if (fontkit.logErrors) {\n          console.error(`Error decoding table ${table.tag}`);\n          console.error(e.stack);\n        }\n      }\n    }\n\n    return this._tables[table.tag];\n  }\n\n  _getTableStream(tag) {\n    let table = this.directory.tables[tag];\n    if (table) {\n      this.stream.pos = table.offset;\n      return this.stream;\n    }\n\n    return null;\n  }\n\n  _decodeDirectory() {\n    return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n  }\n\n  _decodeTable(table) {\n    let pos = this.stream.pos;\n\n    let stream = this._getTableStream(table.tag);\n    let result = tables[table.tag].decode(stream, this, table.length);\n\n    this.stream.pos = pos;\n    return result;\n  }\n\n  /**\n   * Gets a string from the font's `name` table\n   * `lang` is a BCP-47 language code.\n   * @return {string}\n   */\n  getName(key, lang = this.defaultLanguage || fontkit.defaultLanguage) {\n    let record = this.name && this.name.records[key];\n    if (record) {\n      // Attempt to retrieve the entry, depending on which translation is available:\n      return (\n          record[lang]\n          || record[this.defaultLanguage]\n          || record[fontkit.defaultLanguage]\n          || record['en']\n          || record[Object.keys(record)[0]] // Seriously, ANY language would be fine\n          || null\n      );\n    }\n\n    return null;\n  }\n\n  /**\n   * The unique PostScript name for this font, e.g. \"Helvetica-Bold\"\n   * @type {string}\n   */\n  get postscriptName() {\n    return this.getName('postscriptName');\n  }\n\n  /**\n   * The font's full name, e.g. \"Helvetica Bold\"\n   * @type {string}\n   */\n  get fullName() {\n    return this.getName('fullName');\n  }\n\n  /**\n   * The font's family name, e.g. \"Helvetica\"\n   * @type {string}\n   */\n  get familyName() {\n    return this.getName('fontFamily');\n  }\n\n  /**\n   * The font's sub-family, e.g. \"Bold\".\n   * @type {string}\n   */\n  get subfamilyName() {\n    return this.getName('fontSubfamily');\n  }\n\n  /**\n   * The font's copyright information\n   * @type {string}\n   */\n  get copyright() {\n    return this.getName('copyright');\n  }\n\n  /**\n   * The font's version number\n   * @type {string}\n   */\n  get version() {\n    return this.getName('version');\n  }\n\n  /**\n   * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n   * @type {number}\n   */\n  get ascent() {\n    return this.hhea.ascent;\n  }\n\n  /**\n   * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n   * @type {number}\n   */\n  get descent() {\n    return this.hhea.descent;\n  }\n\n  /**\n   * The amount of space that should be included between lines\n   * @type {number}\n   */\n  get lineGap() {\n    return this.hhea.lineGap;\n  }\n\n  /**\n   * The offset from the normal underline position that should be used\n   * @type {number}\n   */\n  get underlinePosition() {\n    return this.post.underlinePosition;\n  }\n\n  /**\n   * The weight of the underline that should be used\n   * @type {number}\n   */\n  get underlineThickness() {\n    return this.post.underlineThickness;\n  }\n\n  /**\n   * If this is an italic font, the angle the cursor should be drawn at to match the font design\n   * @type {number}\n   */\n  get italicAngle() {\n    return this.post.italicAngle;\n  }\n\n  /**\n   * The height of capital letters above the baseline.\n   * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n   * @type {number}\n   */\n  get capHeight() {\n    let os2 = this['OS/2'];\n    return os2 ? os2.capHeight : this.ascent;\n  }\n\n  /**\n   * The height of lower case letters in the font.\n   * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n   * @type {number}\n   */\n  get xHeight() {\n    let os2 = this['OS/2'];\n    return os2 ? os2.xHeight : 0;\n  }\n\n  /**\n   * The number of glyphs in the font.\n   * @type {number}\n   */\n  get numGlyphs() {\n    return this.maxp.numGlyphs;\n  }\n\n  /**\n   * The size of the font’s internal coordinate grid\n   * @type {number}\n   */\n  get unitsPerEm() {\n    return this.head.unitsPerEm;\n  }\n\n  /**\n   * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n   * @type {BBox}\n   */\n  @cache\n  get bbox() {\n    return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n  }\n\n  @cache\n  get _cmapProcessor() {\n    return new CmapProcessor(this.cmap);\n  }\n\n  /**\n   * An array of all of the unicode code points supported by the font.\n   * @type {number[]}\n   */\n  @cache\n  get characterSet() {\n    return this._cmapProcessor.getCharacterSet();\n  }\n\n  /**\n   * Returns whether there is glyph in the font for the given unicode code point.\n   *\n   * @param {number} codePoint\n   * @return {boolean}\n   */\n  hasGlyphForCodePoint(codePoint) {\n    return !!this._cmapProcessor.lookup(codePoint);\n  }\n\n  /**\n   * Maps a single unicode code point to a Glyph object.\n   * Does not perform any advanced substitutions (there is no context to do so).\n   *\n   * @param {number} codePoint\n   * @return {Glyph}\n   */\n  glyphForCodePoint(codePoint) {\n    return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n  }\n\n  /**\n   * Returns an array of Glyph objects for the given string.\n   * This is only a one-to-one mapping from characters to glyphs.\n   * For most uses, you should use font.layout (described below), which\n   * provides a much more advanced mapping supporting AAT and OpenType shaping.\n   *\n   * @param {string} string\n   * @return {Glyph[]}\n   */\n  glyphsForString(string) {\n    let glyphs = [];\n    let len = string.length;\n    let idx = 0;\n    let last = -1;\n    let state = -1;\n\n    while (idx <= len) {\n      let code = 0;\n      let nextState = 0;\n\n      if (idx < len) {\n        // Decode the next codepoint from UTF 16\n        code = string.charCodeAt(idx++);\n        if (0xd800 <= code && code <= 0xdbff && idx < len) {\n          let next = string.charCodeAt(idx);\n          if (0xdc00 <= next && next <= 0xdfff) {\n            idx++;\n            code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n          }\n        }\n\n        // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n        nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n      } else {\n        idx++;\n      }\n\n      if (state === 0 && nextState === 1) {\n        // Variation selector following normal codepoint.\n        glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n      } else if (state === 0 && nextState === 0) {\n        // Normal codepoint following normal codepoint.\n        glyphs.push(this.glyphForCodePoint(last));\n      }\n\n      last = code;\n      state = nextState;\n    }\n\n    return glyphs;\n  }\n\n  @cache\n  get _layoutEngine() {\n    return new LayoutEngine(this);\n  }\n\n  /**\n   * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n   *\n   * @param {string} string\n   * @param {string[]} [userFeatures]\n   * @param {string} [script]\n   * @param {string} [language]\n   * @param {string} [direction]\n   * @return {GlyphRun}\n   */\n  layout(string, userFeatures, script, language, direction) {\n    return this._layoutEngine.layout(string, userFeatures, script, language, direction);\n  }\n\n  /**\n   * Returns an array of strings that map to the given glyph id.\n   * @param {number} gid - glyph id\n   */\n  stringsForGlyph(gid) {\n    return this._layoutEngine.stringsForGlyph(gid);\n  }\n\n  /**\n   * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n   * (or mapped AAT tags) supported by the font.\n   * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n   * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n   *\n   * @type {string[]}\n   */\n  get availableFeatures() {\n    return this._layoutEngine.getAvailableFeatures();\n  }\n\n  getAvailableFeatures(script, language) {\n    return this._layoutEngine.getAvailableFeatures(script, language);\n  }\n\n  _getBaseGlyph(glyph, characters = []) {\n    if (!this._glyphs[glyph]) {\n      if (this.directory.tables.glyf) {\n        this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n      } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n        this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n      }\n    }\n\n    return this._glyphs[glyph] || null;\n  }\n\n  /**\n   * Returns a glyph object for the given glyph id.\n   * You can pass the array of code points this glyph represents for\n   * your use later, and it will be stored in the glyph object.\n   *\n   * @param {number} glyph\n   * @param {number[]} characters\n   * @return {Glyph}\n   */\n  getGlyph(glyph, characters = []) {\n    if (!this._glyphs[glyph]) {\n      if (this.directory.tables.sbix) {\n        this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n      } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n        this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n      } else {\n        this._getBaseGlyph(glyph, characters);\n      }\n    }\n\n    return this._glyphs[glyph] || null;\n  }\n\n  /**\n   * Returns a Subset for this font.\n   * @return {Subset}\n   */\n  createSubset() {\n    if (this.directory.tables['CFF ']) {\n      return new CFFSubset(this);\n    }\n\n    return new TTFSubset(this);\n  }\n\n  /**\n   * Returns an object describing the available variation axes\n   * that this font supports. Keys are setting tags, and values\n   * contain the axis name, range, and default value.\n   *\n   * @type {object}\n   */\n  @cache\n  get variationAxes() {\n    let res = {};\n    if (!this.fvar) {\n      return res;\n    }\n\n    for (let axis of this.fvar.axis) {\n      res[axis.axisTag.trim()] = {\n        name: axis.name.en,\n        min: axis.minValue,\n        default: axis.defaultValue,\n        max: axis.maxValue\n      };\n    }\n\n    return res;\n  }\n\n  /**\n   * Returns an object describing the named variation instances\n   * that the font designer has specified. Keys are variation names\n   * and values are the variation settings for this instance.\n   *\n   * @type {object}\n   */\n  @cache\n  get namedVariations() {\n    let res = {};\n    if (!this.fvar) {\n      return res;\n    }\n\n    for (let instance of this.fvar.instance) {\n      let settings = {};\n      for (let i = 0; i < this.fvar.axis.length; i++) {\n        let axis = this.fvar.axis[i];\n        settings[axis.axisTag.trim()] = instance.coord[i];\n      }\n\n      res[instance.name.en] = settings;\n    }\n\n    return res;\n  }\n\n  /**\n   * Returns a new font with the given variation settings applied.\n   * Settings can either be an instance name, or an object containing\n   * variation tags as specified by the `variationAxes` property.\n   *\n   * @param {object} settings\n   * @return {TTFFont}\n   */\n  getVariation(settings) {\n    if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n      throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n    }\n\n    if (typeof settings === 'string') {\n      settings = this.namedVariations[settings];\n    }\n\n    if (typeof settings !== 'object') {\n      throw new Error('Variation settings must be either a variation name or settings object.');\n    }\n\n    // normalize the coordinates\n    let coords = this.fvar.axis.map((axis, i) => {\n      let axisTag = axis.axisTag.trim();\n      if (axisTag in settings) {\n        return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n      } else {\n        return axis.defaultValue;\n      }\n    });\n\n    let stream = new r.DecodeStream(this.stream.buffer);\n    stream.pos = this._directoryPos;\n\n    let font = new TTFFont(stream, coords);\n    font._tables = this._tables;\n\n    return font;\n  }\n\n  @cache\n  get _variationProcessor() {\n    if (!this.fvar) {\n      return null;\n    }\n\n    let variationCoords = this.variationCoords;\n\n    // Ignore if no variation coords and not CFF2\n    if (!variationCoords && !this.CFF2) {\n      return null;\n    }\n\n    if (!variationCoords) {\n      variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n    }\n\n    return new GlyphVariationProcessor(this, variationCoords);\n  }\n\n  // Standardized format plugin API\n  getFont(name) {\n    return this.getVariation(name);\n  }\n}\n","import r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n  tag:          new r.String(4),\n  offset:       new r.Pointer(r.uint32, 'void', {type: 'global'}),\n  compLength:   r.uint32,\n  length:       r.uint32,\n  origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n  tag:            new r.String(4), // should be 'wOFF'\n  flavor:         r.uint32,\n  length:         r.uint32,\n  numTables:      r.uint16,\n  reserved:       new r.Reserved(r.uint16),\n  totalSfntSize:  r.uint32,\n  majorVersion:   r.uint16,\n  minorVersion:   r.uint16,\n  metaOffset:     r.uint32,\n  metaLength:     r.uint32,\n  metaOrigLength: r.uint32,\n  privOffset:     r.uint32,\n  privLength:     r.uint32,\n  tables:         new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n  let tables = {};\n  for (let table of this.tables) {\n    tables[table.tag] = table;\n  }\n\n  this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport r from 'restructure';\n\nexport default class WOFFFont extends TTFFont {\n  static probe(buffer) {\n    return buffer.toString('ascii', 0, 4) === 'wOFF';\n  }\n\n  _decodeDirectory() {\n    this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n  }\n\n  _getTableStream(tag) {\n    let table = this.directory.tables[tag];\n    if (table) {\n      this.stream.pos = table.offset;\n\n      if (table.compLength < table.length) {\n        this.stream.pos += 2; // skip deflate header\n        let outBuffer = new Buffer(table.length);\n        let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n        return new r.DecodeStream(buf);\n      } else {\n        return this.stream;\n      }\n    }\n\n    return null;\n  }\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n  _decode() {\n    // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n    return this._font._transformedGlyphs[this.id];\n  }\n\n  _getCBox() {\n    return this.path.bbox;\n  }\n}\n","import r from 'restructure';\n\nconst Base128 = {\n  decode(stream) {\n    let result = 0;\n    let iterable = [0, 1, 2, 3, 4];\n    for (let j = 0; j < iterable.length; j++) {\n      let i = iterable[j];\n      let code = stream.readUInt8();\n\n      // If any of the top seven bits are set then we're about to overflow.\n      if (result & 0xe0000000) {\n        throw new Error('Overflow');\n      }\n\n      result = (result << 7) | (code & 0x7f);\n      if ((code & 0x80) === 0) {\n        return result;\n      }\n    }\n\n    throw new Error('Bad base 128 number');\n  }\n};\n\nlet knownTags = [\n  'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n  'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n  'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n  'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n  'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n  'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n  'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n  flags: r.uint8,\n  customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n  tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n  length: Base128,\n  transformVersion: t => (t.flags >>> 6) & 0x03,\n  transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n  transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n  tag: new r.String(4), // should be 'wOF2'\n  flavor: r.uint32,\n  length: r.uint32,\n  numTables: r.uint16,\n  reserved: new r.Reserved(r.uint16),\n  totalSfntSize: r.uint32,\n  totalCompressedSize: r.uint32,\n  majorVersion: r.uint16,\n  minorVersion: r.uint16,\n  metaOffset: r.uint32,\n  metaLength: r.uint32,\n  metaOrigLength: r.uint32,\n  privOffset: r.uint32,\n  privLength: r.uint32,\n  tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n  let tables = {};\n  for (let i = 0; i < this.tables.length; i++) {\n    let table = this.tables[i];\n    tables[table.tag] = table;\n  }\n\n  return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import r from 'restructure';\nimport brotli from 'brotli/decompress';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n  static probe(buffer) {\n    return buffer.toString('ascii', 0, 4) === 'wOF2';\n  }\n\n  _decodeDirectory() {\n    this.directory = WOFF2Directory.decode(this.stream);\n    this._dataPos = this.stream.pos;\n  }\n\n  _decompress() {\n    // decompress data and setup table offsets if we haven't already\n    if (!this._decompressed) {\n      this.stream.pos = this._dataPos;\n      let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n      let decompressedSize = 0;\n      for (let tag in this.directory.tables) {\n        let entry = this.directory.tables[tag];\n        entry.offset = decompressedSize;\n        decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n      }\n\n      let decompressed = brotli(buffer, decompressedSize);\n      if (!decompressed) {\n        throw new Error('Error decoding compressed data in WOFF2');\n      }\n\n      this.stream = new r.DecodeStream(new Buffer(decompressed));\n      this._decompressed = true;\n    }\n  }\n\n  _decodeTable(table) {\n    this._decompress();\n    return super._decodeTable(table);\n  }\n\n  // Override this method to get a glyph and return our\n  // custom subclass if there is a glyf table.\n  _getBaseGlyph(glyph, characters = []) {\n    if (!this._glyphs[glyph]) {\n      if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n        if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n        return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n      } else {\n        return super._getBaseGlyph(glyph, characters);\n      }\n    }\n  }\n\n  _transformGlyfTable() {\n    this._decompress();\n    this.stream.pos = this.directory.tables.glyf.offset;\n    let table = GlyfTable.decode(this.stream);\n    let glyphs = [];\n\n    for (let index = 0; index < table.numGlyphs; index++) {\n      let glyph = {};\n      let nContours = table.nContours.readInt16BE();\n      glyph.numberOfContours = nContours;\n\n      if (nContours > 0) { // simple glyph\n        let nPoints = [];\n        let totalPoints = 0;\n\n        for (let i = 0; i < nContours; i++) {\n          let r = read255UInt16(table.nPoints);\n          totalPoints += r;\n          nPoints.push(totalPoints);\n        }\n\n        glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n        for (let i = 0; i < nContours; i++) {\n          glyph.points[nPoints[i] - 1].endContour = true;\n        }\n\n        var instructionSize = read255UInt16(table.glyphs);\n\n      } else if (nContours < 0) { // composite glyph\n        let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n        if (haveInstructions) {\n          var instructionSize = read255UInt16(table.glyphs);\n        }\n      }\n\n      glyphs.push(glyph);\n    }\n\n    this._transformedGlyphs = glyphs;\n  }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n  constructor(length) {\n    this.length = length;\n    this._buf = new r.Buffer(length);\n  }\n\n  decode(stream, parent) {\n    return new r.DecodeStream(this._buf.decode(stream, parent));\n  }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n  version: r.uint32,\n  numGlyphs: r.uint16,\n  indexFormat: r.uint16,\n  nContourStreamSize: r.uint32,\n  nPointsStreamSize: r.uint32,\n  flagStreamSize: r.uint32,\n  glyphStreamSize: r.uint32,\n  compositeStreamSize: r.uint32,\n  bboxStreamSize: r.uint32,\n  instructionStreamSize: r.uint32,\n  nContours: new Substream('nContourStreamSize'),\n  nPoints: new Substream('nPointsStreamSize'),\n  flags: new Substream('flagStreamSize'),\n  glyphs: new Substream('glyphStreamSize'),\n  composites: new Substream('compositeStreamSize'),\n  bboxes: new Substream('bboxStreamSize'),\n  instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n  let code = stream.readUInt8();\n\n  if (code === WORD_CODE) {\n    return stream.readUInt16BE();\n  }\n\n  if (code === ONE_MORE_BYTE_CODE1) {\n    return stream.readUInt8() + LOWEST_U_CODE;\n  }\n\n  if (code === ONE_MORE_BYTE_CODE2) {\n    return stream.readUInt8() + LOWEST_U_CODE * 2;\n  }\n\n  return code;\n}\n\nfunction withSign(flag, baseval) {\n  return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n  let y;\n  let x = y = 0;\n  let res = [];\n\n  for (let i = 0; i < nPoints; i++) {\n    let dx = 0, dy = 0;\n    let flag = flags.readUInt8();\n    let onCurve = !(flag >> 7);\n    flag &= 0x7f;\n\n    if (flag < 10) {\n      dx = 0;\n      dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n    } else if (flag < 20) {\n      dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n      dy = 0;\n\n    } else if (flag < 84) {\n      var b0 = flag - 20;\n      var b1 = glyphs.readUInt8();\n      dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n      dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n    } else if (flag < 120) {\n      var b0 = flag - 84;\n      dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n      dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n    } else if (flag < 124) {\n      var b1 = glyphs.readUInt8();\n      let b2 = glyphs.readUInt8();\n      dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n      dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n    } else {\n      dx = withSign(flag, glyphs.readUInt16BE());\n      dy = withSign(flag >> 1, glyphs.readUInt16BE());\n    }\n\n    x += dx;\n    y += dy;\n    res.push(new Point(onCurve, false, x, y));\n  }\n\n  return res;\n}\n","import r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n  0x00010000: {\n    numFonts:   r.uint32,\n    offsets:    new r.Array(r.uint32, 'numFonts')\n  },\n  0x00020000: {\n    numFonts:   r.uint32,\n    offsets:    new r.Array(r.uint32, 'numFonts'),\n    dsigTag:    r.uint32,\n    dsigLength: r.uint32,\n    dsigOffset: r.uint32\n  }\n});\n\nexport default class TrueTypeCollection {\n  static probe(buffer) {\n    return buffer.toString('ascii', 0, 4) === 'ttcf';\n  }\n\n  constructor(stream) {\n    this.stream = stream;\n    if (stream.readString(4) !== 'ttcf') {\n      throw new Error('Not a TrueType collection');\n    }\n\n    this.header = TTCHeader.decode(stream);\n  }\n\n  getFont(name) {\n    for (let offset of this.header.offsets) {\n      let stream = new r.DecodeStream(this.stream.buffer);\n      stream.pos = offset;\n      let font = new TTFFont(stream);\n      if (font.postscriptName === name) {\n        return font;\n      }\n    }\n\n    return null;\n  }\n\n  get fonts() {\n    let fonts = [];\n    for (let offset of this.header.offsets) {\n      let stream = new r.DecodeStream(this.stream.buffer);\n      stream.pos = offset;\n      fonts.push(new TTFFont(stream));\n    }\n\n    return fonts;\n  }\n}\n","import r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n  len: r.uint32,\n  buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n  id: r.uint16,\n  nameOffset: r.int16,\n  attr: r.uint8,\n  dataOffset: r.uint24,\n  handle: r.uint32\n});\n\nlet Type = new r.Struct({\n  name: new r.String(4),\n  maxTypeIndex: r.uint16,\n  refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n  length: r.uint16,\n  types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n  reserved: new r.Reserved(r.uint8, 24),\n  typeList: new r.Pointer(r.uint16, TypeList),\n  nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n  dataOffset: r.uint32,\n  map: new r.Pointer(r.uint32, DFontMap),\n  dataLength: r.uint32,\n  mapLength: r.uint32\n});\n\nexport default class DFont {\n  static probe(buffer) {\n    let stream = new r.DecodeStream(buffer);\n\n    try {\n      var header = DFontHeader.decode(stream);\n    } catch (e) {\n      return false;\n    }\n\n    for (let type of header.map.typeList.types) {\n      if (type.name === 'sfnt') {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  constructor(stream) {\n    this.stream = stream;\n    this.header = DFontHeader.decode(this.stream);\n\n    for (let type of this.header.map.typeList.types) {\n      for (let ref of type.refList) {\n        if (ref.nameOffset >= 0) {\n          this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n          ref.name = DFontName.decode(this.stream);\n        } else {\n          ref.name = null;\n        }\n      }\n\n      if (type.name === 'sfnt') {\n        this.sfnt = type;\n      }\n    }\n  }\n\n  getFont(name) {\n    if (!this.sfnt) {\n      return null;\n    }\n\n    for (let ref of this.sfnt.refList) {\n      let pos = this.header.dataOffset + ref.dataOffset + 4;\n      let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n      let font = new TTFFont(stream);\n      if (font.postscriptName === name) {\n        return font;\n      }\n    }\n\n    return null;\n  }\n\n  get fonts() {\n    let fonts = [];\n    for (let ref of this.sfnt.refList) {\n      let pos = this.header.dataOffset + ref.dataOffset + 4;\n      let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n      fonts.push(new TTFFont(stream));\n    }\n\n    return fonts;\n  }\n}\n","import fontkit from './base';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nfontkit.registerFormat(TTFFont);\nfontkit.registerFormat(WOFFFont);\nfontkit.registerFormat(WOFF2Font);\nfontkit.registerFormat(TrueTypeCollection);\nfontkit.registerFormat(DFont);\n\nexport default fontkit;\n"],"names":["fs","require","fontkit","logErrors","formats","registerFormat","format","push","openSync","filename","postscriptName","buffer","readFileSync","create","open","callback","readFile","err","font","e","i","length","probe","r","DecodeStream","getFont","Error","defaultLanguage","setDefaultLanguage","lang","cache","target","key","descriptor","get","value","call","fn","memoized","args","has","result","apply","set","SubHeader","Struct","uint16","int16","CmapGroup","uint32","UnicodeValueRange","uint24","uint8","UVSMapping","DefaultUVS","Array","NonDefaultUVS","VarSelectorRecord","Pointer","type","CmapSubtable","VersionedStruct","LazyArray","Math","max","t","subHeaderKeys","segCountX2","Reserved","_currentOffset","CmapEntry","lazy","int32","Bitfield","HmtxEntry","parent","hhea","numberOfMetrics","maxp","numGlyphs","getEncoding","platformID","encodingID","languageID","MAC_LANGUAGE_ENCODINGS","ENCODINGS","LANGUAGES","NameRecord","String","relativeTo","allowNull","LangTagRecord","NameTable","NAMES","process","stream","records","record","language","langTags","tag","nameID","obj","string","preEncode","isArray","version","val","indexOf","Buffer","byteLength","en","count","stringOffset","size","OS2","versions","fixed32","loca","offsets","CFFIndex","getCFFVersion","ctx","hdrSize","decode","readUInt32BE","readUInt16BE","offSize","readUInt8","offsetType","pos","ret","startPos","start","end","arr","offset","item","encode","writeUInt16BE","sizes","s","writeUInt8","FLOAT_EOF","FLOAT_LOOKUP","FLOAT_ENCODE_LOOKUP","CFFOperand","readInt16BE","readInt32BE","str","b","n1","n2","parseFloat","forceLarge","ceil","Number","writeInt32BE","c1","c2","writeInt16BE","CFFDict","ops","fields","field","decodeOperands","operands","map","op","encodeOperands","PropertyDescriptor","dict","includePointers","startOffset","len","k","isEqual","pointerSize","pointerOffset","pointers","ptr","CFFPointer","options","Ptr","valueOf","CFFBlendOp","numBlends","pop","StandardEncoding","ExpertEncoding","ISOAdobeCharset","ExpertCharset","ExpertSubsetCharset","LangSysTable","LangSysRecord","Script","ScriptRecord","ScriptList","Feature","FeatureRecord","FeatureList","LookupFlags","LookupList","SubTable","Lookup","Optional","flags","useMarkFilteringSet","RangeRecord","Coverage","ClassRangeRecord","ClassDef","Device","LookupRecord","Rule","glyphCount","RuleSet","ClassRule","ClassSet","Context","ChainRule","inputGlyphCount","ChainRuleSet","ChainingContext","F2DOT14","Fixed","RegionAxisCoordinates","VariationRegionList","DeltaSet","shortDeltaCount","int8","regionIndexCount","shortDeltas","concat","regionDeltas","ItemVariationData","ItemVariationStore","ConditionTable","filterRangeMinValue","filterRangeMaxValue","ConditionSet","FeatureTableSubstitutionRecord","FeatureTableSubstitution","FeatureVariationRecord","FeatureVariations","PredefinedOp","predefinedOps","index","CFFEncodingVersion","Range1","Range2","CFFCustomEncoding","CFFEncoding","RangeArray","resolveLength","res","range","nLeft","CFFCustomCharset","CharStrings","CFFCharset","FDRange3","FDRange4","FDSelect","CFFPrivateDict","CFFPrivateOp","FontDict","CFFTopDict","VariationStore","CFF2TopDict","CFFTop","fixed16","CFFFont","top","topDictIndex","topDict","isCIDFont","ROS","sid","standardStrings","stringIndex","getCharString","glyph","readBuffer","getGlyphName","gid","charset","glyphs","ranges","first","fdForGlyph","fds","low","high","mid","fd","privateDictForGlyph","FDArray","Private","nameIndex","FullName","FamilyName","VerticalOrigin","BigMetrics","SmallMetrics","EBDTComponent","ByteAligned","BitAligned","SBitLineMetrics","CodeOffsetPair","IndexSubtable","lastGlyphIndex","firstGlyphIndex","IndexSubtableArray","BitmapSizeTable","ImageTable","LayerRecord","BaseGlyphRecord","ColorRecord","BaseCoord","BaseValues","FeatMinMaxRecord","MinMax","BaseLangSysRecord","BaseScript","BaseScriptRecord","BaseScriptList","BaseTagList","Axis","AttachPoint","AttachList","CaretValue","LigGlyph","LigCaretList","MarkGlyphSetsDef","ValueFormat","types","ValueRecord","buildStruct","struct","rel","_startOffset","PairValueRecord","PairSet","Class2Record","Anchor","EntryExitRecord","MarkRecord","MarkArray","BaseRecord","classCount","BaseArray","ComponentRecord","LigatureAttach","LigatureArray","GPOSLookup","extension","Sequence","AlternateSet","Ligature","compCount","LigatureSet","GSUBLookup","JstfGSUBModList","JstfPriority","JstfLangSys","JstfLangSysRecord","JstfScript","JstfScriptRecord","VariableSizeNumber","_size","readUInt24BE","MapDataEntry","entryFormat","entry","DeltaSetIndexMap","Signature","SignatureBlock","GaspRange","DeviceRecord","KernPair","ClassTable","Kern2Array","leftTable","off","rowWidth","KernSubtable","leftClassCount","rightClassCount","KernTable","Ratio","vTable","VdmxGroup","VmtxEntry","vhea","shortFrac","Correspondence","Segment","UnboundedArrayAccessor","base","_items","getItem","inspect","constructor","name","UnboundedArray","LookupTable","ValueType","Shadow","BinarySearchHeader","LookupSegmentSingle","LookupSegmentArray","lastGlyph","firstGlyph","LookupSingle","binarySearchHeader","nUnits","StateTable","entryData","lookupType","Entry","StateArray","nClasses","StateHeader","StateTable1","ClassLookupTable","newStateOffset","stateArray","StateHeader1","BslnSubtable","Setting","fontFeatures","FeatureName","Instance","axisCount","instanceSize","Offset","gvar","WidthDeltaRecord","WidthDeltaCluster","ActionData","Action","actionLength","PostcompensationAction","PostCompensationTable","JustificationTable","LigatureData","ContextualData","InsertionData","SubstitutionTable","SubtableData","Subtable","FeatureEntry","MorxChain","OpticalBounds","tables","cmap","head","hmtx","post","fpgm","prep","cvt","glyf","VORG","EBLC","CBLC","sbix","COLR","CPAL","BASE","GDEF","GPOS","GSUB","JSTF","HVAR","DSIG","gasp","hdmx","kern","LTSH","PCLT","VDMX","vmtx","avar","bsln","feat","fvar","just","morx","opbd","TableEntry","Directory","table","VoidPointer","Tables","numTables","maxExponentFor2","floor","log","LN2","maxPowerOf2","pow","searchRange","entrySelector","rangeShift","binarySearch","cmp","min","iconv","CmapProcessor","cmapTable","encoding","findSubtable","encodingExists","uvs","pairs","lookup","codepoint","variationSelector","buf","getVariationSelector","codeMap","segCount","startCode","endCode","rangeOffset","idRangeOffset","idDelta","glyphIndexArray","glyphIndices","firstCode","nGroups","group","groups","startCharCode","endCharCode","glyphID","selectors","varSelectors","toArray","x","varSelector","sel","defaultUVS","startUnicodeValue","additionalCount","nonDefaultUVS","unicodeValue","getCharacterSet","endCodes","tail","codePointsForGlyph","delta","c","g","KernProcessor","positions","glyphIndex","left","id","right","xAdvance","getKerning","coverage","crossStream","horizontal","vertical","variation","subtable","pairIdx","pair","leftOffset","rightOffset","nGlyphs","array","rightTable","values","kernValue","kernIndex","leftClass","rightClass","override","UnicodeLayoutEngine","positionGlyphs","clusterStart","clusterEnd","isMark","positionCluster","baseBox","cbox","copy","codePoints","minX","width","xOffset","yOffset","yGap","unitsPerEm","mark","markBox","position","combiningClass","getCombiningClass","maxX","minY","maxY","height","yAdvance","codePoint","unicode","BBox","Infinity","addPoint","y","abs","UNICODE_SCRIPTS","OPENTYPE_SCRIPTS","script","fromOpenType","forString","idx","code","charCodeAt","next","getScript","Unknown","forCodePoints","RTL","direction","GlyphRun","features","bbox","p","GlyphPosition","feature","selector","OTMapping","slice","characterAlternatives","AATMapping","ot","aat","mapOTToAAT","mapFeatureStrings","f","setting","isNaN","typeCode","settingCode","mapAATToOT","AATLookupTable","seg","segments","glyphsForValue","classValue","segment","START_OF_TEXT_STATE","END_OF_TEXT_CLASS","OUT_OF_BOUNDS_CLASS","DELETED_GLYPH_CLASS","DONT_ADVANCE","AATStateMachine","stateTable","lookupTable","classTable","reverse","processEntry","currentState","dir","classCode","shouldAdvance","row","entryIndex","entryTable","newState","traverse","opts","state","visited","add","enter","exit","MARK_FIRST","MARK_LAST","VERB","SET_MARK","SET_COMPONENT","PERFORM_ACTION","LAST_MASK","STORE_MASK","OFFSET_MASK","REVERSE_DIRECTION","CURRENT_INSERT_BEFORE","MARKED_INSERT_BEFORE","CURRENT_INSERT_COUNT","MARKED_INSERT_COUNT","AATMorxProcessor","processIndicRearragement","bind","processContextualSubstitution","processLigature","processNoncontextualSubstitutions","processGlyphInsertion","inputCache","chains","chain","defaultFlags","featureType","featureSetting","disableFlags","enableFlags","subtables","subFeatureFlags","processSubtable","splice","ligatureStack","markedGlyph","markedIndex","stateMachine","getStateMachine","getProcessor","subsitutions","substitutionTable","items","markIndex","getGlyph","currentIndex","actions","ligatureActions","components","ligatureList","actionIndex","action","last","ligatureIndex","ligatureGlyphs","componentGlyph","unshift","store","component","ligatureEntry","_insertGlyphs","insertionActionIndex","isBefore","insertions","insertionActions","markedInsertIndex","currentInsertIndex","getSupportedFeatures","generateInputs","generateInputCache","generateInputsForSubtable","input","stack","found","swap","rangeA","rangeB","reverseA","reverseB","reorderGlyphs","verb","AATLayoutEngine","morxProcessor","fallbackPosition","substitute","glyphRun","AATFeatureMap","getAvailableFeatures","stringsForGlyph","glyphStrings","_addStrings","strings","_cmapProcessor","ShapingPlan","stages","globalFeatures","allFeatures","_addFeatures","global","stageIndex","stage","arg","local","addStage","setFeatureOverrides","assignGlobalFeatures","processor","applyFeatures","VARIATION_FEATURES","COMMON_FEATURES","FRACTIONAL_FEATURES","HORIZONTAL_FEATURES","DIRECTIONAL_FEATURES","DefaultShaper","plan","planPreprocessing","planFeatures","planPostprocessing","assignFeatures","userFeatures","isDigit","numr","frac","dnom","zeroMarkWidths","trie","UnicodeTrie","__dirname","FEATURES","ShapingClasses","ISOL","FINA","FIN2","FIN3","MEDI","MED2","INIT","NONE","STATE_TABLE","ArabicShaper","prev","curAction","prevAction","getShapingClass","Transparent","category","getCategory","Non_Joining","GlyphIterator","reset","markAttachmentType","shouldIgnore","ignoreMarks","ignoreBaseGlyphs","isBase","ignoreLigatures","isLigature","move","peek","increment","peekIndex","DEFAULT_SCRIPTS","OTProcessor","scriptTag","languageTag","lookups","variationsIndex","_variationProcessor","findVariationsIndex","normalizedCoords","selectScript","ligatureID","currentFeature","findScript","scriptList","changed","repeat","langSysRecords","langSys","defaultLangSys","featureIndexes","featureIndex","featureList","substituteFeature","substituteFeatureForVariations","lookupsForFeatures","exclude","lookupListIndexes","lookupIndex","lookupList","sort","a","featureVariations","featureVariationRecords","substitutions","featureTableSubstitution","substitution","alternateFeatureTable","coords","variations","conditions","conditionSet","conditionTable","variationConditionsMatch","every","coord","condition","axisIndex","advances","applyLookups","glyphIterator","cur","subTables","applyLookup","applyLookupList","lookupRecords","lookupRecord","sequenceIndex","lookupListIndex","coverageIndex","rangeRecords","startCoverageIndex","match","sequence","matched","sequenceMatches","sequenceMatchIndices","coverageSequenceMatches","getClassID","classDef","startGlyph","classValueArray","classRangeRecord","class","classSequenceMatches","classID","applyContext","ruleSets","rule","classSet","classes","coverages","applyChainingContext","chainRuleSets","backtrack","lookahead","inputClassDef","rules","chainClassSet","backtrackClassDef","lookaheadClassDef","backtrackGlyphCount","backtrackCoverage","inputCoverage","lookaheadCoverage","GlyphInfo","_font","ligatureComponent","isLigated","cursiveAttachment","markAttachment","shaperInfo","substituted","isMultiplied","_id","glyphClassDef","prototype","markAttachClassDef","HangulShaper","getType","DECOMPOSE","hasGlyphForCodePoint","decompose","COMPOSE","compose","TONE_MARK","INVALID","insertDottedCircle","HANGUL_BASE","HANGUL_END","HANGUL_COUNT","L_BASE","V_BASE","T_BASE","L_COUNT","V_COUNT","T_COUNT","L_END","V_END","T_END","DOTTED_CIRCLE","isL","isV","isT","isTone","isLVT","isLV","isCombiningL","isCombiningV","isCombiningT","X","L","V","T","LV","LVT","M","NO_ACTION","glyphForCodePoint","l","v","ljmo","vjmo","insert","tjmo","prevType","lv","del","getLength","reorderToneMark","advanceWidth","dottedCircle","CATEGORIES","POSITIONS","CONSONANT_FLAGS","C","Ra","CM","Placeholder","Dotted_Circle","JOINER_FLAGS","ZWJ","ZWNJ","HALANT_OR_COENG_FLAGS","H","Coeng","INDIC_CONFIGS","Before_Post","After_Sub","Before_Sub","After_Main","After_Post","Ra_To_Become_Reph","INDIC_DECOMPOSITIONS","decompositions","useData","StateMachine","indicMachine","IndicShaper","setupSyllables","initialReordering","finalReordering","unicodeScript","indicConfig","Default","isOldSpec","hasOldSpec","d","decomposed","indicCategory","indicPosition","IndicInfo","syllableType","syllable","tags","End","isConsonant","isJoiner","isHalantOrCoeng","wouldSubstitute","_layoutEngine","engine","GSUBProcessor","consonantPosition","consonant","virama","Below_C","Post_C","Base_C","info","nextSyllable","Repha","limit","hasReph","rephPos","rphf","rephMode","basePos","seenBelow","Pre_C","j","Final_C","disallowDoubleHalants","lastPos","Start","N","RS","Pre_M","SMVD","blwf","blwfMode","half","abvf","pstf","prefLen","pref","cfar","nonJoiner","tryPref","BASE_C","newPos","oldPos","tmp","newRephPos","reph","test","init","categories","UniversalShaper","clearSubstitutionFlags","recordRphf","recordPref","reorder","useCategory","USEInfo","isHalant","SHAPERS","choose","shaper","deltaGlyphID","sequences","curGlyph","replacement","undefined","USER_INDEX","alternateSet","ligatureSets","ligature","characters","ligatureGlyph","isMarkLigature","lastLigID","lastNumComps","curComps","matchIndex","GPOSProcessor","applyPositionValue","xPlacement","yPlacement","variationProcessor","variationStore","itemVariationStore","xPlaDevice","getDelta","yPlaDevice","xAdvDevice","yAdvDevice","nextGlyph","pairSets","secondGlyph","value1","value2","class1","classDef1","class2","classDef2","classRecords","nextIndex","curRecord","entryExitRecords","exitAnchor","nextRecord","entryAnchor","getAnchor","rightToLeft","markCoverage","baseGlyphIndex","baseIndex","baseCoverage","markRecord","markArray","baseAnchor","baseArray","applyAnchor","ligIndex","ligatureCoverage","ligAttach","ligatureArray","markGlyph","ligGlyph","compIndex","mark1Index","mark1Coverage","prevIndex","good","mark2Index","mark2Coverage","mark1Array","mark2Array","baseCoords","markCoords","markAnchor","markPos","anchor","xCoordinate","yCoordinate","xDeviceTable","yDeviceTable","fixCursiveAttachment","fixMarkAttachment","OTLayoutEngine","glyphInfos","setup","Shapers","glyphInfo","zeroMarkAdvances","cleanup","LayoutEngine","unicodeLayoutEngine","kernProcessor","layout","glyphsForString","hideDefaultIgnorables","positioned","space","isDefaultIgnorable","ch","plane","SVG_COMMANDS","Path","commands","_bbox","_cbox","toFunction","forEach","command","toSVG","cmds","round","join","mapPoints","path","transform","m0","m1","m2","m3","m4","m5","translate","rotate","angle","cos","sin","scale","scaleX","scaleY","cx","cy","p0","p1","p2","p3","qp1x","qp1y","p3x","p3y","cp1x","cp1y","cp2x","cp2y","b2ac","t1","sqrt","t2","Glyph","_getPath","_getCBox","_getBBox","_getTableMetrics","metrics","metric","advance","bearings","_getMetrics","_metrics","leftBearing","bearing","advanceHeight","topBearing","os2","typoAscender","typoDescender","ascent","descent","getAdvanceAdjustment","getScaledPath","_getName","StandardNames","glyphNameIndex","names","fromCharCode","render","save","fill","restore","GlyfHeader","ON_CURVE","X_SHORT_VECTOR","Y_SHORT_VECTOR","REPEAT","SAME_X","SAME_Y","ARG_1_AND_2_ARE_WORDS","WE_HAVE_A_SCALE","MORE_COMPONENTS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_TWO_BY_TWO","WE_HAVE_INSTRUCTIONS","Point","onCurve","endContour","Component","dx","dy","scale01","scale10","TTFGlyph","internal","_getTableStream","xMin","yMin","xMax","yMax","_parseGlyphCoord","short","same","_decode","glyfPos","nextPos","numberOfContours","_decodeSimple","_decodeComposite","points","endPtsOfContours","instructions","numCoords","flag","point","px","py","_getPhantomPoints","transformPoints","phantomPoints","haveInstructions","gPos","readInt8","_getContours","contours","contour","directory","firstPt","lastPt","curvePt","moveTo","pt","prevPt","lineTo","midX","midY","quadraticCurveTo","closePath","CFFGlyph","CFF2","bias","cff","trans","nStems","usedGsubrs","usedSubrs","_usedGsubrs","_usedSubrs","gsubrs","globalSubrIndex","gsubrsBias","privateDict","subrs","Subrs","subrsBias","vstore","vsindex","checkWidth","shift","nominalWidthX","parseStems","parse","phase","c1x","c1y","c2x","c2y","bezierCurveTo","subr","blendVector","getBlendVector","numOperands","sum","s1","s2","v1","v2","random","n","c3x","c3y","c4x","c4y","c5x","c5y","c6x","c6y","pts","startx","starty","b1","SBIXImage","buflen","SBIXGlyph","getImageForSize","imageTables","ppem","imageOffsets","img","image","data","originX","originY","renderOutlines","COLRLayer","color","COLRGlyph","layers","layer","fillColor","red","green","blue","alpha","cpal","colr","baseGlyphRecord","rec","baseLayer","_getBaseGlyph","firstLayerIndex","numLayers","layerRecords","colorRecords","paletteIndex","TUPLES_SHARE_POINT_NUMBERS","TUPLE_COUNT_MASK","EMBEDDED_TUPLE_COORD","INTERMEDIATE_TUPLE","PRIVATE_POINT_NUMBERS","TUPLE_INDEX_MASK","POINTS_ARE_WORDS","POINT_RUN_COUNT_MASK","DELTAS_ARE_ZERO","DELTAS_ARE_WORDS","DELTA_RUN_COUNT_MASK","GlyphVariationProcessor","normalizeCoords","blendVectors","normalized","axis","defaultValue","minValue","maxValue","correspondence","fromCoord","toCoord","glyphPoints","tupleCount","offsetToData","here","sharedPoints","decodePoints","origPoints","tupleDataSize","tupleIndex","tupleCoords","globalCoordCount","globalCoords","startCoords","endCoords","factor","tupleFactor","nPoints","xDeltas","decodeDeltas","yDeltas","outPoints","hasDelta","interpolateMissingDeltas","deltaX","deltaY","Uint16Array","run","runCount","readUInt16","deltas","Int16Array","inPoints","firstPoint","endPoint","firstDelta","curDelta","deltaInterpolate","deltaShift","ref1","ref2","iterable","in1","in2","out1","out2","out","ref","outerIndex","innerIndex","advanceWidthMapping","mapCount","mapData","itemStore","itemVariationData","varData","deltaSets","deltaSet","netAdjustment","master","scalar","regionIndex","regionIndexes","axes","variationRegionList","variationRegions","axisScalar","startCoord","peakCoord","endCoord","resolved","resolve","Subset","mapping","includeGlyph","encodeStream","EncodeStream","then","Glyf","TTFGlyphEncoder","encodeSimple","xPoints","yPoints","lastX","lastY","lastFlag","pointCount","_encodePoint","shortFlag","sameFlag","diff","TTFSubset","glyphEncoder","_addGlyph","curOffset","nextOffset","cloneDeep","indexToLocFormat","CFFSubset","subsetCharstrings","charstrings","subsetSubrs","used","subsetFontdict","used_fds","used_subrs","FontName","createCIDFontdict","addString","Encoding","CIDCount","header","TTFFont","toString","variationCoords","_directoryPos","_tables","_glyphs","_decodeDirectory","_getTable","_decodeTable","error","getName","nextState","createSubset","getVariation","settings","namedVariations","axisTag","trim","lineGap","underlinePosition","underlineThickness","italicAngle","capHeight","xHeight","instance","WOFFDirectoryEntry","WOFFDirectory","WOFFFont","compLength","outBuffer","inflate","WOFF2Glyph","_transformedGlyphs","Base128","knownTags","WOFF2DirectoryEntry","customTag","transformVersion","transformed","WOFF2Directory","WOFF2Font","_dataPos","_decompress","_decompressed","totalCompressedSize","decompressedSize","transformLength","decompressed","brotli","_transformGlyfTable","GlyfTable","nContours","totalPoints","read255UInt16","decodeTriplet","instructionSize","composites","Substream","_buf","WORD_CODE","ONE_MORE_BYTE_CODE2","ONE_MORE_BYTE_CODE1","LOWEST_U_CODE","withSign","baseval","b0","b2","TTCHeader","TrueTypeCollection","readString","fonts","DFontName","DFontData","Ref","Type","maxTypeIndex","TypeList","DFontMap","DFontHeader","DFont","typeList","refList","nameOffset","nameListOffset","sfnt","dataOffset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAMA,KAAKC,QAAQ,IAAR,CAAX;;AAEA,IAAIC,UAAU,EAAd;AACA,AAEAA,QAAQC,SAAR,GAAoB,KAApB;;AAEA,IAAIC,UAAU,EAAd;AACAF,QAAQG,cAAR,GAAyB,UAASC,MAAT,EAAiB;UAChCC,IAAR,CAAaD,MAAb;CADF;;AAIAJ,QAAQM,QAAR,GAAmB,UAASC,QAAT,EAAmBC,cAAnB,EAAmC;MAChDC,SAASX,GAAGY,YAAH,CAAgBH,QAAhB,CAAb;SACOP,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAP;CAFF;;AAKAR,QAAQY,IAAR,GAAe,UAASL,QAAT,EAAmBC,cAAnB,EAAmCK,QAAnC,EAA6C;MACtD,OAAOL,cAAP,KAA0B,UAA9B,EAA0C;eAC7BA,cAAX;qBACiB,IAAjB;;;KAGCM,QAAH,CAAYP,QAAZ,EAAsB,UAASQ,GAAT,EAAcN,MAAd,EAAsB;QACtCM,GAAJ,EAAS;aAASF,SAASE,GAAT,CAAP;;;QAEP;UACEC,OAAOhB,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAX;KADF,CAEE,OAAOS,CAAP,EAAU;aACHJ,SAASI,CAAT,CAAP;;;WAGKJ,SAAS,IAAT,EAAeG,IAAf,CAAP;GATF;;;CANF;;AAqBAhB,QAAQW,MAAR,GAAiB,UAASF,MAAT,EAAiBD,cAAjB,EAAiC;OAC3C,IAAIU,IAAI,CAAb,EAAgBA,IAAIhB,QAAQiB,MAA5B,EAAoCD,GAApC,EA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