Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

[UNSOLVED] Where do I set the font path?

Started by PelleB, January 05, 2021, 09:15:56 PM

Previous topic - Next topic

PelleB

Hello all,

I need to add a directory to the font path but despite searching for quite some time, I could not figure out where (in which file) the font path is set.

bin

If fonts are added to the normal locations of either ~/.fonts or /usr/share/fonts then they'll be picked up automatically. Alternatively you can run sudo fc-cache -v
To save a lot of guesswork please explain the background to your question.

PelleB

QuoteTo save a lot of guesswork please explain the background to your question.

I want to use some bitmap fonts from the sgifonts package (Freebsd, Opensuse etc) and have them in their own subdirectory, which has to be added to the fontpath, or else xorg can not find them. This could be made in xorg.conf or by adding symlinks to /etc/X11/fontpath.d but these are missing here. xset +fp works, but is more for temporary changes.

The output of xset -q is:
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins

bin

My initial reaction is to just put them in with the /usr/share/fonts/X11/misc fonts.

However if for some reason you want them in a totally different location, why not just try a custom /etc/X11/xorg.conf


Section "Files"
    FontPath    "/location_of_the_fonts"
EndSection

PelleB

QuoteMy initial reaction is to just put them in with the /usr/share/fonts/X11/misc fonts.

I did that, it works but it is probably not the way it should be done.

QuoteHowever if for some reason you want them in a totally different location, why not just try a custom /etc/X11/xorg.conf

I tried that first, it made the x-server crash at startup even before I had added anything about font paths. I did not plan to place the fonts in a totally different location, just a different subdirectory, which still makes it necessary to add the path somewhere.

bin

Hmmm - OK, you could just put them in a folder in your ~/.fonts folder

If it's just for an application you use then that will work.

However, there's nothing *wrong* with dropping extra fonts into the X11 fonts - they're just fonts after all.

PelleB

~/.fonts is deprecated (say some configuration files)

Anyway, I will stay with the working solution and stop worrying about how it should be done. I use the fonts for some older apps not understanding unicode, including some windowmanagers and CDE.

Thanks for trying to help me!

View the most recent posts on the forum