Graphite2-1.3.14 Pass 2

Introduction to Graphite2 Pass 2

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 12.4 platform.

Package Information

Graphite2 Dependencies

Required

CMake-4.1.3

Optional

FreeType-2.14.1, harfBuzz-12.2.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.2.1, "doxygen", "texlive" (or "tl-installer"), 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.

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

Fix building this package with CMake 4.0 by updating its syntax to conform to newer versions of CMake:

sed -i '/cmake_policy(SET CMP0012 NEW)/d' CMakeLists.txt
sed -i 's/PythonInterp/Python3/' CMakeLists.txt
find . -name CMakeLists.txt | xargs sed -i 's/VERSION 2.8.0 FATAL_ERROR/VERSION 4.0.0/'

Now fix a problem when building with gcc-15:

sed -i '/Font.h/i #include <cstdint>' tests/featuremap/featuremaptest.cpp

Prepare Graphite2 second pass by running the following commands:

cmake -B build -D CMAKE_INSTALL_PREFIX=/usr

To Build hte package, issue:

cmake --build build

One test named nametabletest is known to fail. To test the results, issue:

cd build
make test

Now Install, as the root user:

cmake --install build

Command Explanations

-D CMAKE_VERBOSE_MAKEFILE=ON: This switch turns on build verbose mode.

Details on this package are located in Graphite2-1.3.14