Comment 33 for bug 161058

Revision history for this message
In , Krzysztof Kotlenga (pocek) wrote :

Please excuse me if this is not the best place to bring this topic, but what exactly is the point of supporting all these Xft.<option> xresources?

Maybe I'm a bit uniformed but this stuff is broken by design anyway (hence fontconfig). I mean, toolkits and whatnot shouldn't give a f..k about those options because all they should care about is fontconfig. Setting some Xft.<foo> is global (is terms of fonts) and this is what makes it almost totally useless. Everyone who digs fonts knows that you can't get all your fonts right just by setting some global options. Most good quality fonts (mostly from professional font foundries, but not only) require "tweaks" in hintstyle etc. to look good (in other words - they only look good with e.g. hintstyle=hintslight). If you set Xft.hintstyle to hintmedium, you get one group of fonts properly shaped and in the same time some other group of fonts to look suboptimal or unacceptable.

[This is also a good place to point out that approach taken by tools like gnome-appearance-properties (which tries to screw^Wsave the world by playing with Xft xresources/xsettings via gnome-settings-daemon) is blatantly naive, except if you're blind or just used to bad looking screen fonts.]

"But these are just Xft defaults and we should obey them" you may say. Yeah, but dealing with those legacy options brings SO MUCH CONFUSION and bizarre bugs I lack words to describe it. Every toolkit/app and their dog tries to do something with them and almost always fails to do it right (perhaps because it's impossible to do so). Let's take emacs for an example. Emacs can use gtk2 and fontconfig, but not cairo. It pretty much succeeds but what's striking is that it basically fucks up FcPatterns by modifying them with stuff from Xft xresources. After getting them from fontconfig, so any carefully crafted (font/pattern-specific or not) fontconfig configuration gets ignored. It'll screw it even if Xft.<foo> stuff isn't set. It's a disaster. Qt, OpenOffice, Java runtime... ugh. *Even cairo can't get its shit together.*

The bottom line is: why not use fontconfig for everything, so app/toolkit developers won't do stupid things like the mentioned above?

Freetype is pretty capable of providing good results, but bugs like this simply prevent demanding users from making use of it.

Also, If you don't believe this stuff, just google around, see how users are struggling in confusion.

Sorry for the style of this comment. I couldn't help myself. My English is so poor I can only rant ;)