~/.fonts directory does not work.

Where should I put those fonts ?
Or how to set fonts search path ?

Thanks

I think you have to update the font cache after you add a new font (https://wiki.archlinux.org/index.php/fonts#Manual_installation)

fc-cache -vf

thanks

I do ‘sudo fc-cache -vf’ before , and find that ‘sudo fc-cache -vf’ does not search ~/.fonts .
‘fc-cache -vf’ does search ~/.fonts.

Where, what???

You allways first tell which version of openSUSE you use. And which desktop environment.

Then you describe your problem. A good problems description has three things:

  • what did you do;
  • what did you expect to happen
  • what happened instead.

And of course always keep in mind: tell us what your goal is and not only the step where you got stuck in reaching that goal.

Of course.
If you run it as root it generates the system-wide cache and the one for root.
You have to run it as user to generate the user’s font cache.

Btw, if you use KDE, you can also install fonts with KDE’s font-installer: Configure Desktop->Fonts Management.

Thanks . It is my fault.
I use 13.1 x86_64 gnome 3.10.
I want to know if I can put my fonts files in ~/.fonts directory.

Yes, of course.

If I click on a font in KDE and choose to install it for personal use, it is in fact copied to ~/.fonts/.

And if I copy a font to ~/.fonts/ manually, it is immediately visible in (newly started) KDE apps without doing anything else.

Not sure how GNOME works in this respect though…

PS: You can add directories that should be searched for fonts in ~/.config/fontconfig/fonts.conf (or /etc/fonts/local.conf)
Add something like this inside the <fontconfig></fontconfig> tags:

 <dir>~/.fonts</dir>

But ~/.fonts is specified in the global default configuration (/etc/fonts/fonts.conf) in 13.1, although there is a comment saying it will be removed in the future.

Thanks , this is what I want to know.