OnlyOffice adding font declaratively

This article tell us how to add new fonts in OnlyOffice, one of them is to put the fonts in the ~/.local/share/fonts, but the fonts must have permissions 644 (-rw-r--r--).

I can download the fonts and put the fonts in those folder but how to do that in declarative way? like included in configuration.nix or home.nix if using home-manager? Tried to create link in ~/.local/share/fonts point to /run/current-system/sw/share/X11/fonts but none of the fonts is detected in OnlyOffice.

They probably assume regular linux. Just make sure to put your fonts to $out/share/fonts, then font-cache should catch them up eventually after installing the package through environment.systemPackages/home.packages.

There is no reason at all for a font beeing writable by anyone.

Also, if the application doesn’t use font config to look up the fonts, but doing their own thing, that’s a bug, as it behaves different from all other programs in the Linux world.

Hosted by Flying Circus.