Evolution, WebKit and font rendering

Every once in a while I give evolution a try. It suits my needs very well except… the font rendering! As I have learned, there is some ugly font rendering because WebKit doesn’t like to be sandboxed and there is a workaround making user-specific font settings (~/.config/fontconfig), at least in Arch Linux. But that doesn’t fix the root cause, does it? And I wonder why there seem to be so few people facing this problem. As soon as I’ve installed the Segoe UI font and getting an email from Outlook, I see the ugly font rendering. Can anyone else confirm this?

Example:
Bildschirmfoto von 2021-06-22 10-37-34

WebKit implements its own web process sandbox. Under flatpak, it uses flaptak-spawn subsandboxes.

When running outside flatpak, the code for binding fontconfig configuration is here. If you store configuration outside of those locations, it will not be available inside the sandbox.

Well, I’m running Arch Linux (no flatpaks) and all the font configuration is under /etc/fonts. There, in conf.d, symlinks point to /usr/share/fontconfig/…. That’s the standard Arch way.

All of /etc and /usr/share are mounted in WebKit’s sandbox.

Thanks, that is good to know. But it makes me wonder… If I put the following into ~/.config/fontconfig/fonts.conf, everything is fine:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
        <match target="font">
                <edit mode="assign" name="antialias">
                        <bool>true</bool>
                </edit>
                <edit mode="assign" name="embeddedbitmap">
                        <bool>false</bool>
                </edit>
                <edit mode="assign" name="hinting">
                        <bool>true</bool>
                </edit>
                <edit mode="assign" name="hintstyle">
                        <const>hintslight</const>
                </edit>
                <edit mode="assign" name="lcdfilter">
                        <const>lcddefault</const>
                </edit>
                <edit mode="assign" name="rgba">
                        <const>rgb</const>
                </edit>
        </match>
</fontconfig>

But all of it is configured in /etc/fonts as well. But without ~/.config/fontconfig/fonts.conf, I have ugly rendered fonts in Evolution. And other (non-webkitgtk) Applications don’t have a problem.

I cannot guess why that might be. All of /etc is available inside the sandbox.

My guess is that nothing is wrong with fontconfig. My guess is that your GTK font settings are messed up inside the sandbox. This can happen if you’re not running xdg-desktop-portal-gtk, for instance. Previously, gnome-settings-daemon was also required for antialiasing settings, but that should no longer be required.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.