GNOME Bugzilla – Bug 142640
FcConfigSubstitute in place of _vte_fc_defaults_from_gtk to get antialias and hinting value
Last modified: 2008-10-12 14:08:48 UTC
To decide the pattern of each font, _vte_fc_defaults_from_gtk () is called to fill those values. But sometimes those GTK default setting contradicts to those in /etc/fonts/fonts.conf. for example, i'd like to disable hinting in for CJK font in fonts.conf and disable antialias for those fonts at specific range of font size because those fonts embed bitmap data and i prefer bitmap data when available. using _vte_fc_defaults_from_gtk would make UI inconsistency across desktop. Can FcConfigSubstitute() be used instead?
Created attachment 27768 [details] [review] the patch to configure pattern with FcConfigSubstitute
It works fine.thx a lot.
Isn't this a bug in gtk, then?
Is gtk+ setting the wrong defaults? Please respond to Mariano's question.
Sorry. i missed Mariano's question. Not sure whether it is bug in gtk or not.It is due to that it looks for gtkrc to get AA and hinting setting. Can we change to get those defaults from fonts.conf instead.
I maybe wrong, but as far as I can see _vte_fc_defaults_from_gtk() only gets the global settings and not the specific settings for the particular font.
Owen, could you comment on this?
You certainly can't use it *instead* - that will lose the ability to get the settings set from gnome-settings-daemon. I don't know why, however, the vte code is just blindly overwriting values already in the pattern - compare _vte_fc_defaults_from_gtk() with the (GTK+-2.6) gtk_default_substitute(). Some looking around in VTE CVS history to find out if it was like the GTK+ version and then changed might be useful.
Created attachment 77926 [details] [review] updated patch We are now using the attached patch instead of the one in the above comment. Not sure if this resolves the issues raised, but at least people should review the latest patch.
No, the patch is still clearly wrong.
*** Bug 126799 has been marked as a duplicate of this bug. ***
I've now done the research and found no reason for the broken behavior of _vte_fc_defaults_from_gtk(). So, someone should patch it to not overwrite already-set items in the pattern. Much like _vte_fc_defaults_from_rdb(). We can get rid of all the FcPatternDel() stuff then. Any takers? Debian and JDS guys!
*** Bug 490191 has been marked as a duplicate of this bug. ***
2007-11-06 Behdad Esfahbod <behdad@gnome.org> Bug 142640 – FcConfigSubstitute in place of _vte_fc_defaults_from_gtk to get antialias and hinting value * src/vtefc.c (_vte_fc_defaults_from_gtk), (_vte_fc_defaults_from_rdb): Replace _vte_fc_defaults_from_gtk() with gtk_default_substitute() from Gtk+-2.6. It's essentially the same thing, but not overriding elements of the pattern already present. Also remove a couple redundant calls.
*** Bug 480936 has been marked as a duplicate of this bug. ***
I still see this on Ubuntu 8.04, using libvte 0.16.13-1ubuntu1 and gnome-terminal 2.22.1-0ubuntu2. That is, for gnome-terminal, /etc/fonts/conf.d override those in gnome-appearance-properties.
I am using Ubuntu 8.04 with latest patches as of July 27th and the issue still appears to exists... turned off system anti-aliasing to get non-fuzzy fonts but gnome terminal is still fuzzy. The KDE terminal is ok.
Konsole was having same issue when I just installed it on ubuntu as a work around to having fuzzy fonts with gnome-terminal. Then I installed kcontrol on ubuntu and turned off anti-aliasing there it fixed gnome-terminal too. Hope this helps someone figure out where the bug is.