You are not logged in.

#1 2016-10-14 11:52:33

linka
Member
Registered: 2016-10-14
Posts: 7

Can't change GTK font hinting settings

I wish I could change my font hinting level in GTK apps, but whenever I change it in the lxappearance applet, it returns back to 'full'. The corresponding settings in ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini match the settings I choose, but it has no effect. I can even turn off antiliasing completely, but it looks absolutely the same even if I relog the session. I'm mostly running Qt apps and I can change font rendering settings just like I want and it works perfectly. What's the problem? Is there another config file that GTK uses for that?

Offline

#2 2016-10-14 11:57:09

promarbler14
Member
From: MD, U.S.
Registered: 2016-03-28
Posts: 40

Re: Can't change GTK font hinting settings

You may be interested in the file /etc/profile.d/freetype2.sh . It pertains to the image used for hinting text. (This is a fairly recent addition, with the relatively recent changes in FT2.)

Offline

#3 2016-10-14 12:01:08

linka
Member
Registered: 2016-10-14
Posts: 7

Re: Can't change GTK font hinting settings

My /etc/profile.d/freetype2.sh file is empty (everything is commented out). I can maybe change it there, but won't that interfere with Qt and GTK settings? Will the settings from that script be used primarily?

Offline

#4 2016-10-14 12:53:07

Hund
Member
From: Sweden
Registered: 2010-03-22
Posts: 479
Website

Re: Can't change GTK font hinting settings

This is my font settings:

$ cat ~/.config/fontconfig/fonts.conf

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <!-- Enable hinting -->i
  <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintfull</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

Don't forget to restart X to apply the changes.

Offline

#5 2016-10-14 15:14:45

linka
Member
Registered: 2016-10-14
Posts: 7

Re: Can't change GTK font hinting settings

My ~/.config/fontconfig/fonts.conf file isn't much different except for the hintstyle which I want to be set as 'hintslight', though GTK apps don't seem to respect it.

[karolina@netbuk ~]$ cat .config/fontconfig/fonts.conf 
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- created by lxqt-config-appearance (DO NOT EDIT!) -->
<fontconfig>
  <include ignore_missing="yes">conf.d</include>
  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</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>hintslight</const>
    </edit>
  </match>
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
  <match target="pattern">
    <edit name="dpi" mode="assign">
      <double>96</double>
    </edit>
  </match>
</fontconfig>

Offline

Board footer

Powered by FluxBB