
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)


"The numOfMetrics (" +
              numOfMetrics +
              ") should not be " +
              "greater than the numGlyphs (" +
              numGlyphs +
              ")"
          );
          
          numOfMetrics = numGlyphs;
          header.data[34] = (numOfMetrics & 0xff00) >> 8;
          header.data[35] = numOfMetrics & 0x00ff;
        }
        var numOfSidebearings = numGlyphs - numOfMetrics;
        var numMissing =
          numOfSidebearings - ((metrics.length - numOfMetrics * 4) >> 1);
        if (numMissing > 0) {
          
          
          
          var entries = new Uint8Array(metrics.length + numMissing * 2);
          entries.set(metrics.data);
          if (dupFirstEntry) {
            
            entries[metrics.length] = metrics.data[2];
            entries[metrics.length + 1] = metrics.data[3];
          }
          metrics.data = entries;
        }
      }
      function sanitizeGlyph(