#### Beyond Linux® From Scratch (systemd Edition) - Version 10.1

### Chapter 10. Graphics and Font Libraries

- Prev

  Exiv2-0.27.3

- Next

  Fontconfig-2.13.1

- Up
- Home

# FreeType-2.10.4

## Introduction to FreeType2

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

This package is known to build and work properly using an LFS-10.1 platform.

### Package Information

- Download (HTTP): https://downloads.sourceforge.net/freetype/freetype-2.10.4.tar.xz

- Download MD5 sum: 0e6c0e9b218be3ba3e26e1d23b1c80dd

- Download size: 2.4 MB

- Estimated disk space required: 43 MB (with additional documentation)

- Estimated build time: 0.2 SBU (with additional documentation)

### Additional Downloads

Additional Documentation

- Download (HTTP): https://downloads.sourceforge.net/freetype/freetype-doc-2.10.4.tar.xz

- Download MD5 sum: a389bc390ca8009c758094e71a8fb18d

- Download size: 2.0 MB

### FreeType2 Dependencies

#### Recommended

HarfBuzz-2.7.4 (first, install without it, after it is installed, reinstall FreeType-2.10.4), libpng-1.6.37, and Which-2.21

#### Optional

Brotli-1.0.9

#### Optional (for documentation)

docwriter

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/freetype2

## Installation of FreeType2

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

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

Install FreeType2 by running the following commands:

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

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

    ./configure --prefix=/usr --enable-freetype-config --disable-static &&
    make

This package does not come with a test suite.

Now, as the `root` user:

    make install

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

    install -v -m755 -d /usr/share/doc/freetype-2.10.4 &&
    cp -v -R docs/*     /usr/share/doc/freetype-2.10.4 &&
    rm -v /usr/share/doc/freetype-2.10.4/freetype-config.1

## Command Explanations

sed -ri ...: First command enables GX/AAT and OpenType table validation and second command enables Subpixel Rendering. Note that Subpixel Rendering may have patent issues. Be sure to read the `'Other patent issues'` part of http://www.freetype.org/patents.html before enabling this option.

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

`--without-harfbuzz`: If harfbuzz is installed prior to freetype without freetype support, use this switch to avoid a build failure.

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

## Contents

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

### Short Descriptions

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

Last updated on 2021-02-21 15:09:04 -0800

- Prev

  Exiv2-0.27.3

- Next

  Fontconfig-2.13.1

- Up
- Home