Fonts unavailable in LO, available in other apps

Running LibreOffice 6.0.7.3 on ubuntu 18.04. I have several fonts which are not available in LibreOffice, but are available in other applications, for example I copied a bunch of fonts from my Windows partition to ~/.fonts. All Calibri fonts are available in Emacs, but not in LibreOffice. Calibri {Regular, Light, Light Italic} available in both Emacs and LO, while Emacs has additionally Calibri Bold. Similarly with Arial: only Arial regular and Arial Black are available in LibreOffice, while Emacs can see much more: Arial {Regular, Black, Bold, Bold Italic, Italic, Black Black, Black Italic, Black Bold Italic}. Some of these are apparently different styles residing in the same ttf files, but some are independent ttf files.

This is a problem, because when modifying large existing powerpoint files, thousands of components use substitute fonts which don’t fit properly on the slides; changing everything by hand would be days of work.

Here are the calibri fonts known on my system:

$ fc-list |grep -i calibri|sort
/home/user1/.fonts/calibri.ttf: Calibri:style=Regular
/home/user1/.fonts/calibrib.ttf: Calibri:style=Bold
/home/user1/.fonts/calibrii.ttf: Calibri:style=Italic
/home/user1/.fonts/calibril.ttf: Calibri,Calibri Light:style=Light,Regular
/home/user1/.fonts/calibrili.ttf: Calibri,Calibri Light,Calibri Light Italic:style=Light Italic,Italic
/home/user1/.fonts/calibriz.ttf: Calibri:style=Bold Italic

“This is a problem, because when modifying large existing powerpoint files, thousands of components use substitute fonts which don’t fit properly on the slides; changing everything by hand would be days of work.”

That is the main reason, why it is better to use the native ODF file formats and the most valuable feature odf the LibreOffice: the Styles. When you format a document by usage the Styles, then you not needed to change a property of the objects one-by-one. It is enough to change the property in the applied Style: then all object will be modified wich was formatted with the specific Style.

It might be more convenient to copy the fonts not to a local user directory, but install them for all users on the system. A manual for this can be found here.

That said: I’ve read that under Linux LibreOffice checks ~/.local/share/fonts, not ~/.fonts. Might be worth making that directory, or if you like the current location better, make a symlink under ~/.local/share to your ~/.fonts directory.

It depends on the Linux distro

There are basically two places where fonts should be stored in (x)Ubuntu:

For global fonts:

/usr/share/fonts

For user fonts:

$HOME/.local/share/fonts

You can place them somewhere else, but I see no reason to. It’s highly recommended to make a subdirectory for each font, eg, Arial where the individual .TTF files are stored. This will help you manage your fonts. You can even make a font directory tree if you want.

Now to your immediate issue: I suspect incorrect access rights, and that your font cache is not up to date.

Access right for global fonts: 755 root:root for the font directories, 644 root:root for the font files.

Access rights for user fonts: same, but user : user instead of root:root.

When this has been done correctly, run the command:

sudo fc-cache -f -v

logout and login, then it should work.