How can I install system wide fonts?


#1

I remember in PC-BSD we could acomplish this by opening something called "Font installer, and it would give us an option to add personal fonts or system wide fonts.
Is there a way to accomplish this in Lumina?


#2

You will need to copy files manually and update the font cache from the terminal.

I can make a simple font installer for Lumina when I get the time.


#3

There’s also a section in the TrueOS handbook about installing fonts.

I kind of disagree with them about the advice on installing your own fonts; that is, the suggestion of putting them into /usr/local/share/fonts by default. In that case, will get obliterated during an upgrade since it creates a new boot environment, and you will have to copy them in again. If you are going to do that, make a ZFS dataset (e.g. myfonts) that mounts at /usr/local/share/fonts/myfonts. That way those fonts don’t disappear between upgrades.

Another way would be to make a local port that copies your fonts in, but you would still have to install it after every upgrade.

Anyway, there’s more than one way to get fonts system wide.


#4

As long as your font names don’t overlap any system installed fonts, they should not get overwritten on an upgrade (I don’t believe). I routinely disable dbus and a few others by renaming the executable in /usr/local/bin and after an upgrade my renamed executable is still in /usr/local/bin. Non overlapping names of fonts should do the same thing.


#5

Hmm. OK. I just remember back in the PC-BSD days that after copying all my fonts into /usr/local/share/fonts they would be gone after an upgrade and I would have to copy them over again. I was still new to zfs, boot environments, and upgrades. So, I can’t rule out that I might have been doing something wrong, or a maybe a misbehaved package just nuked my directory when it was cleaning everything else out and now that doesn’t happen. I stopped investigating when I realized that I actually just wanted these fonts for the local user and not system-wide.


#6

Per the hand book:

directory. Then, run fc-cache -f -v /usr/local/share/fonts/name_of_font to refresh the fonts cache.

What if I have a folder with a thousand fonts?.. Entering the name of each font 1000 times could be a tedious task.


#7

You run fc-cache on folders, not individual files. So just run fc-cache on /usr/local/share/fonts (remember to run command as root or else you will only update the cache for your user).


#8