opensuse 10.2 font ugliness

The font rendering (in GNOME, at least) on openSUSE 10.2 is terrible out of the box on all 3 of my machines. Federico pointed me to this bug which gives some ideas on how to fix it, although it’s not clear to me how to fix it generally.

None of the presets under “Font Rendering” in gnome-font-properties are good enough. “Best shapes” is the best of the four, but then I went into the “Details” to fine tune it. First, I set the “Smoothing” to “Subpixel (LCDs)” since I’m running on only LCDs and I set “Hinting” to “Slight”. Now font rendering is pretty again in GNOME.

Firefox, however, doesn’t seem to follow the GNOME settings. So it’s necessary for me to put the following in my ~/.fonts.conf file:

<fontconfig>
<!-- Need this to override fontconfig/freetype defaults for Firefox -->

<match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>

 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>

 <match target="font" >
  <edit mode="assign" name="autohint" >
   <bool>false</bool>
  </edit>
 </match>

 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintslight</const>
  </edit>
 </match>

 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>

 <match target="font" >
  <edit mode="assign" name="dpi" >
   <double>96</double>
  </edit>
 </match>
</fontconfig>

(Hmm, wordpress doesn’t seem to do CDATA…)

Restart Firefox, and font rendering is pretty there again too.

2 comments

Comments are now closed.