Tdesktop: Hebrew font unreadable on snap after PR #7387

Created on 24 Mar 2020  路  12Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Open the "Snap" version Telegrram
  2. Write in Hebrew

Expected behaviour

Font should look nice

Actual behaviour

Font looks horrible (Hebrew defaults to FreeMono which has downright unreadable Hebrew glyphs)

This issue is caused by the new fonts.conf file (introduced in #7387) included in the snap builds. The old fonts.conf file had the line <include ignore_missing="yes">conf.d</include> which included all the configuration files from the snap-bundled-directory /etc/fonts/fonts.d (which are all symlinks to the configuration files found in the also-snap-bundled-directory /etc/fonts/fonts.avail).

The absence of this line causes the Hebrew font to fallback on FreeMono.

The new fonts.conf file is this file, copied from the lib_ui repository

The old fonts.conf file was from here

The specific /etc/fonts/fonts.avail files needed to fix the Hebrew font are:
49-sansserif.conf and 60-latin.conf. They make it so the following fonts get precedence over FreeMono (on my system, I believe DejaVu Sans gets chosen out of that list, because it's the only one I have on my system):

<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Verdana</family>
<family>Arial</family>
<family>Albany AMT</family>
<family>Luxi Sans</family>
<family>Nimbus Sans L</family>
<family>Nimbus Sans</family>
<family>Helvetica</family>
<family>Lucida Sans Unicode</family>
<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->

Configuration

Operating system:
Ubuntu 19.10, also happens on a Fedora I tried
Version of Telegram Desktop:
Snap 1.9.21
Used theme:

Most helpful comment

@omertuc Can you please check the latest edge version, will it still have bad fonts?

All 12 comments

Yeah I saw that comment, but this font is not just ugly - it's nearly impossible to read unless you're very careful, some letters look exactly the same and in Hebrew that makes reading very very hard.

Would <include>ing 49-sansserif.conf and 60-latin.conf specifically (found in /etc/fonts/fonts.avail, already bundled with the snap) inside fonts.conf still cause that crash that is mentioned? Because that's what it would take to fix the problem, for Hebrew at-least.

It is not known what exactly the problem is, I believe that there is some conflict between snap fontconfig version and fontconfig cache from the host or fontconfig configs from the host. There may also be a problem with some fonts from the host. It is better not to touch the config.

Alright, then please leave this issue open until #7144 is better understood so everyone can stay happy

But it is already discussed at #5172

@omertuc Can you please check the latest edge version, will it still have bad fonts?

Works great! Good job, thanks!

@john-preston What do you mean by "edge version"? As I mentioned here, I've installed Telegram Desktop directly from the website and it solved the issue, but then it was updated to version 2.0 and the the issue appeared again.

@OrBin I wanted you to check the latest snap build (you can try not edge now, but just the latest snap) so that I would know if my workaround has fixed the problem.

The version 2.0 from site is built incorrectly, fonts should be fixed in the upcoming 2.0.1

@OrBin I wanted you to check the latest snap build (you can try not edge now, but just the latest snap) so that I would know if my workaround has fixed the problem.

The version 2.0 from site is built incorrectly, fonts should be fixed in the upcoming 2.0.1

When do you expect to release 2.0.1?

@OrBin I hope later today.

Updated now to 2.0.1, but I still have FreeMono font...

Update: Restarting Telegram solved it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yanrishatum picture Yanrishatum  路  3Comments

beppe9000 picture beppe9000  路  3Comments

abhyrz picture abhyrz  路  3Comments

Mindstormer619 picture Mindstormer619  路  3Comments

TotalKrill picture TotalKrill  路  3Comments