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.

baseFontCharCode,
            accentFontCharCode,
            accentOffset,
          };
        }
      }
      properties.seacMap = seacMap;
    }
    const unitsPerEm = 1 / (properties.fontMatrix || FONT_IDENTITY_MATRIX)[0];
    const builder = new OpenTypeFileBuilder("\x4F\x54\x54\x4F");
    
    builder.addTable("CFF ", font.data);
    
    builder.addTable("OS/2", createOS2Table(properties, newCharCodeToGlyphId));
    
    builder.addTable("cmap", createCmapTable(newCharCodeToGlyphId, numGlyphs));
    
    builder.addTable(
      "head",
      "\x00\x01\x00\x00" + 
        "\x00\x00\x10\x00" + 
        "\x00\x00\x00\x00" + 
        "\x5F\x0F\x3C\xF5" + 
        "\x00\x00" + 
        safeString16(unitsPerEm) + 
        "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + 
        "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + 
        "\x00\x00" + 
        safeString16(properties.descent) + 
        "\x0F\xFF" +