Introduction to Fontconfig
The Fontconfig package contains a
library and support programs used for configuring and customizing
font access.
Fontconfig Dependencies
Required
FreeType-2.13.3 - Pass 2
Optional
bubblewrap (used by some tests), cURL-8.11.0 and unzip
(both used by some tests for downloading and extracting test files)
Note
An Internet connection is needed for some tests of this package.
Note
If you have DocBook Utils
installed and you remove the --disable-docs
parameter from the
configure command
below, you must have SGMLSpm and texlive installed also, or the
Fontconfig build will fail.
Installation of Fontconfig
Install Fontconfig by running the
following commands:
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-docs \
--docdir=/usr/share/doc/fontconfig-2.15.0 &&
make
To test the results, issue: make
check. One test is known to fail if the kernel does
not support user namespaces. Some tests will download some font
files via Internet.
Now, as the root
user:
make install
If you did not remove the --disable-docs
parameter from the
configure command,
you can install the pre-generated documentation by using the
following commands as the root
user:
install -v -dm755 \
/usr/share/{man/man{1,3,5},doc/fontconfig-2.15.0/fontconfig-devel} &&
install -v -m644 fc-*/*.1 /usr/share/man/man1 &&
install -v -m644 doc/*.3 /usr/share/man/man3 &&
install -v -m644 doc/fonts-conf.5 /usr/share/man/man5 &&
install -v -m644 doc/fontconfig-devel/* \
/usr/share/doc/fontconfig-2.15.0/fontconfig-devel &&
install -v -m644 doc/*.{pdf,sgml,txt,html} \
/usr/share/doc/fontconfig-2.15.0
32-bit Installation of Fontconfig
First clean the directory:
make distclean
Install lib32-Fontconfig by
running the following commands:
CC="gcc -m32" CXX="g++ -m32" \
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
./configure --prefix=/usr \
--libdir=/usr/lib32 \
--sysconfdir=/etc \
--localstatedir=/var \
--host=i686-pc-linux-gnu \
--disable-docs &&
make
Now, as the root
user:
make DESTDIR=$PWD/DESTDIR install &&
cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
rm -rf DESTDIR &&
ldconfig
Configuring Fontconfig
Config
Files
/etc/fonts/*, /etc/fonts/conf.d/* and
/usr/share/fontconfig/conf.avail/*
Configuration Information
The main configuration file for Fontconfig is /etc/fonts/fonts.conf
. Generally you do not
want to edit this file. It will also read /etc/fonts/local.conf
and any files in
/etc/fonts/conf.d
. To put a new
font directory in the configuration, create (or update) the
/etc/fonts/local.conf
file with
your local information or add a new file in /etc/fonts/conf.d
. The default location of
fonts in Fontconfig is:
Fontconfig also ships many
example configuration files in the /usr/share/fontconfig/conf.avail
directory.
Symlinking specific files to /etc/fonts/conf.d
will enable them. The default
setup is generally good enough for most users. See /etc/fonts/conf.d/README
for a description of
the configuration files.
More information about configuring Fontconfig can be found in the user's manual
in file:///usr/share/doc/fontconfig-2.15.0/fontconfig-user.html.