LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-05-2019, 09:52 AM   #1
TheExplorer
LQ Newbie
 
Registered: Nov 2017
Posts: 14

Rep: Reputation: Disabled
Telegram fonts (Qt apps in a GTK environment)


Hello, everybody. I'm pretty stumbled upon the following issue:

Debian 9, MATE. In order to make Qt apps (VLC, Virtualbox etc.) look the same, I installed qt5-gtk-platformtheme и qt5-style-plugins packages and put QT_QPA_PLATFORMTHEME=gtk2 into /etc/environment. Since I don't like font antialiasing, I've created the following ~/.config/fontconfig/fonts.conf (otherwise, Qt apps have antialiased fonts):

Code:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit name="rgba" mode="assign">
   <const>none</const>
  </edit>
 </match>
 <match target="font">
  <edit name="hinting" mode="assign">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit name="hintstyle" mode="assign">
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="font">
  <edit name="antialias" mode="assign">
   <bool>false</bool>
  </edit>
 </match>
</fontconfig>
Now everything is perfect: native GTK apps like File manager and foreign Qt apps like VLC are uniform.
But, unfortunately, this is not the case with Telegram. I guess, it is their fault as I've found the same issue on their Github.

So, the question is: is it possible to make Telegram ignore my fonts.conf? How can I make a particular application bypass my local font configuration?

Thank you.

UPDATE: Problem solved. See here.

In order to make any application ignore local settings you may start it with:

Code:
XDG_CONFIG_HOME= telegram-desktop
Mind the gap/space between XDG_CONFIG_HOME= and the command itself.

UPDATE 2:

I also managed to make Chrome look nice with disabled antialiasing system-wide!

Simply copy your ~/.config to ~/.config.chrome
Enable antialiasing in this new ~/.config.chrome/fontconfig/fonts.conf
Start with:

Code:
XDG_CONFIG_HOME="${HOME}/.config.chrome" chromium

Last edited by TheExplorer; 05-05-2019 at 01:07 PM.
 
Old 05-06-2019, 01:37 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
good information here, thank you!
 
  


Reply

Tags
fonts, gtk, qt5



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Telegram Messenger On Linux Telegram Linux LXer Syndicated Linux News 1 01-28-2024 02:48 AM
How to install Telegram Client on Red hat 5.X? jorham25 Red Hat 1 08-13-2014 02:37 PM
/.fonts from /etc/fonts/fonts.conf barunparichha Linux - Software 3 11-27-2009 08:16 AM
Fonts, fonts and more fonts raysr SUSE / openSUSE 2 02-09-2009 08:43 PM
Fonts, fonts and more fonts ... terran4000 Linux - Software 1 03-19-2004 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration