qt font hinting with lxde

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

qt font hinting with lxde

Post by pevsner »

I am running Salix13.1.1 with lxde.
I have never been able to get the font hinting right in Qt (4.6.2 or any version).
To get the hinting right for lxde I edit ~/.Xresoures to hintslight:
[codeXft.dpi: 96
Xft.hinting:1
Xft.hintstyle:hintslight
XTerm*background:black
XTerm*foreground:white
XTerm*faceName: Terminus:antialias=False:pixelsize=14][/code]
qtconfig doesn't have a hinting option. I have tried various other methods found on other distro's forums to no avail.
A suggestion would be appreciated.
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: qt font hinting with lxde

Post by thenktor »

My Qt hinting is ok here, except for buggy Opera. You can try installing kdebase and use systemsettings.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: qt font hinting with lxde

Post by pevsner »

I created a ~/.fonts.conf as shown below, we seems to do the trick.

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit name="rgba" mode="assign">
<const>none</const>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
</match>
</fontconfig>
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: qt font hinting with lxde

Post by thenktor »

Yep, I have this on my system:

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <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>hintmedium</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>
Probably this was created by KDE system settings. Strange that qtconfig doesn't have a dialog for this stuff.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: qt font hinting with lxde

Post by pevsner »

I just tried opera 10.62 again and now the fonts are great (I had given up on it as the font were so bad before).
It might be an idea to include a ~/.font.conf file in non-kde Salix with a note in the wiki regarding editing it to specific hinting?
Post Reply