<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span> changed
<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">bug 75178</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>akira@tagoh.org
</td>
</tr></table>
<p>
<div>
<b><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#c2">Comment # 2</a>
on <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">bug 75178</a>
from <span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span></b>
<pre>I'm speaking without having a look at evince/poppler code - there are two ways
to ask for better font from applications. one is to use FcNameParse() with the
certain query string, one is to add any patterns to FcPattern directly. for
former one, the command line tools in fontconfig also uses, has a limitation in
its syntax. -,: is reserved characters. so if those characters are included in
a font name, it has to follow them with \ to escape. in this case, fc-match
Code\-128 should works if it is installed properly. later one should works
without it.
To demonstrate:
% fc-list -f "%{family}\n" | grep -- -
Emmentaler-11
Emmentaler-14
Emmentaler-13
Emmentaler-18
Emmentaler-Brace
Emmentaler-26
Emmentaler-20
Emmentaler-23
Emmentaler-16
[...]
% fc-match Emmentaler-11
emmentaler.ttf: "Emmentaler" "26"
% fc-match "Emmentaler\-11"
emmentaler-11.otf: "Emmentaler-11" "11"
Speaking of your issue:
(In reply to <a href="show_bug.cgi?id=75178#c0">comment #0</a>)
<span class="quote">> 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.</span >
Does it? that looks like the attached PDF requires the font named OCRABT
though.
That said you mentioned the workaround and works for you, something went wrong
on this report I guess. anyway, adding the following recipe works for the font
substitution:
<fontconfig>
<alias binding="strong">
<family>OCRABT</family>
<prefer><family>Code-128</family></prefer>
</alias>
</fontconfig>
Please let me know if you still have any issues or the above assumption was
wrong.</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>