Query for unknown font with spacing=mono returns sans-serif font

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Some PDFs use monspaced fonts but do not embed them. The german bank
"Volksbank" is one of those (they use "RFont0" up to "RFont8", and
their meaning is different from file to file, i.e. RFont3 may be
monospaced in one file, but normal spaced in the next. So no hard
mapping possible here).

poppler queries fontconfig, by setting the name
and the spacing=mono flag.
Unfortunately, fontconfig returns the default sans-serif font (On
Debian unstable and Ubuntu 20.04):

> $ fc-match RFont3:spacing=mono
> DejaVuSans.ttf: "DejaVu Sans" "Book"

Shouldn't fontconfig return a monospaced font if an unknown font name
is requested and the mono spacing flag is set?

I managed to fix that with the following user configuration:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    <match target="pattern">
     <test name="spacing">
     <edit name="family" mode="prepend">

> $ fc-match RFont3:spacing=mono
> DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

But I think that I should not need to do that manually.

There is an issue about "CourierStd" which was solved by adding an alias
from CourierStd to Courier, but which also would be solved by
respecting the monospace flag as shown above.

Should I open a bug report?
If yes, on https://gitlab.freedesktop.org/fontconfig/fontconfig/
or is this more a distribution problem, and I should report this to

Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux