Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Ugly qt fonts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
maystorm
Apprentice
Apprentice


Joined: 02 Jun 2002
Posts: 218
Location: Germany, not far away

PostPosted: Sat Feb 22, 2014 5:26 pm    Post subject: [Solved] Ugly qt fonts Reply with quote

Hi folks,

I am using a few QT-based applications like unetbootin and VirtualBox and I am wondering why the fonts are so badly rendered. Please have a look at this comparison:

http://imageshack.com/a/img42/7290/68mu.png

To the left there is VirtualBox on my Gentoo and to the right there is VirtualBox on Xubuntu. Quite a difference in font rendering.

I am using XFCE4 as my desktop environment and all my other fonts look very good.

I am now looking for the knob I need to turn to improve the fonts in QT. Any idea?

TIA!
_________________
Linux user #216018


Last edited by maystorm on Sat Feb 22, 2014 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Feb 22, 2014 10:00 pm    Post subject: Reply with quote

I compile qt4 with these options to ./configure, amongst others:

Code:
-gtkstyle -freetype -system-freetype -fontconfig


Also, qt4 doesn't seem to support freetype & fontconfig properly, so you probably want in ~/.Xresources:

Code:
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.autohint:   false
Xft.antialias:  true
Xft.dpi:        96
Xft.hinting:    true
Xft.rgba:       rgb


And then run:
Code:
xrdb -merge ~/.Xresources


Note that your xubuntu fonts are bigger, so maybe want 120 instead of 96 - these are the common values.

~/.Xresources is the horrendously old-style method, really nasty :(
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1360
Location: Montréal

PostPosted: Sat Feb 22, 2014 11:08 pm    Post subject: Reply with quote

In plus, you can emerge the qtgui package who provide the qtconfig interface to set fonts for Qt applications. I enable the gtkstyle USE flag for qtgui to be able to give the same look to Qt applications than Gtk ones.
_________________
Paul
Back to top
View user's profile Send private message
maystorm
Apprentice
Apprentice


Joined: 02 Jun 2002
Posts: 218
Location: Germany, not far away

PostPosted: Sat Feb 22, 2014 11:17 pm    Post subject: Reply with quote

Thank you for your hints which led me to play a bit with USE flags. I finally compiled qtgui and qtopengl as follows (activated 'gtkstyle' and 'egl'):

Code:
[ebuild   R    ] dev-qt/qtgui-4.8.5-r1:4  USE="accessibility egl exceptions glib gtkstyle mng tiff xv (-aqua) -cups -debug -nas -nis -pch -qt3support -trace -xinerama" 0 kB
[ebuild   R    ] dev-qt/qtopengl-4.8.5:4  USE="egl exceptions (-aqua) -debug -pch -qt3support" 0 kB


Additionally I created ~/.Xresources with your proposed lines, et voila:

http://imageshack.com/a/img132/2186/c3re.png

A hundred times better than before. :)

Thanks.
_________________
Linux user #216018
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum