<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - UK tax form PDF has jumbled text"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104565#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - UK tax form PDF has jumbled text"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104565">bug 104565</a>
              from <span class="vcard"><a class="email" href="mailto:jason@inspiresomeone.us" title="Jason Crain <jason@inspiresomeone.us>"> <span class="fn">Jason Crain</span></a>
</span></b>
        <pre>CairoFontEngine.cc is caching fonts based on the indirect reference number and
generation under the assumption that they will be unique, but a font on page 2
and 3 are aliasing so it uses the wrong font.  Splash is probably doing
something similar.

Two different fonts have the same number and generation because these fonts
don't really have an indirect reference due to the way the way the PDF defines
the resources and font dictionaries:

7 0 obj
<<
  /Resources 8 0 R
  /Type /Page
  ... other page entries ...
<span class="quote">>></span >
endobj

8 0 obj
<<
  /Font <<
    /T1 <<
      ... font dictionary entries ...
    >>
  >>
<span class="quote">>></span >

The GfxFontDict constructor has code to generate a fake reference based on the
/Font dictionary's number but that doesn't work well in this PDF because the
Font dictionary doesn't have an indirect reference either.

This appears to be fixed in XPDF 4.00 because the GfxFontDict constructor now
includes code to generate the fake reference based on a hash instead.</pre>
        </div>
      </p>


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

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