Install TrueType fonts as a user?

Hi,

I’ve been managing Linux desktop installations for clients for the last 20 years or so. Sometimes (like once every couple years) a user asks me to install some custom TrueType fonts, usually some .ttf files downloaded for free from the website.

Normally it’s not a problem to install these using either the root account or sudo. Just put the font files somewhere under /usr/share/fonts and then run fc-cache -f -v, and that’s it. Problem is, my users don’t have root rights and they’re not allowed to use sudo either.

Is there a way folks can install TrueType fonts as mere mortal users ?

Cheers,

Niki

Hi,

Should work in:-

~/.local/share/fonts

Regards Tom.

1 Like

And then run fc-cache as a normal user ?

I am not particularly knowledgeable about this aspect of Rocky, but web search leads me to this question:

Since you mention “users” do these TTF fonts need to be available SYSTEM-WIDE, or just for a PARTICULAR USER? Because, and I am quoting here, from the web:

*** System-wide installation**: Requires root or sudo access.

*** User-specific installation**: No special permissions needed; fonts are installed in the user’s home directory.

My sense is that in answer to your question, “can folks can install TrueType fonts as mere mortal users” for THEMSELVES, just not system-wide, would that be accurate?

if so, the web suggests these four steps:

  1. mkdir -p ~/.fonts
  2. cp /path/to/your/fonts/*.ttf ~/.fonts/
  3. fc-cache -f -v
  4. fc-list | grep “FontName”

Tony

1 Like

Hi,

I believe so.

Edit: Tested and it works as expected.

Regards Tom.

Is it even necessary to run fc-cache after installing a font in the local fonts directory?

I haven’t tried it lately but I don’t remember doing that the last time I installed a local font. I’m pretty sure I just put the ttf file into the directory and the job was done.