Fontconfig-2.17.1

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 8. Basic X11 Software

- Prev

  HarfBuzz-12.3.2

- Next

  Xorg Libraries

- Up
- Home

# Fontconfig-2.17.1

## Introduction to Fontconfig

The Fontconfig package contains a library and support programs used for configuring and customizing font access.

### Important

For the lib32 installation instructions, they require new Meson cross files from MLFS, as `--libdir=/usr/lib32` has been moved to the cross files and no longer appear in the instructions. Install the new cross files so that 32-bit libraries don't get installed in `/usr/lib`.

- Download: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.17.1/fontconfig-2.17.1.tar.gz

### Fontconfig Dependencies

Required
FreeType-2.14.1

## Installation of Fontconfig

Install Fontconfig by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release .. &&
    ninja

Now, as the `root` user:

    ninja install

## lib32 Installation of Fontconfig

Install lib32-Fontconfig by running the following commands:

    rm -rf * &&
    meson setup --prefix=/usr       \
                --buildtype=release \
                --cross-file=lib32  \
                .. &&

    ninja

Now, as the `root` user:

    DESTDIR=$PWD/DESTDIR ninja install       &&
    cp -Rv DESTDIR/usr/lib32/* /usr/lib32    &&
    rm -rf DESTDIR                           &&
    ldconfig

## Command Explanations

### Note

Inspect `meson_options.txt` or `meson.options` for a full list of options.

## 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:

- /usr/share/fonts

- ~/.local/share/fonts

- ~/.fonts (this is now deprecated, but for the moment it still works)

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.17.1/fontconfig-user.html.

## Contents

Installed Programs: fc-cache, fc-cat, fc-conflist, fc-list, fc-match, fc-pattern, fc-query, fc-scan, and fc-validate
Installed Library: libfontconfig
Installed Directories: /etc/fonts, /usr/include/fontconfig, /usr/share/fontconfig, /usr/share/xml/fontconfig, and /var/cache/fontconfig

### Short Descriptions

fc-cache | is used to create font information caches
fc-cat | is used to read font information caches
fc-conflist | shows the ruleset files' information on the system
fc-list | is used to create font lists
fc-match | is used to match available fonts, or find fonts that match a given pattern
fc-pattern | is used to parse pattern (empty pattern by default) and show the parsed result
fc-query | is used to query fonts files and print resulting patterns
fc-scan | is used to scan font files and directories, and print resulting patterns
fc-validate | is used to validate font files
`libfontconfig` | contains functions used by the Fontconfig programs and also by other programs to configure or customize font access

- Prev

  HarfBuzz-12.3.2

- Next

  Xorg Libraries

- Up
- Home