I’m not part of the nethserver community really but I do run a “custom” Collabora Nextcloud setup of my own. Everything manually installed (not using Docker).
I ran into the exact same issue as above, copied fonts to: /usr/share/fonts/truetype
, fc-cache
, restart loolwsd and - the fonts show up and are selectable in the list for LibreOffice but are “invisible” when displayed on the document.
I discovered an actual repeatable solution though which makes the fonts work with a few extra steps, no waiting on an update or server reboots or anything.
So … here’s what I’ve done:
Installed five additional custom fonts.
Four of which are copied straight from the Windows 10 Fonts folder (Arial, Calibri, Consolas, Verdana)
One from Google Fonts (Roboto); downloaded directly from fonts.google(.com) as a zip file
Uploaded them all to the server manually (SFTP) and placed each font set in their own respective folders - ensuring all were world readable;
ls -al /usr/share/fonts/truetype/
total 40
drwxr-xr-x 9 root root 4096 Apr 14 14:41 .
drwxr-xr-x 4 root root 4096 Apr 14 14:33 …
drwxr-xr-x 2 root root 4096 Apr 14 14:34 arial
drwxr-xr-x 2 root root 4096 Apr 14 14:34 calibri
drwxr-xr-x 2 root root 4096 Apr 14 14:34 consolas
drwxr-xr-x 2 root root 4096 Apr 14 14:34 dejavu
drwxr-xr-x 2 root root 4096 Apr 14 14:34 lato
drwxr-xr-x 2 root root 4096 Apr 14 14:34 roboto
-rw-r–r-- 1 root root 36 Dec 18 10:05 .uuid
drwxr-xr-x 2 root root 4096 Apr 14 14:34 verdana
There is only 2 additional steps which seem to be required over those mentioned in previous posts to make these work, which I can only assume some of which occurred automatically with @danb35 when he installed updates.
Copy all fonts to the following folders
/usr/share/fonts/truetype
/opt/lool/systemplate/usr/share/fonts/truetype
Run
fc-cache
Now this next command - you have to make sure that you adjust the version number to the one matching your Collabora installation for this folder: /opt/collaboraoffice6.2
Run AS ROOT (or just execute the actual command as the lool user)
su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice6.2 >/dev/null 2>&1"
I suspect the above command is really the one you need over all else as this is automatically executed each time you install system updates using APT.
And finally
systemctl restart loolwsd
Hopefully this works as well for others as it did for me.