Adding fonts to NC+Collabora - Multiple options?

Forgive my ignorance…just getting Collabora working! :slight_smile:

I see in the Office settings for Nextcloud, I can add custom fonts, but then it says to add a URL to the Collabora config xml. But it doesn’t allude to how I do this. Like where does this URL go within the file. I can’t very well just paste it at the bottom of the file.
While googling for how this is done, I see that there are multiple ways depending on the setup you have. For me, that’s separate NC and Collabora containers. So I see I can just add fonts directly to Collabora and not upload to Nextcloud and then use the URL method…I think.
Can I just set up a volume on the Collabora container like this?

/mnt/user/appdata/collabora/fonts/truetype/:/opt/collaboraoffice/share/fonts/truetype/local/:ro

Obviously, I would copy the contents of the container to that host location first then add that volume to the container and then I can dump fonts in that folder? Does that make them available when I use Collabora in Nextcloud?

Or should I figure out the Nextcloud upload and how to add the URL to Collabora?

Thanks!
Matt

The Remote Font support needs to be enabled in your coolwsd.xml or (equivalent) provided via options to the CODE container in your Docker Compose file:

Font config: Configuration — SDK https://sdk.collaboraonline.com/ documentation

Docker config: https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html#how-to-configure-docker-image

1 Like

I see. I went see font config route. Added the URL supplied by Nextcloud to the xml inside the <remote_font_config> section. I then restarted Collabora and added fonts on Nextcloud.

Does Collabora need to be restarted each time I upload new fonts?

The editor is also showing one out of 3 type faces I uploaded. Uploaded a narrow, regular, and black (ultra bold) Futura and I just get the regular (with bold and italics).

No.
It looks for updates once in a minute:

# grep fonts.json /var/log/apache2/access.log | tail -n 10
192.168.189.1 - - [20/Aug/2024:15:25:20 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4683 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:26:20 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4681 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:27:20 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4677 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:28:21 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4681 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:29:21 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4679 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:30:21 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4677 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:31:21 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4689 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:32:22 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4689 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:33:22 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4681 "-" "COOLWSD HTTP Agent 24.04.6.1"
192.168.189.1 - - [20/Aug/2024:15:34:22 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 4681 "-" "COOLWSD HTTP Agent 24.04.6.1"

ernolf

1 Like

Thanks! Figured that out after tinkering with it a bit.

Ended up using the container volume method to map a host folder and add fonts to that rather than the Nextcloud upload. Much faster to dump a bunch of fonts in there than uploading one at a time.

Thanks!

1 Like