You are not logged in.

#1 2011-11-19 11:52:56

bibstha
Member
Registered: 2011-05-17
Posts: 11

[solved] Font rendering different in qt and gtk (Chrome vs Firefox)

Hi,

The font rendering in firefox and chromium seems different. The fonts in firefox generally look nice while something does not seem right in chromium.

I've posted the screenshot below.

Fonts in firefox
http://img811.imageshack.us/img811/602/fontfirefox.png

Is this because one is based on GTK and another QT?
http://img205.imageshack.us/img205/9391 … romium.png

Here is another screenshot of playlist in TOTEM vs Clementine

Fonts between TOTEM player (GTK) and Clementine (QT) ?
http://img10.imageshack.us/img10/289/fontcompare.png

What configuration should I change to make Chromium or Clementine more like Firefox fonts?

Mod edit: The included images are too big: https://wiki.archlinux.org/index.php/Fo … s_and_Code. You may want to read these Screenshot Posting Rules as well.

Last edited by bibstha (2011-11-19 21:08:28)

Offline

#2 2011-11-19 12:59:41

jiyuu
Member
Registered: 2010-04-13
Posts: 63

Re: [solved] Font rendering different in qt and gtk (Chrome vs Firefox)

You can create/modify your '~/.fonts.conf' to add hinting and subpixel rendering. More info here

my '~/.fonts.conf' is like this:

<?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>hintslight</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

Offline

#3 2011-11-19 21:08:17

bibstha
Member
Registered: 2011-05-17
Posts: 11

Re: [solved] Font rendering different in qt and gtk (Chrome vs Firefox)

Thanks, the fonts look better in Chromium and Skype now.
Atleast I now know where to tiner.

Offline

#4 2012-09-09 06:09:36

rzelnik
Member
Registered: 2012-01-05
Posts: 2

Re: [solved] Font rendering different in qt and gtk (Chrome vs Firefox)

This solution worked well for me till the changes in Fontconfig configuration. After that change I had to move the ~/.fonts.conf content (mentioned above) in /etc/fonts/local.conf (this is global setting). Now it works well again with Chromium. $XDG_CONFIG_HOME/fontconfig/fonts.conf should work for per-user settings. See Fontconfig_configuration.

Last edited by rzelnik (2012-09-09 06:10:14)

Offline

Board footer

Powered by FluxBB