I am reviving this old topic as it is applicable to “Installing new fonts in Collabora” and I could not find a solution to my problem on the NextCloud forums.
I attempted to add my own fonts on a non-docker server as well and ran into an issue similar to that is mentioned here (also described in the next paragraph).
Where fonts were displayed in the drop down list of fonts to choose form in Collabora, but they didn’t actually appear on the document, even though the text was still there it was not actually visible.
It took me a few hours but I solved it and I posted my solution at the above link, but I will also post it in here since I have nothing to do with the nethserver community and I originally searched for the answer here but could not find it.
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 like so, ensuring all were world readable:
ls -al /usr/share/fonts/truetype/
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
drwxr-xr-x 2 root root 4096 Apr 14 14:34 verdana
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"
And finally
systemctl restart loolwsd
Hopefully this works as well for others as it did for me.