Telegram could stop searching for a font or have font settings in the app. it uses 10-15 seconds to load up in my SSD powered Linux box. It has to be slower in other machines since it stat
s every font you have.
Operating system:
Arch Linux
Version of Telegram Desktop:
1.2.15
Used theme:
default
I can confirm this after an strace. It also inhibited the update process somehow and for some reason I have been stuck on version 1.2.6 even though having Telegram only installed on March 17 after a clean Arch Linux install. But I have found now that telegram-desktop is now available in the official Arch repository, and I use this now instead of the binaries distributed by the Telegram team and it hasn’t got this error.
thank you. I'll start using the official Arch repo bindings for Telegram. But this problem needs to be solved anyway. I think it's safe to assume it will have a similar behavior on other Linux distributions.
So this is why I couldn't start Telegram Desktop the past week...
Did the Arch Linux package maintainers already patch this or something?
I think I am experiencing the same issue. However it takes more like two minutes to start.
Arch Linux.
Can confirm that @Socialdarwinist's solution works fine.
I am also experiencing this issue with 1.2.17 (was also a problem with earlier versions) on Gentoo, which uses the official builds. Not only does it iterate through every font, but it does so multiple times. All in all startup takes about 2 minutes even though this is running off an SSD (I guess the issue is exacerbated by me having some pretty heavy CJK fonts installed (Noto Sans)). There's also a lot of fontconfig errors printed to the console which are probably related? Stuff like:
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/69-unifont.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/80-delicious.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/80-delicious.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/90-synthetic.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'version'
Fontconfig error: Cannot load default config file
Ok hopefully this get resolved soon as startup is awful. I can confirm that on Debian sid do iterate multiple times through all fonts before starting. On my machine it takes around 1 min.
As reported in #4611 it takes a quite good while for me too. I think due to noto fonts too. Also, I am using official arch repo, so it still needs to be fixed
I can reproduce this on Debian.
But worse than the startup time is the font rendering. English is OK for Farsi fonts are being drawn super weird, almost unreadable.
I'm not sure if it's the same issue, but they both happened on the same tdesktop update.
Unfortunately I don't have a screenshot of when it looked OK. But this renders tdesktop useless as I cannot read the fonts.
@emilsedgh Can you try some older versions from https://github.com/telegramdesktop/tdesktop/releases and see if it was broken at some point recently?
I tried the following versions:
1.2.17
1.2.16
1.2.15
1.2.14
1.2.1
They all had the same issue.
But the font issues started happening only last week.
I'm gonna take a wild wild guess of what's happening:
tdesktop's distributed binary is statically linked with an older version of Fontconfig which is not compatible with the new config files that are shipped by distro's as part of Fontconfig 2.13
I just realized Debian has packages for tdesktop.
I installed it. Version 1.12.15. And it works just fine.
I think that also is explained by the theory above:
When installed from distro packages, tdesktop uses system-wide fontconfig which is 2.13.0 which is compatible with config files.
This, that “_tdesktop's distributed binary is statically linked with an older version of Fontconfig which is not compatible with the new config files that are shipped by distro's as part of Fontconfig 2.13_” seems very likely to me. @john-preston
It looks like the Telegram binaries by the Telegram team should start use the distribution fontconfig libraries. It does not necessarily mean that the binary should not use a statically linked fontconfig alternatively, but given that Telegram still uses config files shipped by distributions, apparently Telegram gains nothing by depending on statically linked fontconfig. Fontconfig is statically linked but the user needs to have fontconfig files installed anyway for Telegram, right, so what’s the point of it being statically linked in the first place? Maybe it makes sense for some obscure Linux from Scratch setups.
I see indefinite other fontconfig issues to be solved “with this simple trick”, see #4493 #4240, #4603. Using the system fontconfig is also the first step into customizable fonts.
The other way is that Telegram would do fonts all by itself with own files and functions, but why so? It is a trait of really bad, unmaintainable programs, as seen in ddnet/ddnet#684.
I have no clear view about what happens with all those Windows reports about Telegram starting slow, but perhaps statical linking is at fault there too.
I totally agree with @Socialdarwinist on this really there is no need to have statically linked fontconfig without shipping the fonts also with application and much smarter way is to rely on the system dynamically linked fontconfig and have a failsafe with static version.
Also there is no usecase where someone would use telegram and do not have fonts already installed. Adding ability to choose fonts from the OS installed fonts would be nice option they could put it under advanced settings and adding a font dialog is really easy as each distro have already that implemented.
So please fix that. I in the meantime use 1.15 version from debian repos that start immediately as it looks for the fonts on OS.
I'm on antergos xfce and am experiencing same issue. In my case, telegram doesn't even open unless i remove noto fonts cjk which i downloaded from AUR. It opens after ~2 minutes without those fonts.
Hello, I can confirm this issue also on Arch Linux, but with the latest telegram-desktop package (which is 1.2.17). So the solution posted by @Socialdarwinist unfortunatelly does not work for me.
@phorward "telegram-desktop" package in arch repos isn't official (so is telegram-desktop AUR)
Please try version from https://desktop.telegram.org (or telegram-desktop-bin aur pkg)
@stek29, thanks for your reply, I think I got it to work now. Its funny that the official version from the repo is more buggy than the statically linked one
1.1.23 is the last version that doesn't take ages to start up for me. 1.1.24 and newer take a few minutes to start up. (And the error logs from font config are different)
I tested these from the files from github releases. Latest 1.2.17 from https://desktop.telegram.org/ still doesn't work.
telegram-desktop-bin still doesnt launch due to fontconfig for me telegram-desktop-bin-1.2.17-1
For anyone not wanting to dig through the linked duplicates to find the solution, it's https://github.com/telegramdesktop/tdesktop/issues/4240#issuecomment-388311151.
Most helpful comment
I can confirm this after an strace. It also inhibited the update process somehow and for some reason I have been stuck on version 1.2.6 even though having Telegram only installed on March 17 after a clean Arch Linux install. But I have found now that telegram-desktop is now available in the official Arch repository, and I use this now instead of the binaries distributed by the Telegram team and it hasn’t got this error.
tl;dr: Use the new telegram-desktop Arch package