telegramdesktop / tdesktop

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

Allow user to choose font and font size #90

Open Katzen-Gott opened 10 years ago

Katzen-Gott commented 10 years ago

It would be cool if user could choose fonts for conversations (and even 20% cooler if telegram would use system-default fonts)

ghost commented 7 years ago

@benbenolson can you make a gist about the font change process and rebuid ?

ranisalt commented 7 years ago

Next year we should build a cake for 3 years anniversary of the issue.

nesteruk commented 7 years ago

Is anyone going to implement this?!?

foxmajik commented 7 years ago

Since the developers have refused to accommodate those with special needs the community has created a userscript that allows the sizes of fonts to be adjusted in the web-based version of Telegram:

https://userstyles.org/styles/116620/telegram-esi

fancywriter commented 7 years ago

Confirming that default font is awful - especially exclamation mark symbol "!", looks closer to letter "l" than "!".

john-preston commented 4 months ago

Ok, first attempt on font customization is out with 4.16.9 beta version.

tamr commented 4 months ago

Ok, first attempt on font customization is out with 4.16.9 beta version.

Great. It werks! No more exe patching required, sweet!

Geobert commented 4 months ago

This font doesn’t render well https://jacobxperez.github.io/atkinson-hyperlegible-pro/ (Windows) Telegram_RhUPOHghMw

ilya-fedin commented 4 months ago

@Geobert perhaps you need to enable font smoothing in system settings?

Geobert commented 4 months ago

@Geobert perhaps you need to enable font smoothing in system settings?

It is already enabled :)

ilya-fedin commented 4 months ago

@Geobert are you sure? there are multiple settings regarding it... i believe you need to enable cleartype

ilya-fedin commented 4 months ago

the thing here is that it's Qt who is responsible for font rendering (tdesktop just sends text via QPainter) so it's not possible to do any other than tinkering with system settings.

Geobert commented 4 months ago

cttune_8ptIutOQX7 ApplicationFrameHost_n3BctartLg

ilya-fedin commented 4 months ago

@Geobert perhaps you got a Qt bug?

Geobert commented 4 months ago

@Geobert perhaps you got a Qt bug?

I’m on Windows, so I use the Qt shipped with Telegram I believe

ilya-fedin commented 4 months ago

I’m on Windows, so I use the Qt shipped with Telegram I believe

Yeah... Although I'm not sure what you wanted to say by that.

AndydeCleyre commented 3 months ago

Ok, first attempt on font customization is out with 4.16.9 beta version.

Is this planned for monospace as well?

AndydeCleyre commented 3 months ago

Is it known whether the monospace fonts will eventually be either user-selectable, or match the system's existing monospace selection? Does this issue cover that, or would a separate issue be appropriate?

ilya-fedin commented 3 months ago

Monospace font is whatever Qt thinks the system monospace font since a long time. Except of Windows, where Qt thinks system monospace font is Courier New so Cascadia Mono is requested explicitly.

AndydeCleyre commented 3 months ago

Monospace font is whatever Qt thinks the system monospace font since a long time.

Oh! Any extra steps required to get that working with the flatpak package, in KDE Plasma?

ilya-fedin commented 3 months ago

Oh! Any extra steps required to get that working with the flatpak package, in KDE Plasma?

Oh, afaik KDE/Qt flatpak fonts thing is in the state of lack of interest from KDE/Qt side. GNOME/gtk use their own sandbox friendly way of getting the settings while KDE/Qt uses fontconfig configs which are backward incompatible (a config made for a later fontconfig library version would break previous fontconfig library version) and so aren't sandbox-friendly.

AndydeCleyre commented 3 months ago

Alright, well for anyone else wondering I tried the following without success:

$ cd ~/.var/app/org.telegram.desktop/config
$ ln -s ~/.config/fontconfig/fonts.conf

Then tried the following, also without success:

$ rm ~/.var/app/org.telegram.desktop/config/fonts.conf
$ flatpak --user override --filesystem=$HOME/.config/fontconfig/:ro
$ flatpak --user override --filesystem=$HOME/.local/share/fonts/:ro
ilya-fedin commented 3 months ago

Oh, looks like I gave wrong information to you. What is lacking in KDE/Qt case is font hinting and antialiasing settings (which gtk has), monospace font face is supported (stored in KDE configs). It's gtk who doesn't have monospace setting at all (exists only at gnome-terminal level which reads gnome-shell setting) and the Qt patchset changes Qt so it always gets settings from gtk (which leads Qt to read monospace font from fontconfig) as otherwise people report bugs that tdesktop is not adhering their system settings and it's the only feature complete settings backend in Qt. I'm not sure what to do in that case but changing monospace font is not planned AFAIK.

AndydeCleyre commented 3 months ago

OK, is this only an issue for flatpak, or also with native installations, in a KDE Plasma environment?

I had been maintaining custom build scripts for telegram on the AUR for system font support, but removed them when this font support was added. I want to know if I should try resurrecting and maintaining the custom build scripts, but won't bother if the bug only affects flatpak installations.

ilya-fedin commented 3 months ago

OK, is this only an issue for flatpak, or also with native installations, in a KDE Plasma environment?

Well, I'm not sure. Feel free to test.

AndydeCleyre commented 3 months ago

I'm not currently running Arch, but an LTS Ubuntu, so can't test non-flatpak updated Telegram Desktop at the moment. If anyone else here can tell me if monospace uses the proper font in KDE Plasma, I'd appreciate it.

ilya-fedin commented 3 months ago

You can try the static binary

AndydeCleyre commented 3 months ago

Thanks! Yes it works just fine with the static build.