You are not logged in.

#1 2021-01-21 10:49:41

millus
Member
Registered: 2019-07-21
Posts: 204

Cannot install bitmap font

I have a .pcf font to install.
Formerly you would have to do

sudo rm /etc/fonts/conf.d/@70-no-bitmaps.conf
sudo fc-cache -fv

but it seems nowadays this is deprecated because the pango package itself no longer allows pcf fonts.
So now you have to convert pcf to otb.
I used fonttosfnt (https://gitlab.freedesktop.org/xorg/app/fonttosfnt). This is also in the AUR but it complains about missing keys and cancels installation, so I went with compiling the git version instead.
Now conversion seems to have worked, I only got a warning

$ fonttosfnt -o durhan.otb durhan.pcf
font file durhan.pcf is of format PCF.
It's recommended to convert directly from a BDF font.
Some font properties may get lost when converting via a PCF font.

So far so good. Now I'm checking which folders currently are registered to hold fonts:

$ xset -q | grep fonts
  /usr/share/fonts/TTF,/usr/share/fonts/OTF,/usr/share/fonts/Type1,/usr/share/fonts/100dpi,/usr/share/fonts/75dpi,built-ins,/usr/share/fonts/misc

Fine, so I put the durhan.otb file into /usr/share/fonts/misc, make sure it's root/root and has 100644 permissions (same as all the other fonts), and run inside /usr/share/fonts/misc:

fc-cache
sudo mkfontscale
sudo mkfontdir
xset fp rehash

But it doesn't really add this font. It IS listed in the fonts.dir file (after running mkfontdir) but "xlsfonts | grep durhan" returns nothing.
How can I add this otb font so the system recognizes it?

Last edited by millus (2021-01-21 11:35:27)

Offline

#2 2021-01-21 10:59:07

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: Cannot install bitmap font

This should all be documented in the wiki:

https://wiki.archlinux.org/index.php/Ar … hould_I_do?

https://wiki.archlinux.org/index.php/Fonts#Installation

https://wiki.archlinux.org/index.php/X_ … earch_path

If you want to use the bitmap font with X11 applications that do not use pango / fontconfig, then the pcf format is perfectly fine and might even be required.

Last edited by progandy (2021-01-21 11:06:57)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2021-01-21 11:17:20

millus
Member
Registered: 2019-07-21
Posts: 204

Re: Cannot install bitmap font

Yeah, I did all of that, minus the fc-cache. I added that now, but unfortunately it didn't make a difference.
The steps in my OP now reflect exactly the instructions from the wiki. But..

xlsfonts | grep durhan

as specified in the wiki to check that it was installed still returns empty line.

Last edited by millus (2021-01-21 11:19:00)

Offline

#4 2021-01-21 11:36:49

progandy
Member
Registered: 2012-05-17
Posts: 5,192

Re: Cannot install bitmap font

fc-list or fc-match should show the otb font.

xlsfont might not support otb fonts, so it is possible you have to use the pcf font for that.

Last edited by progandy (2021-01-21 11:37:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2021-01-21 22:43:16

millus
Member
Registered: 2019-07-21
Posts: 204

Re: Cannot install bitmap font

Oh indeed, fc-list can actually see them, xlsfonts cannot. So I'm going with the original pcf fonts AND the otb conversions I guess, so pango stuff can still see them too (otb). Geez this is some mess. hmm
Thanks!

Last edited by millus (2021-01-21 22:43:59)

Offline

Board footer

Powered by FluxBB