Different font settings for a particular programme possible?

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Different font settings for a particular programme possible?

#1 Post by Duliwi »

Hello

I have made my system Antialiasing free. And use an antialiasing-free friendly font as system font. It's Arial. This works.

But now I use a programme, that has its own font. So it does not use Arial font from my system. It's a Flatpak programme and the font it uses is not "antialiasing free" -friendly. There is also no possibility to change the font inside of this programme. So this antialiasing friendly font of this programme looks terrible without antialiasing enabled.

So here is my question:
Is it possible to enable antialiasing just for one particular programme? (In this case even a Flatpak programme?)

---------

Here are my current settings:
k20230115-190419.png
k20230115-190610.png

Content of /etc/fonts/local.conf :

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>

  <alias>
    <family>sans-serif</family>
    <prefer><family>Arial</family></prefer>
  </alias>
  
  <alias>
    <family>monospace</family>
    <prefer><family>DotumChe</family></prefer>
  </alias>

  <alias>  
  <family>serif</family>
    <prefer><family>Times New Roman</family></prefer>
  </alias>
  
  <match target="font">
    <edit mode="assign" name="antialias">
       <bool>false</bool>
    </edit>
  </match>
  
</fontconfig>

Any idea?
You do not have the required permissions to view the files attached to this post.
Last edited by Duliwi on Sat Feb 04, 2023 7:21 am, edited 1 time in total.

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: Different font settings for a particular programme possible?

#2 Post by Duliwi »

?

User avatar
Duliwi
Posts: 1178
Joined: Sun Jul 07, 2019 9:34 am

Re: Different font settings for a particular programme possible?

#3 Post by Duliwi »

Here is the answer from ChatGPT:
To display the Flatpak programme with antialiasing without affecting the other fonts in the system, you can set an environment variable that applies only to this programme. You can do this by creating a shell script that starts the programme and sets the appropriate environment variable. For example, the script might look like this:

Code: Select all

#!/bin/bash
export CAIRO_FORCE_BUGGY_CPU_BUG_WORKAROUNDS=1
flatpak run com.example.program
In this example, the script sets the environment variable CAIRO_FORCE_BUGGY_CPU_BUG_WORKAROUNDS to 1 before starting the Flatpak programme. It is possible that they set another variable to display the font with antialiasing.
I am sceptical: Is there really an environment variable CAIRO_FORCE_BUGGY_CPU_BUG_WORKAROUNDS in FreeTube flatpak?

Post Reply

Return to “MX Help”