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

### Chapter 10. Graphics and Font Libraries

- Prev

  GLM-0.9.9.8

- Next

  HarfBuzz-3.4.0

- Up
- Home

# Graphite2-1.3.14

## Introduction to Graphite2

Graphite2 is a rendering engine for graphite fonts. These are TrueType fonts with additional tables containing smart rendering information and were originally developed to support complex non-Roman writing systems. They may contain rules for e.g. ligatures, glyph substitution, kerning, justification - this can make them useful even on text written in Roman writing systems such as English. Note that firefox by default provides an internal copy of the graphite engine and cannot use a system version (although it can now be patched to use it), but it too should benefit from the availability of graphite fonts.

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

### Package Information

- Download (HTTP): https://github.com/silnrsi/graphite/releases/download/1.3.14/graphite2-1.3.14.tgz

- Download MD5 sum: 1bccb985a7da01092bfb53bb5041e836

- Download size: 6.3 MB

- Estimated disk space required: 28 MB (with tests)

- Estimated build time: 0.2 SBU (with tests)

### Graphite2 Dependencies

#### Required

CMake-3.22.2

#### Optional

FreeType-2.11.1, silgraphite to build the comparerender test and benchmarking tool, and if that is present, and HarfBuzz-3.4.0 to add more functionality to it (this is a circular dependency, you would need to first build graphite2 without harfbuzz).

To build the documentation: asciidoc-10.1.1, Doxygen-1.9.3, texlive-20210325 (or install-tl-unx), and dblatex (for PDF docs)

To execute the test suite you will need FontTools (Python 3 module), otherwise, the "cmp" tests fail.

#### Optional (at runtime)

You will need at least one suitable graphite font for the package to be useful.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/graphite2

## Installation of Graphite2

Some tests fail if FontTools (Python 3 module) is not installed. These tests can be removed with:

    sed -i '/cmptest/d' tests/CMakeLists.txt

Install Graphite2 by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&
    make

If you wish to build the documentation, issue:

    make docs

To test the results, issue: make test.

Now, as the `root` user:

    make install

If you built the documentation, install, as the `root` user:

    install -v -d -m755 /usr/share/doc/graphite2-1.3.14 &&

    cp      -v -f    doc/{GTF,manual}.html \
                        /usr/share/doc/graphite2-1.3.14 &&
    cp      -v -f    doc/{GTF,manual}.pdf \
                        /usr/share/doc/graphite2-1.3.14

## Command Explanations

`-DCMAKE_VERBOSE_MAKEFILE=ON`: This switch turns on build verbose mode.

## Contents

Installed Programs: gr2fonttest, and optionally comparerender
Installed Libraries: libgraphite2.so
Installed Directories: /usr/{include,share}/graphite2 and optionally /usr/share/doc/graphite2-1.3.14

### Short Descriptions

comparerender | is a test and benchmarking tool
gr2fonttest | is a diagnostic console tool for graphite fonts
`libgraphite2.so` | is a rendering engine for graphite fonts

Last updated on

- Prev

  GLM-0.9.9.8

- Next

  HarfBuzz-3.4.0

- Up
- Home