Font Settings

In my old blog I had one article about font settings in ubuntu edgy. Unfortunately I don’t have an online backup of that page and there was a request for the data there, so I just post it here again as blog post:

There are many ways to improve the font rendering. (That’s because the ubuntu defaults are hideous). Since hoary I use my own font configs based on a configuration from someone I can’t remember.

If you’re looking for a screenshot have a look at the screenshots in the vim article.

xorg.conf
Locate Section “Monitor” and add the following line before !EndSection:

DisplaySize     XXX YYY

You can calculate XXX and YYY using this formula:

DisplaySize = height / 96 * 25.4 width / 96 * 25.4

Here the values I use for various systems:
1024×768 = 270 203
1280×1024 = 338 270
1400×1050 = 370 277

selecting rendering method

dpkg-reconfigure fontconfig

Run a root and select “subpixel rendering”.

local.conf
Create a file /etc/fonts/local.conf and paste the following lines:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <include ignore_missing="yes">/var/lib/defoma/fontconfig.d/fonts.conf</include>
 <match target="font">
  <test compare="more" name="pixelsize" qual="any">
   <double>12</double>
  </test>
  <edit name="autohint" mode="assign" >
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
  <edit mode="assign" name="hintstyle" >
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="pattern">
  <test qual="any" name="family">
   <string>Bitstream Vera Sans</string>
  </test>
  <edit name="family" mode="assign">
   <string>Arial</string>
  </edit>
 </match>
 <match target="pattern">
  <test qual="any" name="family">
   <string>Helvetica</string>
  </test>
  <edit name="family" mode="assign">
   <string>Arial</string>
  </edit>
 </match>
 <match target="pattern">
  <test qual="any" name="family">
   <string>Palatino</string>
  </test>
  <edit name="family" mode="assign">
   <string>Georgia</string>
  </edit>
 </match>
</fontconfig>

even better settings
You still don’t have what you want? Then try out the patches from this thread on ubuntuforums. But use my local.conf which produces better bold fonts.

Leave a Reply

cogitations driven by wordpress