FreeType-2.14.1

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

### Chapter 8. Basic X11 Software

- Prev

  libpng-1.6.55

- Next

  HarfBuzz-12.3.2

- Up
- Home

# FreeType-2.14.1

## Introduction to FreeType2

The FreeType2 package contains a library which allows applications to properly render TrueType fonts.

Ensure to install HarfBuzz-12.3.2 after this installation, as many packages expect this package to have HarfBuzz support.

- Download: https://downloads.sourceforge.net/freetype/freetype-2.14.1.tar.xz

### Additional Downloads

Additional Documentation

- Download: https://downloads.sourceforge.net/freetype/freetype-doc-2.14.1.tar.xz

### FreeType2 Dependencies

Recommended
HarfBuzz-12.3.2 (runtime), libpng-1.6.55, and Which-2.23
Optional
docwriter

## Installation of FreeType2

If you downloaded the additional documentation, unpack it into the source tree using the following command:

    tar -xf ../freetype-doc-2.14.1.tar.xz --strip-components=2 -C docs

Enable GX/AAT and OpenType table validation and Subpixel Rendering:

    sed -ri "s:.*(AUX_MODULES.*valid):\1:" modules.cfg &&

    sed -r "s:.*(#.*SUBPIXEL_RENDERING) .*:\1:" \
        -i include/freetype/config/ftoption.h

### Note

Subpixel Rendering may have patent issues. Be sure to read the `'Other patent issues'` part of https://freetype.org/patents.html before enabling it. The second sed -r command is the one that enables SR.

Install FreeType2 by running the following commands:

    ./configure --prefix=/usr            \
                --disable-static         \
                --enable-freetype-config \
                --with-harfbuzz=dynamic &&
    make

Now, as the `root` user:

    make install

If you downloaded the optional documentation, install it as the `root` user:

    cp -v -R docs -T /usr/share/doc/freetype-2.14.1 &&
    rm -v /usr/share/doc/freetype-2.14.1/freetype-config.1

## lib32 Installation of FreeType2

Install lib32-FreeType2 by running the following commands:

    make distclean &&
    CC="gcc -m32" CXX="g++ -m32"         \
    PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
    ./configure --prefix=/usr            \
                --libdir=/usr/lib32      \
                --host=i686-pc-linux-gnu \
                --disable-static         \
                --with-harfbuzz=dynamic &&

    make

Now, as the `root` user:

    make DESTDIR=$PWD/DESTDIR install     &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Run ./configure --help for a full list of options.

`--disable-static`: This switch prevents installation of static versions of the libraries.

`--enable-freetype-config`: This switch ensure that the man page for freetype-config is installed.

`--with-harfbuzz=dynamic`: This switch ensures this package doesn't need to get rebuilt after HarfBuzz is instead, instead is loaded dynamically if present.

## Contents

Installed Program: freetype-config
Installed Library: libfreetype
Installed Directories: /usr/include/freetype2 and /usr/share/doc/freetype-2.14.1

### Short Descriptions

freetype-config | is used to get FreeType compilation and linking information
`libfreetype` | contains functions for rendering various font types, such as TrueType and Type1

- Prev

  libpng-1.6.55

- Next

  HarfBuzz-12.3.2

- Up
- Home