https://github.com/mozilla/pdf.js/issues/6397#issuecomment-164954332 Would have been a lot easier to find had there been an assertion checking that string16 didn't go out of bounds of the 16bit number.

const isNarrow = name.search(/Narrow/g) !== -1;
    
    this.remeasure =
      (!isStandardFont || isNarrow) && Object.keys(this.widths).length > 0;
    if (
      (isStandardFont || isMappedToStandardFont) &&
      type === "CIDFontType2" &&
      this.cidEncoding.startsWith("Identity-")
    ) {
      const GlyphMapForStandardFonts = getGlyphMapForStandardFonts(),
        cidToGidMap = properties.cidToGidMap;
      
      
      const map = [];
      for (const charCode in GlyphMapForStandardFonts) {
        map[+charCode] = GlyphMapForStandardFonts[charCode];
      }
      if (/Arial-?Black/i.test(name)) {
        const SupplementalGlyphMapForArialBlack =
          getSupplementalGlyphMapForArialBlack();
        for (const charCode in SupplementalGlyphMapForArialBlack) {
          map[+charCode] = SupplementalGlyphMapForArialBlack[charCode];
        }
      } else if (/Calibri/i.test(name)) {
        const SupplementalGlyphMapForCalibri =
          getSupplementalGlyphMapForCalibri();
        for (const charCode in SupplementalGlyphMapForCalibri) {
          map[+charCode] = SupplementalGlyphMapForCalibri[charCode];