
Attach (recommended) or Link to PDF file here:
[NAPEN16171380959.pdf](https://github.com/mozilla/pdf.js/files/6143802/NAPEN16171380959.pdf)

Configuration:
- Web browser and its version: Firefox 88 Nightly
- Operating system and its version: Windows 10
- PDF.js version:
- Is a browser extension: No

What went wrong? (add screenshot)
![](https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2021-03-15-10-58-27-ce2796.png)


const numGlyphs = font.getUint16();
      
      let numGlyphsOut = numGlyphs + 1;
      let dupFirstEntry = true;
      if (numGlyphsOut > 0xffff) {
        dupFirstEntry = false;
        numGlyphsOut = numGlyphs;
        warn("Not enough space in glyfs to duplicate first glyph.");
      }
      var maxFunctionDefs = 0;
      var maxSizeOfInstructions = 0;
      if (version >= 0x00010000 && tables.maxp.length >= 22) {
        
        font.pos += 8;
        var maxZones = font.getUint16();
        if (maxZones > 2) {
          
          tables.maxp.data[14] = 0;
          tables.maxp.data[15] = 2;
        }
        font.pos += 4;
        maxFunctionDefs = font.getUint16();
        font.pos += 4;
        maxSizeOfInstructions = font.getUint16();
      }
      tables.maxp.data[4] = numGlyphsOut >> 8;
      tables.maxp.data[5] = numGlyphsOut & 255;
      var hintsValid = sanitizeTTPrograms(
        tables.fpgm,
        tables.prep,