Snap package cannot read fonts conf

I started move to Ubuntu 20.04 but when i install chromium

apt install chromium-browser

it installed from snap
and cannot read 65-ubuntu-font-family-arabic.conf that contain

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="family" compare="eq">
            <string>Ubuntu</string>
        </test>
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Ubuntu Arabic</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="family" compare="eq">
            <string>DejaVu</string>
        </test>
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>Ubuntu Arabic</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="family" compare="eq">
            <string>DejaVu Sans</string>
        </test>
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>Ubuntu Arabic</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="family" compare="eq">
            <string>DejaVu Serif</string>
        </test>
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>Ubuntu Arabic</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="family" compare="eq">
            <string>DejaVu Serif</string>
        </test>
        <test name="lang" compare="contains">
            <string>ar</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Ubuntu Arabic</string>
        </edit>
    </match>
    <alias>
  	<family>DejaVu Serif</family>
	<prefer>
	  <family>Ubuntu Arabic</family>
	  <family>DejaVu Serif</family>
	</prefer>
    </alias>
    <alias>
  	<family>DejaVu Sans</family>
	<prefer>
	  <family>Ubuntu Arabic</family>
	  <family>DejaVu Sans</family>
	</prefer>
    </alias>
    <alias>
  	<family>DejaVu</family>
	<prefer>
	  <family>Ubuntu Arabic</family>
	  <family>DejaVu</family>
	</prefer>
    </alias>
</fontconfig>

font source: https://launchpad.net/ubuntu/+source/ubuntu-font-family-sources/0.84~mono0.83+arabicfontconfig-0ubuntu1

How i can make snap package read that files?

If you notice, Chromium and Ubuntu Software not use default system fonts
Gedit, Firefox and Files use System fonts correctly

Chromium binary works well

Does that file (or a symlink to it) exist in /etc/fonts/conf.d in Ubuntu20.04? If so, which package does it belong to?

yes it exists in /etc/fonts/conf.d and it symlink to /etc/fonts/conf.avail/65-ubuntu-font-family-arabic.conf.

I don’t know what you mean of “belong to” but I installed font manual using Gnome Font Viewer that come default with Ubuntu

Thought it might be relevant to your problem. The source you linked to seems to be some kind of test which happened in the Xenial development cycle. The config file was not present in the final release of Ubuntu 16.04, and seems not to have reappeared later.

Anyway, I suppose that bottom line is that you have installed a config file manually. I don’t know if snaps are able to make use of extra fontconfig config files. Maybe someone else can help.

correct, I have installed a config file manually
I think Ubuntu Arabic font was discontinue but the font is complete now and ready to use maybe there config issue not allow them to use it in Ubuntu 16.04 … 20.04
thank you :smiley:

@popey do you have the solution?

fixed: I removed snap from my distro

Would this question not rather belong in forum.snapcraft.io? I think you’d get more topical answers there.

I moved my question to http://forum.snapcraft.io/ but there no reply
https://forum.snapcraft.io/t/snap-package-cannot-read-fonts-conf/16657
Is my issue hard to solve?

I think fonts are a tough problem as we have a somewhat brittle interface where fontconfig inside the snap is parsing config or caches outside the snap that are not necessarily fully compatible.

1 Like

I read mean of fontconfig issues in snapcraft forum
but i think my issue is different and can be solve
only if know how apply custom configs to core18 or core20