<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - font substitution fails if font name contains a dash"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75178">75178</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>fontconfig-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>font substitution fails if font name contains a dash
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>freedesktop@behdad.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>blocker
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>joachim.schwender@web.de
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

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

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

        <tr>
          <th>Component</th>
          <td>library
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>fontconfig
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=94316" name="attach_94316" title="Example PDF wit such a font that is not embedded and gets not substituted properly">attachment 94316</a> <a href="attachment.cgi?id=94316&action=edit" title="Example PDF wit such a font that is not embedded and gets not substituted properly">[details]</a></span>
Example PDF wit such a font that is not embedded and gets not substituted
properly

I have PDF that contain a font named Code-128, not embedded. Just installing
this font does not help: it is not picked properly and evince uses DejaVu for
rendering, which is bad for a barcode font!
A fc-list does show the installed font. A fc-match does not work and always
returns "DejaVu Sans" "Book"

Expected: fontconfig picks the installed font and uses it for rendering in
evince. fc-match returns the font name it it matches, no matter what character
is contained in the name.

Tested on Ubuntu 12.04 and 13.10 (x86_64) with fonconfig 2.10.93

Temprary workaround i currently use:
I used fontforge to change the font by removing the dash in the font name. Then
i implemented a substitution for Code-128 to be substituted by Code128.

Result: evince displayed the font properly but fc-match still does not work.

Unfortunately i have no influence on the PDF generation, they are generated by
a German Ministry of Interior and i have been struggling for three years now to
get them to create only PDF-A (fonts embedded), but they refuse to implement
that without giving meaningful arguments. We, like many other companies are
forced(!) to utilize these buggy PDFs, probably most companies use
Windows+AdobeReader and don't have that problem...</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>