telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.16k stars 5.19k forks source link

Arabic font style isn't good in Ubuntu 18.10 development branch #5172

Closed YousefSaber closed 4 years ago

YousefSaber commented 6 years ago

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

image

but this is the Arabic font style in Telegram which I don't like

image

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

pvonmoradi commented 4 years ago

Checking the log.txt at (~/snap/telegram-desktop/1388/.local/share/TelegramDesktop), it seems Telegram is using DAOpenSansRegular.ttf fonts with different styles which does not exist anywhere on my system:

Primary screen DPI: 157
Font: from ':/gui/fonts/DAOpenSansRegular.ttf' loaded 'DAOpenSansRegular'
Font: from ':/gui/fonts/DAOpenSansRegularItalic.ttf' loaded 'DAOpenSansRegularItalic'
Font: from ':/gui/fonts/DAOpenSansBold.ttf' loaded 'DAOpenSansBold'
Font: from ':/gui/fonts/DAOpenSansBoldItalic.ttf' loaded 'DAOpenSansBoldItalic'
Font: from ':/gui/fonts/DAOpenSansSemibold.ttf' loaded 'DAOpenSansSemibold'
Font: from ':/gui/fonts/DAOpenSansSemiboldItalic.ttf' loaded 'DAOpenSansSemiboldItalic'
ilya-fedin commented 4 years ago

They are embedded in binary

pvonmoradi commented 4 years ago

@ilya-fedin So it just ignores all font dirs? Since Telegram is a Qt app, where does it look for deciding on what font to use on a gtk-based system?

smaznet commented 4 years ago

my fonts problems resolved by installing persian fonts pack

use this script to install fonts : https://github.com/fzerorubigd/persian-fonts-linux

ilya-fedin commented 4 years ago

So it just ignores all font dirs?

yes

Since Telegram is a Qt app, where does it look for deciding on what font to use on a gtk-based system?

Snap version ignores all the font configuration, read my message that before your first message in this issue.

uda commented 4 years ago

I just switched to the flatpak version and the the fonts were loaded properly

TheHolyLoli commented 4 years ago

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.

Persian fonts are nearly unreadable now and I have the same problem with snap package 1.9.22-beta-104-gdeb76f38d

Isn't there a way to fix this?I mean can I hack it to make it like it was before on my system?

ilya-fedin commented 4 years ago

At the moment - no, you can't

TheHolyLoli commented 4 years ago

So.I don't know what flatpak is but is it available for armhf? (both flatpak and telegram package) maybe it doesn't have the same problem there?

ilya-fedin commented 4 years ago

is it available for armhf?

I don't know. You can try.

TheHolyLoli commented 4 years ago

Persian fonts are nearly unreadable now and I have the same problem with snap package 1.9.22-beta-104-gdeb76f38d

I'll rephrase my sentence. I can't even read at all...nope...It looks like a foreign language to me

can't we make an issue in gtk-whatever or snap asking them to fix that crash problem?

I'll test flatpak in few hours.AFAIK it's not official, is it?

ilya-fedin commented 4 years ago

can't we make an issue in gtk-whatever or snap asking them to fix that crash problem?

This would be awesome, but it is unknown what problem exactly is.

AFAIK it's not official, is it?

AFAIK it's official

TheHolyLoli commented 4 years ago

I can confirm this doesn't have a problem with flatpak version. But it doesn't support alsa, so I can't use it :( I hope you can find the problem.

smaznet commented 4 years ago

Do you installing this font pack?

my fonts problems resolved by installing persian fonts pack

use this script to install fonts : https://github.com/fzerorubigd/persian-fonts-linux

I can confirm this doesn't have a problem with flatpak version. But it doesn't support alsa, so I can't use it :( I hope you can find the problem.

TheHolyLoli commented 4 years ago

Do you installing this font pack?

I've installed Vazir font and it doesn't use it.it is the same as before.this happens in snap package.

edit(to make it clear):

So it just ignores all font dirs?

yes

Snap version ignores all the font configuration, read my message that before your first message in this issue.

YousefSaber commented 4 years ago

I've some bad news the issue has resurfaced again in your executable application for Linux in version 2.0 image the font is distorted again !!!

but on Telegram snap app v2.0 edge channel the font is fine image

ilya-fedin commented 4 years ago

A font russian roulette

hadisfr commented 4 years ago

https://github.com/telegramdesktop/tdesktop/issues/5172#issuecomment-606245725 is confirmed.

https://github.com/telegramdesktop/tdesktop/issues/5172#issuecomment-464297063 not worked with directly-downloaded non-snap version, in version 2.0.

OS: Ubuntu 19.10

ilya-fedin commented 4 years ago

preston forgot to do a full rebuild after testing the fix for snap, I guess. The next version should be ok.

hadisfr commented 4 years ago

@ilya-fedin I'm interested in technical details. :D It seems that all related changes are https://github.com/telegramdesktop/tdesktop/commit/aa4968faaa98ed5e72d8c6bee8316a0ee2ff300a, https://github.com/telegramdesktop/tdesktop/commit/0d58f1c9fa5be2934ae59c71b62e4a261d914b30, and https://github.com/desktop-app/lib_ui/commit/86cb882aab071c2a7933fcfc8d0834e38dca3651 and https://github.com/desktop-app/lib_ui/commit/246aa24530ccc5a5ab06053109a030ceccdb9139 (via https://github.com/telegramdesktop/tdesktop/commit/2feaa85ed943b45647d0a04374879cd19df0af2b). Am I right? Could you describe a little please?

ilya-fedin commented 4 years ago

I'm interested in technical details.

I think, preston, after testing of building with TDESKTOP_USE_FONTCONFIG_FALLBACK, forgot to remove cmake cache and release build has been builded with TDESKTOP_USE_FONTCONFIG_FALLBACK

H4medRostami commented 4 years ago

well , to improve this issue you should find The master configuration file - usually /etc/fonts/fonts.conf and copy its content to telegram font config file in : ~/.local/share/TelegramDesktop/tdata/fc-custom-1.conf

ilya-fedin commented 4 years ago

Does the issue completely gone with 2.0.1?

ilya-fedin commented 4 years ago

I'm only interested in status without any third-party "solutions"

khafan11 commented 4 years ago

Does the issue completely gone with 2.0.1? no

ilya-fedin commented 4 years ago

no

Installation method?

khafan11 commented 4 years ago

no

Installation method? Direct through the site and ArchLinux package too

ilya-fedin commented 4 years ago

Direct through the site and ArchLinux package too

If you have the issue even with distribution package, then you have fonts misconfiguration at system level

khafan11 commented 4 years ago

Direct through the site and ArchLinux package too

If you have the issue even with distribution package, then you have fonts misconfiguration at system level

it was working good till this last update !! i used Vazir fonts ( yay vazir-fonts ) but now its show ugly font ! i try to change system font too, but same result

ilya-fedin commented 4 years ago

it was working good till this last update !!

Which exactly package did you mean by "ArchLinux package"? telegram-desktop from community repository or telegram-desktop-bin from AUR?

khafan11 commented 4 years ago

it was working good till this last update !!

Which exactly package did you mean by "ArchLinux package"? telegram-desktop from community repository or telegram-desktop-bin from AUR?

I use the site version more often, anyway Now I'm back to version 2.0 and the problem is fixed https://github.com/telegramdesktop/tdesktop/releases/tag/v2.0.0

ilya-fedin commented 4 years ago

Now I'm back to version 2.0 and the problem is fixed

What's going on 1.9.21?

khafan11 commented 4 years ago

Now I'm back to version 2.0 and the problem is fixed

What's going on 1.9.21?

that was fine too , Problem reverted in version 2.0.1 Of course I wonder why it happened Because till last night version 2.0.1 was working properly But the morning I turned on the system, it was Messed up

ilya-fedin commented 4 years ago

Are you 100% sure that you're not confused between 2.0 and 2.0.1? There are a bug with fonts in 2.0, but 2.0.1 works as 1.9.x.

khafan11 commented 4 years ago

Are you 100% sure that you're not confused between 2.0 and 2.0.1? There are a bug with fonts in 2.0, but 2.0.1 works as 1.9.x. :D yes i'm sure what version am using , I had to disable automatic update as well Screenshot_2020-04-03_13-50-42 Screenshot_2020-04-03_13-50-03

ilya-fedin commented 4 years ago

:D yes i'm sure what version am using , I had to disable automatic update as well

Sound like a magic. Can you send log?

khafan11 commented 4 years ago

:D yes i'm sure what version am using , I had to disable automatic update as well

Sound like a magic. Can you send log?

log.txt

TheHolyLoli commented 4 years ago

This is how persian looks right now:

Screenshot_2020-04-03_13-50-42

This is the one with font problem:

image

which one of these are you seeing right now?

TheHolyLoli commented 4 years ago

@ilya-fedin this is unrelated but...is there a way to change the font on windows? I just want to see how different fonts change user experience.

ilya-fedin commented 4 years ago

log.txt

Is this a log from problem version? If not, it is useless.

ilya-fedin commented 4 years ago

is there a way to change the font on windows?

no

khafan11 commented 4 years ago

log.txt

Is this a log from problem version? If not, it is useless. I thought you wanted version 2 here is 2.0.1 log.txt

Aokromes commented 4 years ago

@ilya-fedin this is unrelated but...is there a way to change the font on windows? I just want to see how different fonts change user experience.

https://github.com/opumps/TGFont

ilya-fedin commented 4 years ago

log.txt

What does the bad font look like?

khafan11 commented 4 years ago

log.txt

What does the bad font look like? You can compare it with the previous one Screenshot_2020-04-03_20-07-47

ilya-fedin commented 4 years ago

You can compare it with the previous one

lol. It's just a difference with subpixel rendering. Tweak your system settings until fonts will look good.

ilya-fedin commented 4 years ago

https://wiki.archlinux.org/index.php/Font_configuration

ilya-fedin commented 4 years ago

Ok, does anyone really have this issue (font should be chosen wrong, not just a difference with anti-aliasing)?

SoheilShahbazian commented 4 years ago

Telegram has lots of problem with persian(farsi) font the above images not relevance to monitors' rendering

ilya-fedin commented 4 years ago

the above images not relevance to monitors' rendering

No, they are related. There is bug on 2.0.0 that adds custom fonts.conf. For almost of you this leads to the use of FreeMono for almost all glyphs. But he has a normal font and he sees only the difference with the anti-aliasing settings. On 2.0.1, system fonts.conf is used, as on previous versions, but he believes that fonts behave worse, but that's wrong, they just reverted to the state of before 2.0.0. He can configure fonts as he want, including as in custom fonts.conf.