[Fontconfig-bugs] [Bug 75178] font substitution fails if font name contains a dash
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 18 19:19:23 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=75178
Akira TAGOH <akira at tagoh.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |akira at tagoh.org
--- Comment #2 from Akira TAGOH <akira at tagoh.org> ---
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 comment #0)
> Created attachment 94316 [details]
> 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.
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20140219/cd87217b/attachment.html>
More information about the Fontconfig-bugs
mailing list