[Interest] Qt5 and (lack of!) font rendering quality (Linux/X11)

Allan Sandfeld Jensen kde at carewolf.com
Tue Oct 21 00:31:32 CEST 2014


It sounds like you have a messy font setup. There is no difference between how 
KDE 4 or 5 sets fonts options (through fontconfig), which is also how Qt reads 
it. If were running in a GNOME or UNITY shell though, Qt would pick font-
settings from XSettings that those desktop uses.

Selection between different font weights is working fine, but only if the 
weights exists for the selected fonts, only normal bold can be synthesized. 
Note that weight selection works most reliable through QFont::setWeight but 
selection through stylename matching has also improved recently (not 5.2).

`Allan

On Monday 20 October 2014, René J.V. Bertin wrote:
> I posted this on the Qt forums earlier, but it was suggested to repost
> here:
> 
> I’m a bit of a font freak, so I have “bohoomil”‘s Ultimate version of the
> Infinality patches to libfreetype6 and fontconfig installed. It does
> wonders to my KDE4-based desktop, giving text a quality that’s just about
> as good as with MS Window’s ClearType (using Segoe UI semi-bold as my
> desktop font) and better than OS X’s font rendering.
> 
> Recently I have been playing a bit with “Project Neon5”, (K)Ubuntu’s KDE
> Frameworks 5 playground, to get a preview of what’s supposed to become the
> next KDE desktop. It’s built atop Qt 5.3.2 .
> 
> Font rendering is horrible when starting KF5 applications from under a KDE4
> session: blocky and something is clearly off with RGB antialiasing.
> Thinking it might be due to running beta-quality software in a
> “subsession” rather than a standalone session, I thought I’d had a look at
> “pure” Qt5 from the official (K)Ubuntu repos. That’s Qt 5.2.1 to be exact.
> 
> Font rendering is better here, but it’s still a far cry from being as nice
> as under Qt4. Part of that is due to Qt5 not respecting my choice of fonts
> (picking an unknown other font) but it also seems there’s no distinction
> being made between medium (semi-bold) and bold, making everything look
> either too heavy or too light. I already have to work around this
> “feature” to treat semi-bold fonts as regular bold in Qt on OS X (Qt4 and
> Qt5 are handicapped alike there in this aspect), I REALLY hope that Qt5 on
> Linux won’t follow suit …!
> 
> Infinality Ultimate's author bohoomil had this to say on the subject
> (https://plus.google.com/u/0/+bohoomil-infinality-bundle/posts/SL2jrL9VJyt
> ?cfem=1): "Qt5 is, well, a bit of a mystery to me, too. As far as I can
> tell, the font rendering issues are common regardless of whether you use
> stock freetype2 or the patched one: Qt5 apps just stand out which makes me
> think that the toolkit must be much too different internally from its
> predecessor. (It has been already reported on fontconfig-ultimate bug
> tracker.) By the way, it reminds me of Chrome's approach which also, 'by
> design', doesn't play nicely with Linux's font rendering backend
> (fontconfig in this case: one of the things that won't work is font
> substitution). I think we just have to wait and see how Qt5 advances as
> it's still under heavy development."
> 
> Thoughts, reactions or other feedback welcome!
> 
> René
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list