source: x/installing/truetype.xml@ 0a9287a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v1_0 v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 0a9287a was 19e9cee, checked in by Bruce Dubbs <bdubbs@…>, 22 years ago

Added freetype2 to xfree86; removed objprelink from kde; Update kde to 3.0.3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@230 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.6 KB
Line 
1<sect1 id="x-installing-truetype">
2<?dbhtml filename="truetype.html" dir="x"?>
3<title>Adding TrueType font support to XFree86</title>
4
5<para>TrueType font support is now built into XFree86. The following items need to
6be completed to make the fonts available.</para>
7
8<itemizedlist>
9
10<listitem><para>Establish a directory for the fonts and move any
11TrueType fonts you want into that directory.</para></listitem>
12
13<listitem><para>Create the <filename>fonts.scale</filename> and
14<filename>fonts.dir</filename> files in the TrueType font
15directory.</para></listitem>
16
17<listitem><para>Ensure the truetype module is loaded in
18<filename>XF86Config</filename>.</para></listitem>
19
20<listitem><para>Ensure the <parameter>FontPath</parameter> in
21<filename>XF86Config</filename> contains the TrueType font
22directory.</para></listitem>
23
24</itemizedlist>
25
26<sect2><title>Establish a TrueType font directory</title>
27
28<para>The build of XFree86 as given above automatically creates a TrueType
29font directory: <filename>/usr/X11R6/lib/X11/fonts/TTF</filename>. This
30directory is already has some TrueType fonts and is set up correctly.
31If this directory is satisfactory, copy any other TrueType fonts you want
32into that directory. If not, create a new directory, preferably in
33the <filename>/usr/X11R6/lib/X11/fonts/</filename> directory and put
34your TrueType fonts there.</para></sect2>
35
36<sect2><title>Create <filename>fonts.scale</filename> and
37<filename>fonts.dir</filename></title>
38
39<para>To make the <filename>fonts.scale</filename> file, you have to build the
40program <filename>ttmkfdir</filename>. Unfortunately, this program needs
41libraries from the <filename>freetype</filename> project, so we need to make
42that first.</para>
43
44<screen>Download location (HTTP): <ulink url="http://prdownloads.sourceforge.net/freetype/freetype-1.3.1.tar.gz"/></screen>
45
46<para>Unpack the file and build with
47<screen><userinput>./configure --prefix=/usr &amp;&amp;
48make &amp;&amp;
49make install &amp;&amp;
50ldconfig</userinput></screen></para>
51
52<para>Now build the <filename>ttmkfdir</filename> utility.
53<screen>Download location: <ulink url="http://freshmeat.net/projects/ttmkfdir"/></screen>
54The filename is <filename>ttmkfdir.tar.gz</filename>.
55</para>
56
57<para>This is a very short program that unpacks it is files in the current
58directory, so its best to make a separate directory.
59<screen><userinput>mkdir ttmkfdir &amp;&amp;
60cd ttmkfdir &amp;&amp;
61tar zxvf ../ttmkfdir.tar.gz</userinput></screen></para>
62
63<para>Edit the <filename>Makefile</filename> to make the following changes:
64<screen>FREETYPE_BASE=/usr
65FREETYPE_INCL=$(FREETYPE_BASE)/include/freetype
66FREETYPE_LIB=-L$(FREETYPE_BASE)/lib -lttf</screen>
67</para>
68
69<para>Run
70<screen><userinput>make &amp;&amp;
71install -m755 ttmkfdir /usr/bin</userinput></screen></para>
72
73<para>Now change to the directory where you have your TrueType fonts and run
74<screen>ttmkfdir -o fonts.scale &amp;&amp;
75mkfontdir</screen></para></sect2>
76
77<sect2><title>Ensure TrueType is loaded in <filename>XF86Config</filename></title>
78<para>The "Module" section should look like:
79<screen>Section "Module"
80 ...
81 Load "freetype"
82 Load "speedo"
83EndSection</screen></para></sect2>
84
85<sect2><title>Ensure the <parameter>FontPath</parameter> in
86<filename>XF86Config</filename> points to the TrueType font directory</title>
87<para>The "Files"section should look like
88<screen>Section "Files"
89 ...
90 FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
91EndSection</screen></para>
92
93<para>XFree86 will now be able to use TrueType fonts when it is restarted.
94You can check to see if the new fonts are available with the
95<userinput>xlsfonts</userinput> program.</para></sect2>
96
97</sect1>
98
Note: See TracBrowser for help on using the repository browser.