<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pdftocairo -pdf adds adds characters"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105579">105579</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>pdftocairo -pdf adds adds characters
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>pdf backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>ajohnson@redneon.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jason@inspiresomeone.us
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=138181" name="attach_138181" title="anonymized.pdf">attachment 138181</a> <a href="attachment.cgi?id=138181&action=edit" title="anonymized.pdf">[details]</a></span>
anonymized.pdf

I received a file from gour on the poppler IRC. With recent versions of cairo,
printing with evince adds some characters to the document. I don't believe I'm
allowed to share the original file so I'm attaching this anonymized version.

This is reproducible through poppler's pdftocairo program. Running `pdftocairo
-pdf anonymized.pdf bad.pdf` produces a pdf that shows additional characters. I
traced the regression to this commit:

commit 495362279b42620071c6b46f69918ce324aee0db (refs/bisect/bad)
Author: Adrian Johnson <<a href="mailto:ajohnson@redneon.com">ajohnson@redneon.com</a>>
Date:   Sun Sep 27 08:27:53 2015 +0930

    scaled-font-subsets: if glyph 0 used for rendering, remap to different
index

    Some broken pdfs use glyph 0 in embedded fonts for rendering instead of
.notdef.
    The cmap we use for embedding latin fonts does not allow rendering glyph 0.
Ensure
    if glyph 0 is used, it is mapped to a non 0 glyph in the subset.

    <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Lots of spaces between words missing in printed document (and sometimes print preview)."
   href="show_bug.cgi?id=89082">Bug 89082</a>

This PDF includes a character mapped to glyph index 0. It's not supposed to be
visible in the document, but after `pdftocairo -pdf` conversion it is.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>