I would like to have HelveticaLTStd-Bold
substituted with LiberationSans-Bold
font. It is already installed in many places:
but DejaVu Sans
is chosen instead:
paul@desktop:~$ fc-match "HelveticaLTStd-Bold"
DejaVuSans.ttf: "DejaVu Sans" "Book"
I followed the advice from PDF font falls back to DejaVu Sans, need a monospace replacement, but it didn't work. What is the solution?
I use Ubuntu 22.04.2 LTS x86_64. I checked that fonts-urw-base35
is installed. I created ~/.config/fontconfig/conf.d/10-pdf-aliases.conf
file with this contents:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "/etc/fonts/conf.d/fonts.dtd">
<fontconfig>
<alias binding="same">
<family>CourierStd</family>
<accept>
<family>Courier</family>
</accept>
</alias>
<alias>
<family>CourierStd</family>
<default><family>monospace</family></default>
</alias>
</fontconfig>
I've run fc-cache
and I'm still getting:
paul@desktop:~$ fc-match "HelveticaLTStd-Bold"
DejaVuSans.ttf: "DejaVu Sans" "Book"
I didn't notice a different font name in that configuration file. I edited it, and it solves my problem with Document Viewer. Unfortunately, Okular (installed with Flatpak) still uses DejaVu Sans
and produces this misformed kerning:
Here are the fonts used in this document:
Well, the other question helped deal with the
Courier Std
font while awaiting a fix upstream.To start with, try replacing this section:
with:
Result on my machine: