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

Configuration:
- Web browser and its version: Chrome, Firefox
- Operating system and its version: all
- PDF.js version: various versions, including 2.11.54
- Is a browser extension: no

Screenshot with visible textLayer:
![Screenshot from 2021-08-02 13-05-03](https://user-images.githubusercontent.com/6362989/127844878-f85e291f-2060-4028-be09-7835f32ccfaa.png)

Which means some letters at the beginning/end of text selection are missing when copying text.

const accentGlyphName = StandardEncoding[seac[3]];
        const baseGlyphId = charset.indexOf(baseGlyphName);
        const accentGlyphId = charset.indexOf(accentGlyphName);
        if (baseGlyphId < 0 || accentGlyphId < 0) {
          continue;
        }
        const accentOffset = {
          x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
          y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5],
        };
        const charCodes = getCharCodes(mapping, glyphId);
        if (!charCodes) {
          
          
          continue;
        }
        for (let i = 0, ii = charCodes.length; i < ii; i++) {
          const charCode = charCodes[i];
          
          
          const charCodeToGlyphId = newMapping.charCodeToGlyphId;
          const baseFontCharCode = createCharCode(
            charCodeToGlyphId,
            baseGlyphId
          );
          const accentFontCharCode = createCharCode(
            charCodeToGlyphId,
            accentGlyphId
          );
          seacMap[charCode] = {