Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone enlighten me on the way font appearance (hinting, antialiasing) works? As far as I understand,

  1. There is .fonts.conf
  2. There are individual font settings for Gnome, XFCE and KDE (or do they just modify .fonts.conf; or else where do they keep their font configurations?) For XFCE, it is in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml for example.
  3. Then there are .Xresources and libXFT.
  4. Then there is some info regarding BCI which is not enabled by default, however this seems rather obsolete as far as I understand.
  5. Finally, there is the issue of a DPI setting, which I can specify in Xorg, or in each WM.

I am confused as to which setting is used when. To add more confusion, some terminal programs have an option to antialias fonts.

It seems that .fonts.conf is the best of these options; but still with a .fonts.conf the appearance seems to differ under different WMs.

I am running Debian and Ubuntu btw.

share|improve this question

2 Answers 2

up vote 3 down vote accepted
  • /etc/fonts hold Xft settings, while .fonts.conf is a per-user override of /etc/fonts/*
  • DEs set their settings using X settings daemon (there are several of them, one in each DE, and also several standalone for use with lightweight WMs)
  • applications get settings either from Xft directly (/etc/fonts), or from X settings daemon if it is active.
  • some applications (e.g. Google Chrome) only get settings from X settings daemon. so the only way to get proper fonts in Chrome running under lightweight WM is to run some sort of xsettingsd
  • gtk and qt apps treat some of Xft settings differently, so it can be tricky to create fonts.conf that works in the same way in Qt and GTK.

and here's what i think, but didn't really check:

  • GDK/Pango uses Xft with its default settings, either from fonts.conf or X settings.
  • Qt adds extra tweaks to fonts.conf settings, which breaks some of the settings.
  • Cairo seems to respect xft settings, but rendering looks slightly differently compared to Pango.
share|improve this answer

I'm not exactly sure how much of the below is truth, but it is how I understand these things. Comment/edit/correct if you like.

  • /etc/fonts/local.conf, /etc/fonts/conf.d/ and ~/.fonts.conf are for freetype2. They handle font substitution, per-font settings, all that stuff, and they apply for FreeType no matter where it is used.

  • Xft X resources only apply when FreeType is used in X through libxft. They override fontconfig settings.

  • GNOME font smoothing settings are just passed to Xft when gnome-settings-manager is started. They override settings specified in X resources. Probably the same in KDE and Xfce.

  • Terminal emulators using libxft, like any other program, can tell it to use specific settings (such as 'disable antialiasing'), probably per-widget or something. (In Windows, programs can opt out of ClearType too.)

  • WM means "window manager". Window managers only care about managing windows, I haven't seen one that would touch my font settings. (Try starting metacity, xfwm4, compiz directly, you should see no difference in font rendering.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.