· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
TrueType Fonts with XFree86 4.0.x mini-HOWTO

Bartek Kostrzewa, bartek@pt.lu 0.0.4, 2001-02-23

This mini-HOWTO describes how to use TrueType (*.ttf) fonts with XFree86 4.0.x.

1. Copyright

Download, copy and redistribute this text freely. If you do any changes, please submit them to me, and I will pass them to the LDP, of course, credit will be given.

Copyright (c) 2001 by Bartek Kostrzewa

2. Procedure

Get a set of TrueType fonts (for example from one of the many sites making fonts availiable for download) and do the following as root at the command line:

트루타입 폰트를 다운 받고 (시험삼아 다운로드가 가능한 여러 사이트에서 하나를 받아라) 루트 권한으로 다음의 명령어를 입력하라:
  • mkdir /usr/X11R6/lib/X11/fonts/Truetype
  • cp /home/joeuser/yourdownloaddirectory/*.ttf /usr/X11R6/lib/X11/fonts/Truetype
  • cd /usr/X11R6/lib/X11/fonts/Truetype
  • ttmkfdir > fonts.scale
  • mkfontdir

Now if you have a working installation of Windows on one of your partitions, you must use the fonts directly from there, copying them to a directory of your Linux partition is considered *illegal*. First read up on how to get your windows partition detected and working in Linux (most distributions do that at installation time, and by default), then as root do the following:

  • cd /etc/X11
  • your-favourite-editor XF86Config In some X distributions this file is used with a number added to it (for example: XF86Config.4). You will have to find out which file your X11R6 uses. You can do this by typing: less /var/log/XFree86* and then instead edit the file stated in the log.
  • Now, in the editor find the section Files and the lines with FontPath, just add FontPath "/yourwinpartition/windows/fonts/" at the bottom of this list. (yourwinpartition must be replaced with the mount point of your windows partition)
  • cd /winpartition/windows/fonts
  • ttmkfdir > fonts.scale
  • mkfontdir

This will make all the fonts on your Windows partition work correctly in X.

There you go. You will now have all of your TrueType fonts working. If you want to add fonts, just move/copy those [*.ttf files] into the aforementioned directory, and repeat the process.

Netscape has problems with these fonts, you have to check the "Allow Scaling" setting in the Fonts dialog, don't feel distracted by the fact that it only shows font sizes 0 and 12. Mozilla has no such problems. Opera neither.

The mkfontdir executable should be included with your XFree 4.0.x distribution.

If you are missing ttmkfdir, you can obtain it here: http://www.joerg-pommnitz.de/TrueType/ttmkfdir.tar.gz

The latest verion of XFree86 (currently 4.0.2) can be found at: http://www.xfree86.org





sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-05-24 00:48:51
Processing time 0.0097 sec