Because different distributions ship with different configurations, it is not true that one size fits all. We can split users up into three groups:
Your distribution ships with a stand-alone xfs and it has been patched to support TrueType. This group includes Redhat users and users of derivatives of Redhat such as Mandrake, and TurboLinux. Debian 3.0 will also include the patched xfs, currently in testing. For this group, the wisest strategy is to install both TrueType and Type 1 fonts through xfs
Some distributions ship with a stand-alone xfs package, but no TrueType support. Note that XFree86 supports TrueType as of version 4.0. This includes Debian stable ("potato"). For these users, the best thing to do is use xfs to install Type 1 fonts, and install TrueType fonts via xfstt. Debian users can seek out the TrueType Fonts in Debian mini-HOWTO for information about installing TrueType fonts in Debian.
If you don't have xfs then you will need to install Type 1 fonts by adding to their XFree86 font path and using xset. using xset. XFree86 3.x users should install TrueType fonts via xfstt, while XFree86 4.x users can add them to the X font path. You should install TrueType fonts via xfstt.
XFree86 finds your fonts by searching a font path, a list of directories ( or servers -- we'll explain this further later. ) containing fonts. When an application requests a font, it searches through the directories in your font path one at a time until the font is found. To make fonts available requires you to set your font path. You can add a directory to your font path with the command xset fp+ directory Once you have done this, you need to ask the X server to re-scan for available fonts with the command
xset fp rehash |
... Section "Files" ... FontPath /usr/share/fonts/myfonts ... EndSection ... |
Now you need to add the fonts to your font path. If you already have the stand-alone Section 4.4 running, you do this by editing your xfs configuration file. RedHat users can just use chkfontpath. the format is chkfontpath --add directory
Your fonts will be available to X after you restart xfs, or tell it to reload by sending a SIGHUP. You may need to run xset fp rehash as well.
Your fonts should now be available to X. Now you just run xset fp rehash and X will be able to find the new fonts.
To set up xfstt, just download it and install it. Once you install it, you need to do the following:
install fonts into the appropriate directory ( read the documentation that comes with the package ).
/usr/X11R6/bin/xfstt --sync /usr/X11R6/bin/xfstt & |
The xfs font path is determined by the xfs configuration file, which is /etc/X11/fs/config on Redhat, and /etc/X11/xfs/config on Debian. Redhat users do not need to explicitly edit this file, they can use the chkfontpath utility. The syntax is simple:
chkfontpath --add directory |
catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled, ... /usr/share/fonts/my_new_fonts/, ... /usr/share/fonts/some_other_directory # in 12 points, decipoints default-point-size = 120 ... |
To prepare a font for xfs, you need to follow the following steps:
ps ax|grep xfs |
... Section "Files" ... FontPath "unix/:-1" ... EndSection ... |
/etc/rc.d/init.d/xfs restart |
After restarting xfs, it's a good idea to restart your X-session.
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |