1

I've installed Telegram on my Ubuntu 18.04. My system is updated and everything is updated. When I try to open telegram, for Persian texts, it uses a very weird monospace like font. I've tried writing the following to the ~/.fonts.conf file but it doesn't take effect.

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
        <match target="pattern">
                <test name="lang" compare="contains">
                        <string>az</string>
                </test>
                <test name="family">
                        <string>sans-serif</string>
                </test>
                <edit name="family" mode="prepend" binding="same">
                        <string>Noto Naskh Arabic</string>
                </edit>
        </match>

        <match target="pattern">
                <test name="lang" compare="contains">
                        <string>az</string>
                </test>
                <test name="family">
                        <string>serif</string>
                </test>
                <edit name="family" mode="prepend" binding="same">
                        <string>Noto Naskh Arabic</string>
                </edit>
        </match>
</fontconfig>

When I run telegram from the terminal I get the following log:

Gtk-Message: 21:37:50.085: Failed to load module "canberra-gtk-module"
Gtk-Message: 21:37:50.101: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.201\" (uid=1000 pid=13326 comm=\"telegram-desktop \" label=\"snap.telegram-desktop.telegram-desktop (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1093 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.201\" (uid=1000 pid=13326 comm=\"telegram-desktop \" label=\"snap.telegram-desktop.telegram-desktop (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1093 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
"Object path cannot be empty"
error: : cannot open
error: : cannot open
error: : cannot open

Does anyone have any idea how to solve this problem, I've checked the other topics over the net and they mostly consist of changing the fonts configuration file, but I think there might be sth wrong with apparmore.

1 Answers1

1

There is similar topic in askubuntu question about telegram and its bad support for Persian language fonts.

A good news is that Telegram on newer release add default support to Persian with adding Vazir font family.

For you I suggest to remove telegram-desktop package if install with Ubuntu repository and download the latest one from official website to use latest update of telegram.

apt purge telegram-desktop

If you prefer more info on installing telegram in this method please read my answer on Iranian UBUNTU Community.

EsmaeelE
  • 337