[erk, to the list now] On Mon, Oct 13, 2003 at 08:25:30PM -0700, M. Kirchhoff said > While looking through the deb-user archives for some font-related info, I > discovered that there is still an insane amount of confusion regarding fonts > under XFree86. Googling, which new users tend to rely on, results in myriad yet > often contracting font guides. > > The two biggies--The Font De-Uglification HowTo and the Font Howto--are outdated > and hopelessly outdated, respectively. They both contain a wealth of important > info, but, alas, that info is likely to send new users down a very dark tunnel > of inexorable agitation. I know, I was one of them.
Yup, I agree. I've answered a few font questions on this list, and I had a little pre-canned reply, which I've expanded. It's available from http://egads.ertius.org/~rob/font_guide.txt, and I pasted it below so everyone can criticize it constructively :) ======================================================================== A very short guide to setting up fonts for X in Debian. It assumes XFree86 4.1 or more recent, and explains how to setup fontconfig and Xft1. 1) Install x-ttcidfont-conf and defoma 2) Add a line like this to /etc/X11/XF86Config-4, in the "Files" section FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" Adding it at the top of the list is probably a good idea. This line will setup XFree86 to use any TrueType fonts you install from Debian packages. If you install a new set of TrueType fonts while in X, run "xset fp rehash" to get XFree86 to look at the contents of that directory again and to pickup new ones. 3) Move this line to the bottom of the list of FontPaths FontPath "/usr/lib/X11/fonts/Type1" XFree86 does a rather poor job of rendering Type1 fonts these days, and if this is above your better looking fonts, you can get a some pretty ugly results. 4) Add :unscaled to the end of the 100dpi and 75dpi font lines, so they look like this FontPath "/usr/lib/X11/fonts/100dpi:unscaled" FontPath "/usr/lib/X11/fonts/75dpi:unscaled" Without the ":unscaled" bit, XFree86 will try to scale these bitmap fonts up and down, which usually looks rather horrible. And, after all that, my Files section looks like this: Section "Files" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" FontPath "/usr/share/fonts/truetype" FontPath "/usr/lib/X11/fonts/CID" FontPath "/usr/lib/X11/fonts/Speedo" FontPath "/usr/lib/X11/fonts/misc" FontPath "/usr/lib/X11/fonts/cyrillic" FontPath "/usr/lib/X11/fonts/100dpi:unscaled" FontPath "/usr/lib/X11/fonts/75dpi:unscaled" FontPath "/usr/lib/X11/fonts/Type1" EndSection Now that it's all setup, install some font packages. ttf-bitstream-vera is a rather nice set of fonts, and is Free enough to go into Debian itself. It's not in woody yet, but you can download the .deb from http://http.us.debian.org/debian/pool/main/t/ttf-bitstream-vera/ttf-bitstream-vera_1.10-3_all.deb (or your local mirror) and install it with "dpkg -i ttf-bitstream-vera_1.10-3_all.deb" (as root). sid and sarge users are just an "apt-get install ttf-bitstream-vera" away from it. Another option is ttf-freefont, which is in all three current versions of Debian. Another alternative is to install Microsoft's Corefonts. They removed the the fonts from their website, but the msttcorefonts package will download them for you from a mirror. Note that these are NOT Free (in the Debian sense), but you're permitted to at least use and download them. Both of these packages (and the other ttf-* packages in Debian) should now Just Work, and appear available to all X programs that use the regular "core" font system. This includes things like xterm, emacs and most other non-KDE and non-GNOME applications. Now, run "xfontsel" and select either "Microsoft" or "Bitstream" in the fndry menu (click on the word "fndry"). Now look at the ungrayed out entries in the "fmly" menu. You should have a bunch of either Microsoft fonts (Verdana, Trebuchet, etc) or some Bitstream ones (or both). For KDE2.2 and GNOME1.4 (with libgdkxft0, which is a hack to get GTK 1.2 to do anti-aliased font rendering), you need to setup Xft1, as well. Xft1 is highly deprecated, and is basically only used by GNOME1.4 and KDE2.2. For GNOME2 and KDE3, you need to setup "fontconfig" which Xft2 uses to find fonts. I'll get to that in a minute. Edit /etc/X11/XftConfig and add a line like dir "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" before the other dir lines. I don't have any xft1 stuff on my machine anymore, so I'm not sure if you need to restart X or not before this change will take effect. I seem to remember that "xftcache" would update the Xft1 cache, but it'd be good if someone could confirm that for me. Now, for fontconfig. You shouldn't need to install anything extra for this, since all the packages using fontconfig will Depend on it (indirectly) already. First, look in /etc/fonts/fonts.conf. There should be a line like the one below. If not, open up /etc/fonts/local.conf and add this <dir>/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType</dir> just after the <fontconfig> line. Fontconfig should pick these up immediately, and "fc-list" should list your new fonts. Another neat feature of fontconfig is that you can just drop fonts in ~/.fonts/ and all your fontconfigified programs will have access to them immediately. -- Rob Weir <[EMAIL PROTECTED]> | [EMAIL PROTECTED] | Do I look like I want a CC? Words of the day: Ft. Knox arrangements beanpole UOP Legion of Doom Echelon Hi, VeriSign! [EMAIL PROTECTED]
signature.asc
Description: Digital signature