GFTTFG
Gentoo's Fast TrueType Font Guide
Artur Brodowski <bzdurqa@wp.pl>
ver. 0.03, 08 VI 2004
-1. Why you shouldn't be reading this document ;-)
0. About this document
1. Where do I get them cool looking truetype fonts?
2. Installation
3. Make it look even better
4. Good ideas and other tips
-1. Why you shouldn't be reading this document ;-)
This guide is not much of a use anymore. Microsoft truetype fonts and
other excellent Unicode font packages
are available from Gentoo's portage now. All you need to do is emerge them:
root@tool # emerge ttf-bitstream-vera
root@tool # ACCEPT_KEYWORDS="~x86" emerge corefonts
Also it's possible to install new *.ttf files in Gnome by simply copying them to ~/.fonts.
0. About this document.
This guide was created as an appendix for Spider's "How do I get pretty desktop in Gnome2" quickie,
though most of it covers common X Window Desktop configuration issues.
References to Xfree86 server are to the version 4.2.0, the latest available in Gentoo Linux distribution.
If you have any questions, comments or addons concerning this document, you are always welcome
to email me at <bzdurqa@wp.pl>
1.0 Where do I get them cool-looking truetype fonts?
First, we need to get truetype fonts with Unicode support. Go to:
http://www.microsoft.com/typography/fontpack/default.htm
or here:
http://www.ccss.de/slovo/unifonts.htm
,
download and unpack fonts onto your disk. Mind that these are selfextracting .exe files.
If you're looking for tar.gz, it can be found here:
http://mirrors.kernel.org/debian/pool/contrib/m/msttcorefonts/msttcorefonts_1.0.1.tar.gz
Those having dual boot system (Windows installed on the other partition), don't have
to copy any files, they can just make symlinks to Windows fonts directory (see pt. 2.1.b).
See the end of this document for some other free truetype fonts sources.
2.0 Installation
2.1.a. Installing downloaded fonts
Su to root first. Fonts can be put anywhere, this is just default path.
root@tool # mkdir /usr/X11R6/lib/X11/fonts/truetype
root@tool # cp /home/bzd/download/tt/*.ttf /usr/X11R6/lib/X11/fonts/truetypei
2.1.b. Using Windows native fonts
When using Windows on the same box, you can link the font files to be seen by
Gentoo like this:
root@tool # mkdir /usr/X11R6/lib/X11/fonts/truetype
root@tool # cd /usr/X11R6/lib/X11/fonts/truetype
root@tool # for i in `ls /mnt/winc/winnt/Fonts/*.ttf`; do ln -s $i ./; done
2.2. Generate indexes
X server uses index files fonts.dir and fonts.scale when searching for truetype font files,
so we need to create them using mkfontdir tool (comes with xfree).
root@tool # cd /usr/X11R6/lib/X11/fonts/truetype
root@tool # /usr/bin/X11/mkfontdir
root@tool # cp fonts.dir fonts.scale
There's also dedicated ttmkfdir tool to generate fonts.scale, but since I don't
use any vicious tuning options, copying fonts.dir works fine.
2.3. Make X server see your fonts.
We need to edit your /etc/X11/XF86Config.
Find section called "Modules" and check if you have these:
Section "Modules"
# ...
Load "type1"
Load "freetype"
Also, X server needs to know where the fonts are, this is what section "Files" is for:
Section "Files"
# ...
FontPath "/usr/X11R6/lib/X11/fonts/truetype/"
If you use any font server (eg. xfs or xfstt) refer to the manuals, you will probably
need to edit some more config files.
2.4. Restart X server (Ctrl-Alt-BkSpace), voila!
Now you should be able to choose truetype fonts in Gnome Control
Center -> Fonts.
3.0 Make it look even better
3.1. Freetype2 configuration
If you're still not satisfied with the look of the fonts,
you can 'tune up' freetype rendering by editing /etc/X11/XftConfig.
Again, we need to make fonts available for Xft like this:
dir "/usr/X11R6/lib/X11/fonts/truetype"
For most people AA fonts in menus etc. are too blurry. We can turn off anti-aliasing for specific fonts:
match
# any family == "Arial"
any size > 8
any size < 15
edit
antialias = false;
Now only very small and really big fonts are antialiased, which is much better for your eyes, believe me ;)
For more descriptive example you might want to check freetype2 doxumentation and look up XFree86 Font De-uglification HOWTO
http://www.fokus.gmd.de/linux/HOWTO/mini/html_single/FDU.html
4.0 Some good ideas and other tips:
* don't double font files on your system; if you have multiple truetype font directories,
and few versions of arial.ttf file, you can not be sure which one is used; instead link
the directories to default one, f.e. wine fonts directory:
root@tool # ln -s /usr/X11R6/lib/X11/fonts/truetype /usr/X11R6/lib/X11/fonts/winfonts
* if you need national characters (e.g. I use Central European encoding - ISO-8859-2):
- check fonts.dir file if your encoding is supported for fonts you want to use
- remember to set your locales, some applications might not use gnome-session settings
* use simpler fonts (Arial, Helvetica) rather than some ancient glyphs ;) also be careful with anti-aliasing as blurred fonts are bad for your sight
Other fonts sources (note that they might not all support the encoding you need)
Gentoo ebuilds:
* x11-misc/lfpfonts-fix
* x11-misc/lfpfonts-var
* x11-misc/sharefonts
* x11-misc/freefonts
Net:
* http://www.geocities.com/SoHo/Gallery/8992/
* http://czcionki.com (in Polish)
* http://barmee.com (in Polish)
* http://www.google.com/search?hl=pl&q=free+truetype+fonts+download
;-D