Closed YousefSaber closed 4 years ago
I have no isuues with the telegram-desktop from Ubuntu archives.
I have same problem as @YousefSaber said .
I have same problem as @YousefSaber said .
Did you install it from Ubuntu archives?
Hi @danialbehzadi I download it from Telegram official website exactly . but after upgrading to Ubuntu 18.10 the telegram fornt was changed automatically to a non readable arabic font .
Hi @danialbehzadi I download it from Telegram official website exactly . but after upgrading to Ubuntu 18.10 the telegram fornt was changed automatically to a non readable arabic font .
Can you try removing it and install from Ubuntu archive to see if it's fine or not?
Hi @danialbehzadi I download it from Telegram official website exactly . but after upgrading to Ubuntu 18.10 the telegram fornt was changed automatically to a non readable arabic font .
Can you try removing it and install from Ubuntu archive to see if it's fine or not?
OK i just remove it and install from ubuntu archive as you said . Yeah, it's work like a charm now .
Hi @danialbehzadi I download it from Telegram official website exactly . but after upgrading to Ubuntu 18.10 the telegram fornt was changed automatically to a non readable arabic font .
Can you try removing it and install from Ubuntu archive to see if it's fine or not?
OK i just remove it and install from ubuntu archive as you said . Yeah, it's work like a charm now .
now that is a good arabic font hope that @danialbehzadi I hope that this issue will be avoided in telegram desktop ( downloaded from your website )
I don't like to download apps from repositories because they are often outdated and don't get updates quickly
I don't like to download apps from repositories because they are often outdated and don't get updates quickly
Unfortunately, I'm afraid that I should say it's not a matter of your interest. You should never install a package out of the repository archive. If you want the latest updates in Ubuntu, you can alternatively pin the package from devel
release channel with a higher priority in apt preferences.
@danialbehzadi this is the official repository of telegram app here issues are posted and must be fixed not ignored
you developed an executable application of telegram for linux system and it faces issues right now that must be fixed not ignored
this level of customer support isn't acceptable this issue is still present in the official release of ubuntu 18.10 !!
consider also that this is a small bug if you couldn't fix it then how'll you fix critical bugs !!
@danialbehzadi this is the official repository of telegram app here issues are posted and must be fixed not ignored
There is no such a thing as app repository. In modern GNU distributions, there is a distro repository archive which should be considered as the only source for installing packages. And no issues could be seen yet.
same problem , and telegram starts very slow on ubuntu 18.10
Is it possible to use Beta Channel from Ubuntu repositories ? I current using linux downloaded version with beta option enabled and fonts issues since telegram-dektop from repositories is old.
@glococo aside of the possibility of that will it even be stable as the official telegram app ?!!
Telegram developers must fix all these issues relying on snaps , repositories is inconvenient since they are outdated not to mention that Ubuntu is the most famous Open Source OS on the planet with the largest community support more than any other Linux Distro
this situation is very embarrassing for Telegram
@YousefSaber Snaps should be built together with the other versions, so they should not be outdated. I hope that they'll become the main way of delivering the app to the Linux users.
@john-preston put in mind that telegram doesn't have an official app build by them directly on snapcraft Telegram team have no choice but to fix the problems of the official executable app
@YousefSaber There is, snapcraft.io/telegram-desktop
It's built on build.snapcraft.io (edge) and on launchpad (stable and beta).
snap apps are not well integrated in Ubuntu yet. If you want the up to date version of any app in Ubuntu, just add the devel
release channel with a low priority and pin those apps to be updated trough this channel.
@john-preston do you know that there is no official snap telegram app even on snapcraft it isn't verified
can we please stop ignoring this issue I guess that Telegram team must investigate this issue on the biggest open source OS platform on the planet !!!
@YousefSaber I'll fix that "unofficial" in one of the next releases.
alright I'll update the status of the bug after v1.5 update
after the new update the app no longer takes very long time to start and it open instantly but the arabic font style is still ugly and distorted
$ sudo ./Telegram
[sudo] password for joseph:
@YousefSaber You should never run Telegram or any other graphical app with sudo.
I had a Funtoo instance with official Telegram 1.4.3 binaries for Linux which worked fine. Since they hard masked FFmpeg 4 required by ungoogled-chromium and also multilib use flag on glibc which breaks Wine compatibility with win32 applications (yes I still play COD4 with friends inside Wine) I had no other way than switching to Gentoo.
To my surprise this is how the new Telegram (v1.5.4) looks like this with an unreadable font:
I've always used Telegram Desktop official binaries on Funtoo/Gentoo without any issues. I only had to make sure media-fonts/farsi-fonts ebuild was emerged before running Telegram.
OK, at the first glance it seems the culprit is GNU Unifont, for whatever reason Telegram Desktop picks it up for both English and Persian when it is installed on the system. I installed Unifont in order to be able to show U+0CA0 KANNADA LETTER TTHA character ( ಠ_ಠ ) as https://github.com/dodie/vim-disapprove-deep-indentation uses it. Uninstalling it makes Telegram font a bit better (still not a good font):
So, I decided to replace GNU Unifont with Google's Noto font in order to be able to render ಠ_ಠ on my vim-disapprove-deep-indentation plugin. Now my Telegram Desktop looks like this (a lot better but not what I wanted):
Gentoo uses eselect fontconfig to quickly mess with fontconfig settings without touching its xml configuration files. No matter what Telegram does not respect users choice. I am not familiar with fontconfig's format but I guess it could be done by providing user's own configuration. Any ideas?
OK, in my case this resolved the issue:
I disabled Google Noto's font using
$ eselect fontconfig disable 66-noto-mono.conf 66-noto-sans.conf 66-noto-serif.conf
Which stops Telegram from picking up this font. And kept my regular Persian fonts using:
$ eselect fontconfig enable 65-fonts-persian.conf
Although no matter what if Unifont is installed on the system, even disabling it does not stop Telegram from picking it up:
$ eselect fontconfig disable 65-fonts-persian.conf
// the same as
$ eselect fontconfig enable 65-fonts-persian.conf
Now everything works as expected. Neovim works and is able to display ಠ, i3wm correctly shows ಠ in the the Firefox's title bar when I visit https://github.com/dodie/vim-disapprove-deep-indentation
So, I guess that resolves it for me.
@NuLL3rr0r can you please show me how to use or install eselect fontconfig because my system can't identify this command
eselect fontconfig disable 66-noto-mono.conf 66-noto-sans.conf 66-noto-serif.conf
Command 'eselect' not found, did you mean:
command 'dselect' from deb dselect
command 'iselect' from deb iselect
Try: sudo apt install <deb name>
@NuLL3rr0r can you please show me how to use or install eselect fontconfig because my system can't identify this command
Fontconfig is from Gentoo, you can't use it in other distros,
well is there anyway to fix this issue on Ubuntu @Johnnynator ??
@YousefSaber yep there is. You can always read and modify the fontconfig configurations which reside inside /etc/fonts/conf.d/. I can provide you with everything I have inside that directory. But, please be wary that your distro has its own configuration placed in that directory. So, messing with that without knowing what your doing would be unwise. But, you can generate your own configuration and put it in your home directory and override system-wide configurations. What eselect fontconfig did for me is saving my time without getting involved with the underlying configurations. It just works out of the box.
This is a good starting point if you still want to fix it yourself on your distro: I stared into the fontconfig, and the fontconfig stared back at me .
And here is the official docs.
@NuLL3rr0r thanks very much for your help
but these steps are very complicated for me as a normal user and a beginner
I'll just wait for a fix or continue using the snap app
Here is how I fixed this issue:
Close Telegram
Create directory: ~/.fonts
Add a font with its different weights [I used Vazir]
Create file: ~/.fonts.conf
and add these lines to it:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="pattern">
<test name="family" qual="any">
<string>sans serif</string>
</test>
<edit mode="assign" binding="same" name="family">
<string>Vazir</string>
</edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>
Clear font caches:
fc-cache -f -v
rm -r ~/.cache/fontconfig_11
Now open Telegram :)
@runo280 didn't work out for me
`(base) joseph@joseph-X541UJ:~$ fc-cache -f -v
/usr/share/fonts: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 4 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 8 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 89 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cMap: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
/usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/opentype: caching, new cache contents: 0 fonts, 3 dirs
/usr/share/fonts/opentype/fonts-hosny-amiri: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/opentype/malayalam: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/opentype/noto: caching, new cache contents: 24 fonts, 0 dirs
/usr/share/fonts/truetype: caching, new cache contents: 1 fonts, 51 dirs
/usr/share/fonts/truetype/Gargi: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/Gubbi: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/Nakula: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/Navilu: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/Sahadeva: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/Sarai: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/abyssinica: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/ancient-scripts: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/truetype/arphic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/truetype/dejavu: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/truetype/droid: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-arabeyes: caching, new cache contents: 36 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-beng-extra: caching, new cache contents: 6 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-deva-extra: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-gujr-extra: caching, new cache contents: 5 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-guru-extra: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-kalapi: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-orya-extra: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/fonts-telu-extra: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/freefont: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/kacst: caching, new cache contents: 15 fonts, 0 dirs
/usr/share/fonts/truetype/kacst-one: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/lao: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/liberation: caching, new cache contents: 16 fonts, 0 dirs
/usr/share/fonts/truetype/liberation2: caching, new cache contents: 12 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-assamese: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-bengali: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-devanagari: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-gujarati: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-kannada: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-malayalam: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-oriya: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-punjabi: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-tamil: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-tamil-classical: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/lohit-telugu: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/malayalam: caching, new cache contents: 11 fonts, 0 dirs
/usr/share/fonts/truetype/nanum: caching, new cache contents: 10 fonts, 0 dirs
/usr/share/fonts/truetype/noto: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/padauk: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/truetype/pagul: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/samyak: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/samyak-fonts: caching, new cache contents: 3 fonts, 0 dirs
/usr/share/fonts/truetype/scheherazade: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/sinhala: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/takao-gothic: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/tibetan-machine: caching, new cache contents: 1 fonts, 0 dirs
/usr/share/fonts/truetype/tlwg: caching, new cache contents: 58 fonts, 0 dirs
/usr/share/fonts/truetype/ttf-khmeros-core: caching, new cache contents: 2 fonts, 0 dirs
/usr/share/fonts/truetype/ubuntu: caching, new cache contents: 13 fonts, 0 dirs
/usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/type1/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
/home/joseph/anaconda3/fonts: skipping, no such directory
/home/joseph/.local/share/fonts: skipping, no such directory
/home/joseph/.fonts: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11: skipping, looped directory detected
/usr/share/fonts/cMap: skipping, looped directory detected
/usr/share/fonts/cmap: skipping, looped directory detected
/usr/share/fonts/opentype: skipping, looped directory detected
/usr/share/fonts/truetype: skipping, looped directory detected
/usr/share/fonts/type1: skipping, looped directory detected
/usr/share/fonts/X11/Type1: skipping, looped directory detected
/usr/share/fonts/X11/encodings: skipping, looped directory detected
/usr/share/fonts/X11/misc: skipping, looped directory detected
/usr/share/fonts/X11/util: skipping, looped directory detected
/usr/share/fonts/cmap/adobe-cns1: skipping, looped directory detected
/usr/share/fonts/cmap/adobe-gb1: skipping, looped directory detected
/usr/share/fonts/cmap/adobe-japan1: skipping, looped directory detected
/usr/share/fonts/cmap/adobe-japan2: skipping, looped directory detected
/usr/share/fonts/cmap/adobe-korea1: skipping, looped directory detected
/usr/share/fonts/opentype/fonts-hosny-amiri: skipping, looped directory detected
/usr/share/fonts/opentype/malayalam: skipping, looped directory detected
/usr/share/fonts/opentype/noto: skipping, looped directory detected
/usr/share/fonts/truetype/Gargi: skipping, looped directory detected
/usr/share/fonts/truetype/Gubbi: skipping, looped directory detected
/usr/share/fonts/truetype/Nakula: skipping, looped directory detected
/usr/share/fonts/truetype/Navilu: skipping, looped directory detected
/usr/share/fonts/truetype/Sahadeva: skipping, looped directory detected
/usr/share/fonts/truetype/Sarai: skipping, looped directory detected
/usr/share/fonts/truetype/abyssinica: skipping, looped directory detected
/usr/share/fonts/truetype/ancient-scripts: skipping, looped directory detected
/usr/share/fonts/truetype/arphic: skipping, looped directory detected
/usr/share/fonts/truetype/dejavu: skipping, looped directory detected
/usr/share/fonts/truetype/droid: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-arabeyes: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-beng-extra: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-deva-extra: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-gujr-extra: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-guru-extra: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-kalapi: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-orya-extra: skipping, looped directory detected
/usr/share/fonts/truetype/fonts-telu-extra: skipping, looped directory detected
/usr/share/fonts/truetype/freefont: skipping, looped directory detected
/usr/share/fonts/truetype/kacst: skipping, looped directory detected
/usr/share/fonts/truetype/kacst-one: skipping, looped directory detected
/usr/share/fonts/truetype/lao: skipping, looped directory detected
/usr/share/fonts/truetype/liberation: skipping, looped directory detected
/usr/share/fonts/truetype/liberation2: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-assamese: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-bengali: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-devanagari: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-gujarati: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-kannada: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-malayalam: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-oriya: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-punjabi: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-tamil: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-tamil-classical: skipping, looped directory detected
/usr/share/fonts/truetype/lohit-telugu: skipping, looped directory detected
/usr/share/fonts/truetype/malayalam: skipping, looped directory detected
/usr/share/fonts/truetype/nanum: skipping, looped directory detected
/usr/share/fonts/truetype/noto: skipping, looped directory detected
/usr/share/fonts/truetype/openoffice: skipping, looped directory detected
/usr/share/fonts/truetype/padauk: skipping, looped directory detected
/usr/share/fonts/truetype/pagul: skipping, looped directory detected
/usr/share/fonts/truetype/samyak: skipping, looped directory detected
/usr/share/fonts/truetype/samyak-fonts: skipping, looped directory detected
/usr/share/fonts/truetype/scheherazade: skipping, looped directory detected
/usr/share/fonts/truetype/sinhala: skipping, looped directory detected
/usr/share/fonts/truetype/takao-gothic: skipping, looped directory detected
/usr/share/fonts/truetype/tibetan-machine: skipping, looped directory detected
/usr/share/fonts/truetype/tlwg: skipping, looped directory detected
/usr/share/fonts/truetype/ttf-khmeros-core: skipping, looped directory detected
/usr/share/fonts/truetype/ubuntu: skipping, looped directory detected
/usr/share/fonts/type1/gsfonts: skipping, looped directory detected
/usr/share/fonts/X11/encodings/large: skipping, looped directory detected
/home/joseph/anaconda3/var/cache/fontconfig: cleaning cache directory
/home/joseph/.cache/fontconfig: cleaning cache directory
/home/joseph/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
(base) joseph@joseph-X541UJ:~$ rm -r ~/.cache/fontconfig_11
`
this is what written in fonts.conf file
`<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
@YousefSaber
Dude u are doing wrong.
You should download Vazir from its repo, and put *.ttf fonts in ~/.fonts
Vazir font is mainly for Persian, You could use any font u like, but consider it must have multiple weights.
Please read steps again and do exactly what I wrote.
I can confirm @runo280 instructions work. @YousefSaber as @runo280 mentioned you are doing it wrong.
Here is the result using rastikerdar/vazir-font.
@NuLL3rr0r whats eselect
you are using on command?
@MahdiPishguy eselect is a Gentoo/Funtoo thing. You can install the fontconfig module by issuing:
$ emerge -atuv app-eselect/eselect-fontconfig
Then:
$ eselect fontconfig usage
For more info on how to use it. The rest is here.
@runo280
Here is how I fixed this issue:
* Close Telegram * Create directory: `~/.fonts` * Add a font with its **different weights** [I used [Vazir](https://github.com/rastikerdar/vazir-font)] * Create file: `~/.fonts.conf` and add these lines to it:
<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="pattern"> <test name="family" qual="any"> <string>sans serif</string> </test> <edit mode="assign" binding="same" name="family"> <string>Vazir</string> </edit> </match> <dir>~/.fonts</dir> </fontconfig>
* Clear font caches: ` fc-cache -f -v` `rm -r ~/.cache/fontconfig_11` * Now open Telegram :)
didn't work for me (ubuntu 18.10 - telegram 1.6.1 installed via snap) there are no errors tho. it just didn't work on Telegram (I can verify the changes because firefox title bar has changed to IRANSans)
UPDATE:
this method works on the official Telegram, not the one that Snap provides.
@itshaadi AFAIK Snaps are sandboxed and kept separate from other parts of your system. So, that's why it won't work. You have to download official Telegram from https://telegram.org/dl/desktop/linux for 64-bit or https://telegram.org/dl/desktop/linux32 for 32-bit Linux.
can anyone test out whether the issue is still present in Ubuntu 19.04 ?
it is still present in 19.04. the only workaround for now is runo's method.
Still Annoying in Ubuntu 19.04 ( i got this from ubuntu software)
/ edited /
Ok , just fixed by installing again :smile:
Here is how I fixed this issue:
- Close Telegram
- Create directory:
~/.fonts
- Add a font with its different weights [I used Vazir]
- Create file:
~/.fonts.conf
and add these lines to it:<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="pattern"> <test name="family" qual="any"> <string>sans serif</string> </test> <edit mode="assign" binding="same" name="family"> <string>Vazir</string> </edit> </match> <dir>~/.fonts</dir> </fontconfig>
- Clear font caches:
fc-cache -f -v
rm -r ~/.cache/fontconfig_11
- Now open Telegram :)
did not solve the issue on Fedora30 using Arabic Font.
Any update on when will it be fixed?
Os: Ubuntu 18
TG Version: 1.9.3
when using bold font
Any update on when will it be fixed?
No one knows what the problem is :( Check with actual static binary, it have been migrated to system fontconfig. This is good to have an example of text.
And this is Farsi (Persian) font on my ubuntu. yesterday when my telegram got an update (1.9.21), I saw a change in farsi fonts. now it's hard to read text messages.
I've some good news and bad news after more than a year of creating this issue the problem has finally been solved in the regular executable Linux application in Telegram version 1.9.21
the bad news is this problem is now present in the snap app application version 1.9.21
for me the Arabic font is distorted you may want to close this issue if you want but the problem is present in the snap app also be careful in the future try to prevent this issue from reappearing in future Ubuntu or any Linux distro releases.
I personally prefer the executable application over the snap app since it receives updates faster.
And I can confirm the executable one has no problem with farsi (persian) in the latest version (1.9.21)
the bad news is this problem is now present in the snap app application version 1.9.21
There was a choice between crashing on some configurations and ugly fonts.
in the regular executable Linux application
The latest change with fonts was in 1.9.10
Some additional info:
Xubuntu 18.04, downloaded via Snap, version : 1.9.21 - 1388 - stable
It seems for both English and Persian languages it is using the default fallback font of the os, in my case:
$ fc-match
DejaVuSans.ttf: "DejaVu Sans" "Book"
My gtk-based GUI apps are using Roboto Regular. So it is not respecting that either.
I added an exception rule to ~/.config/fontconfig/fonts.conf
hoping it could make an exception for Farsi (IR/Persian) fonts:
~/.config/fontconfig $ bat fonts.conf
───────┬─────────────────────────────────────────────────────────────────────────────
│ File: fonts.conf
───────┼─────────────────────────────────────────────────────────────────────────────
1 │ <?xml version="1.0"?>
2 │ <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
3 │ <fontconfig>
4 │ <match target="pattern">
5 │ <test name="lang" compare="contains">
6 │ <string>fa</string>
7 │ </test>
8 │ <test qual="any" name="family">
9 │ <string>sans-serif</string>
10 │ </test>
11 │ <edit name="family" mode="prepend" binding="strong">
12 │ <string>nazli</string>
13 │ </edit>
14 │ </match>
15 │
16 │ <match target="pattern">
17 │ <test name="lang" compare="contains">
18 │ <string>fa</string>
19 │ </test>
20 │ <test qual="any" name="family">
21 │ <string>serif</string>
22 │ </test>
23 │ <edit name="family" mode="prepend" binding="strong">
24 │ <string>nazli</string>
25 │ </edit>
26 │ </match>
27 │ </fontconfig>
Telegram used the same font (DejaVu Sans Book) for Persian (Farsi, IR) and English. I even removed the conditionals in the fontcong XML so the farsi font is used universially on the system (and the result of fc-match is a farsi font). Still Snap Telegram didn't respect that and used DejaVu Sans Book
Then I commented-out all lines except the dir which has only farsi fonts from here ~/snap/telegram-desktop/current/.config/fontconfig/fonts.conf
bat fonts.conf
───────┬─────────────────────────────────────────────────────────────────────────────
│ File: fonts.conf
───────┼─────────────────────────────────────────────────────────────────────────────
1 │ <fontconfig>
2 │ <!-- <dir>/snap/telegram-desktop/1388/usr/share/fonts</dir> -->
3 │ <dir>/usr/local/share/fonts/truetype/farsiweb</dir>
4 │ <!-- <dir>/usr/share/fonts</dir> -->
5 │ <!-- <include ignore_missing="yes">conf.d</include> -->
6 │ <!-- <cachedir prefix="xdg">fontconfig</cachedir> -->
7 │ <!-- <cachedir>/home/pooya/.cache/fontconfig</cachedir> -->
8 │ </fontconfig>
The problem persists
English font style is good but Arabic font style isn't good it's some how bold which I don't like tried to install GNOME tweaks to change the font but I couldn't succeed
this is the desired Arabic font style which was present in Ubuntu 18.04.1 on telegram
but this is the Arabic font style in Telegram which I don't like
Operating system:
Ubuntu Cosmic Cuttlefish (development branch) using GNOME shell v3.30 as desktop environment
telegram v1.3.14 installed from a tar.xz from your official website ( to get updates quickly ) https://desktop.telegram.org/
please make sure that this issue will be avoided in the official final release of Ubuntu 18.10