[CDBUG-talk] Setting up X HOWTO

D DD ddeldebb at gmail.com
Thu Sep 6 11:03:01 EDT 2007


Hi all,

I am sure by now everyone on this list knows how to set up an XServer.  I
have been trying to tweak my XServer settings to get the fonts to be better
than Windows.  That is what I want.  No Beryl eye candy just the best,
sharpest fonts I can get. I am really psyched about the final results and
thought I'd share.

1.) I downloaded and installed the microsoft fonts
2.) I start the Xserver from the console with the standard "startx" command.
3..) I have a /etc/X11/xinit/xserverrc file which contains.
* #!/bin/sh*

*exec /usr/X11R6/bin/X –dpi 96 –nolisten tcp*

I mistakenly thought this was enough to get fonts at a 96dpi; it wasn't.  I
didn't know you also need to set xfs to 96dpi.  And that's when everything
starts looking fabulous.
4.) I have a /etc/fonts/local.conf that contains:

<?xml version="1.0"?>

<!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd">

<fontconfig>



<!-- Disable sub-pixel rendering.

 X detects it anyway, and if you set this as well, it just looks really
horrible  -->

<match target="font" >

      <edit mode="assign" name="rgba" >

       <const>none</const>

      </edit>

 </match>

 <match target="font" >

      <edit mode="assign" name="hinting">

       <bool>true</bool>

      </edit>

 </match>

 <match target="font" >

      <edit mode="assign" name="hintstyle">

       <const>hintfull</const>

      </edit>

 </match>



<!-- The first part of the 'magic.'

 This makes the fonts start to look nice,

 but some of the shapes will be distorted, so hinting is needed still -->

 <match target="font" >

      <edit mode="assign" name="antialias">

       <bool>true</bool>

      </edit>

 </match>



<!-- Autohinter is not turned on automatically.

 Only disable this if you have recompiled Freetype with the bytecode
interpreter,

 which is run automatically.<br />  -->

 <match target="pattern" >

      <edit mode="assign" name="autohint">

       <bool>true</bool>

      </edit>

 </match>

 <match target="font">

       <test name="weight" compare="more">

             <const>medium</const>

       </test>

       <edit name="autohint" mode="assign">

             <bool>false</bool>

       </edit>

 </match>

<!-- Helvetica is a non true type font, and will look bad.

 This replaces it with whatever is the default sans-serif font -->

 <match target="pattern" name="family" >

      <test name="family" qual="any" >

       <string>Helvetica</string>

      </test>

      <edit mode="assign" name="family" >

       <string>sans-serif</string>

      </edit>

 </match>

<match target="pattern">

      <edit name="dpi" mode="assign"><double>96</double></edit>

</match>

      <dir>/usr/local/lib/X11/fonts/artwiz-aleczapka/</dir>

      <dir>/usr/local/lib/X11/fonts/mscorefonts/</dir>

      <dir>/usr/local/lib/X11/fonts/ghostscript/</dir>

</fontconfig>



This local.conf was lifted from the archlinux wiki.  It is at the very
bottom of their configuring fonts page.

*     ***

**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nycbug.org/pipermail/cdbug-talk/attachments/20070906/b536f00e/attachment.html>


More information about the CDBUG-talk mailing list