HarfBuzz-9.0.0

Introduction to HarfBuzz

The HarfBuzz package contains an OpenType text shaping engine.

[Note]

Note

Development versions of GLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Installation of HarfBuzz

[Important]

Important

While Glib support can be compiled for this package, GLFS does not have instructions for it. If you have already installed Glib and did not install the 32-bit version, then you will need to move the pkgconfig file out of the way. This is because pkgconf will report that glib-2.0 is installed despite the fact that the 32-bit version is not installed, leading to a linker error as a 64-bit library cannot be linked against a 32-bit application. If this applies to you, as the root user:

mv /usr/lib/pkgconfig/glib-2.0.pc \
  /usr/lib/pkgconfig/NOUSE.glib-2.0.pc

After you are done installing this package, you may move it back. Doing all of this is not recommended. Please read up on Important Information for more information.

Install HarfBuzz by running the following commands:

mkdir build &&
cd    build &&

meson setup ..            \
      --prefix=/usr       \
      --buildtype=release \
      -D graphite2=disabled

ninja

To test the results, issue: ninja test.

Now, as the root user:

ninja install

32-Installation of HarfBuzz

First clean the build directory:

rm -rf *

Install lib32-HarfBuzz by running the following commands:

CC="gcc -m32" CXX="g++ -m32"         \
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
meson setup ..                       \
      --prefix=/usr                  \
      --libdir=/usr/lib32            \
      --buildtype=release            \
      -D graphite2=disabled

ninja

Now, as the root user:

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

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Dgraphite2=disabled: This switch disables Graphite2 support, which isn't in GLFS.

Contents

Installed Programs: hb-info, hb-ot-shape-closure, hb-shape, hb-subset, and hb-view (only if Cairo is installed)
Installed Libraries: libharfbuzz.so, libharfbuzz-cairo.so (only if Cairo is installed), libharfbuzz-gobject.so, libharfbuzz-icu.so, and libharfbuzz-subset.so
Installed Directories: /usr/include/harbuzz, /usr/lib/cmake/harfbuzz, and /usr/share/gtk-doc/html/harfbuzz (optional)

Short Descriptions

hb-info

is used for gathering information about fonts installed on the system

hb-ot-shape-closure

gives the set of characters contained in a string, represented as single characters and/or single character names. Example: hb-ot-shape-closure /usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."

hb-shape

is used for the conversion of text strings into positioned glyphs

hb-subset

is used to create subsets of fonts, and display text using them

hb-view

displays a graphical view of a string shape using a particular font as a set of glyphs. The output format is automatically defined by the file extension, the supported ones being ansi/png/svg/pdf/ps/eps. For example: hb-view --output-file=hello.png /usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."

libharfbuzz.so

is the HarfBuzz text shaping library

libharfbuzz-cairo.so

provides Cairo integration for the Harfbuzz text shaping library

libharfbuzz-gobject.so

provides GObject integration for the HarfBuzz text shaping library

libharfbuzz-icu.so

provides ICU integration for the HarfBuzz text shaping library

libharfbuzz-subset.so

provides API functions for performing subsetting operations on font files