-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support sharing host fonts with toolbox #1594
Comments
Yes, indeed. I don't know enough about fonts, so I never tried this on my own.
Is it noticeably slower if the font information cache is absent? Where does the cache live? The Are the formats of the font files and the cache stable enough to be mixed and matched across the host and containers? If they are stable enough, maybe we can bind mount What do you think?
They are doing a bind mount instead of a symbolic link, but it's the same thing for the purposes of this issue. |
Not to me. There may be a small start-up delay for GUI apps the first time? The other discrepancy is missing /etc/fonts/conf.d/ files from the host. I believe the default system cache is in I think potential problems with sharing the fontconfig cache include:
In theory something could be done for these perhaps - though it may require non-trivial changes on the fontconfig side. Anyway @tagoh is the expert here, I am just sharing my limited experience on this. |
Thanks for bringing up Flatpak. It is always a good data point. How do fonts work in Flatpaks? Do the Flatpak containers have their own fonts, presumably through the runtime? Or are the fonts shared with the host? I didn't know about I think I don't know how fonts work and that's preventing me from imagining all the possibilities. Maybe we can work out the use-cases around fonts? I can imagine that most users who are not font developers will be happy to have the fonts shared with the host. What about font developers? Will it somehow get in their way? If we do bind mount the host's |
Is your feature request related to a problem? Please describe.
It would be cool to have a consistent way to use host fonts from within toolbox.
Describe the solution you'd like
I may be tricky to find a general consistent approach, though what I personally do
is for Fedora toolboxes (on Fedora):
sudo ln -s /run/host/usr/share/fonts /usr/local/share/
without running fc-cache.
Though apparently bad things can happen with this for Silverblue with fc-cache due to the timestamps.
FWIW, distrobox-init seems to do something like this:
https://github.com/89luca89/distrobox/blob/18053c254a83750c49c08e58df2e48a0f04aef48/distrobox-init#L2007
The text was updated successfully, but these errors were encountered: