Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Building Freetype

K Lange edited this page Sep 21, 2018 · 5 revisions
  1. Activate the toolchain: source util/activate.sh

  2. Obtain Freetype sources. This been tested with Freetype 2.9.1, so that is recommended.

  3. Patch builds/unix/config.sub to support ToaruOS:

    Find the line | -aos* | -aros* | -cloudabi* | -sortix* \ and add a new line | -toaru * \ after it.

  4. Configure in a new directory:

    PKG_CONFIG_LIBDIR=${TOOLCHAIN}/../base/usr/lib/pkg-config ../freetype-2.9.1/configure \
        --host=i686-pc-toaru --prefix=/usr --with-png=no
  5. Edit libtool to add support for building shared objects for ToaruOS.

    Set build_libtool_libs=yes. Set library_names_spec and soname_spec to "\$libname\$release\$shared_ext"

  6. make

  7. make DESTDIR=${TOOLCHAIN}/../base install

  8. Return to your ToaruOS-NIH source directory and make ext-freetype to build the Freetype extension.

  9. Install fonts to base/usr/share/fonts - you can get these from the ToaruOS mainline repository.

  10. Run make run and confirm that the terminal starts and uses Freetype for rendering.

Newer Freetype defaults to a different renderer. To get the same classic hinted rendering as ToaruOS mainline, you can export FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=1 autofitter:warping=1" (within ToaruOS).

Clone this wiki locally