I was thinking about extending the content interface in the following way.
On classic, we could add a system-fonts plug (using the content interface) using a new attribute "classic": true, to convey the fact that it is a classic path that is being shared. It could then indicate that /usr/share/fonts is readable.
We could also extend the logic that decides if something is connectible to grant connections to such content exposed by the os snap (only on classic).
With this, all system fonts would be available easily. Snap-confine was patches a few releases ago, in anticipation of this feature, to allow the required bind mount so the change would be entirely inside snapd.
I was thinking about extending the content interface in the following way.
On classic, we could add a system-fonts plug (using the content interface) using a new attribute "classic": true, to convey the fact that it is a classic path that is being shared. It could then indicate that /usr/share/fonts is readable.
We could also extend the logic that decides if something is connectible to grant connections to such content exposed by the os snap (only on classic).
With this, all system fonts would be available easily. Snap-confine was patches a few releases ago, in anticipation of this feature, to allow the required bind mount so the change would be entirely inside snapd.