glfs/shareddeps/dps/basicx/other/harfbuzz.xml

340 lines
10 KiB
XML
Raw Normal View History

2024-05-14 21:02:30 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../../../general.ent">
%general-entities;
<!ENTITY harfbuzz-download-http
"https://github.com/harfbuzz/harfbuzz/releases/download/&harfbuzz-version;/harfbuzz-&harfbuzz-version;.tar.xz">
<!ENTITY harfbuzz-download-ftp " ">
]>
2024-07-04 17:24:02 +08:00
<sect1 id="harfbuzz" xreflabel="HarfBuzz-&harfbuzz-version;">
2024-05-14 21:02:30 +08:00
<?dbhtml filename="harfbuzz.html"?>
2024-07-16 13:08:52 +08:00
<title>HarfBuzz-&harfbuzz-version;</title>
2024-05-14 21:02:30 +08:00
<indexterm zone="harfbuzz">
<primary sortas="a-HarfBuzz">HarfBuzz</primary>
</indexterm>
<sect2 role="package">
2024-07-16 13:08:52 +08:00
<title>Introduction to HarfBuzz</title>
2024-05-14 21:02:30 +08:00
<para>
The <application>HarfBuzz</application> package contains an OpenType text
shaping engine.
</para>
&lfs121_checked;
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&harfbuzz-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&harfbuzz-download-ftp;"/>
</para>
</listitem>
</itemizedlist>
<!--
<bridgehead renderas="sect3">HarfBuzz Dependencies</bridgehead>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="glib2"/> (required for Pango; GObject Introspection
required for building GNOME),
<xref role="first" linkend="graphite2"/> (required for building
<xref role="nodep" linkend="texlive"/> or
<xref role="nodep" linkend="libreoffice"/> with system harfbuzz),
<xref linkend="icu"/>, and
<xref role="first" linkend="freetype2"/>
(after harfbuzz is installed, reinstall freetype)
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="cairo"/> (circular: build cairo and all its recommended
dependencies, including harfbuzz, first, then rebuild harfbuzz if the
cairo backend is needed),
<xref linkend="git"/>,
<xref linkend="gtk-doc"/>,
<ulink url="https://pypi.org/project/FontTools/">FontTools</ulink>
(Python 3 module, for the test suite),
<ulink url="https://www.colm.net/open-source/ragel/">ragel</ulink>,
and <ulink url="https://github.com/bytecodealliance/wasm-micro-runtime">wasm-micro-runtime</ulink>
</para>
-->
</sect2>
<sect2 role="installation">
<title>Installation of HarfBuzz</title>
<para>
Install <application>HarfBuzz</application> by running the following
commands:
</para>
<screen><userinput>mkdir build &amp;&amp;
cd build &amp;&amp;
meson setup .. \
--prefix=/usr \
--buildtype=release \
2024-07-04 20:36:49 +08:00
-D graphite2=disabled
2024-05-14 21:02:30 +08:00
ninja</userinput></screen>
<para>
To test the results, issue: <command>ninja test</command>.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>ninja install</userinput></screen>
</sect2>
<sect2 role="installation">
<title>32-Installation of HarfBuzz</title>
<para>
First clean the build directory:
</para>
<screen><userinput>rm -rf *</userinput></screen>
<para>
Install lib32-<application>HarfBuzz</application> by running the following
commands:
</para>
<screen><userinput>CC="gcc -m32" CXX="g++ -m32" \
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
meson setup .. \
--prefix=/usr \
--libdir=/usr/lib32 \
--buildtype=release \
2024-07-04 20:36:49 +08:00
-D graphite2=disabled
2024-05-14 21:02:30 +08:00
ninja</userinput></screen>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>DESTDIR=$PWD/DESTDIR ninja install
cp -vr DESTDIR/usr/lib32/* /usr/lib32
rm -rf DESTDIR
ldconfig</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../../../xincludes/meson-buildtype-release.xml"/>
2024-07-04 20:36:49 +08:00
2024-05-14 21:02:30 +08:00
<para>
2024-07-04 20:36:49 +08:00
<parameter>-Dgraphite2=disabled</parameter>: This switch disables
<application>Graphite2</application> support, which isn't in GLFS.
2024-05-14 21:02:30 +08:00
</para>
<!--
<para>
<parameter>-Dbenchmark=disabled</parameter>: This switch disables
downloading and building the <application>google-benchmark</application>
subproject, which requires <xref linkend="git"/>, and is of no
use for non developers.
</para>
-->
<!--
<para>
<option>-Ddocs=disabled</option>: If <xref linkend="gtk-doc"/> is
installed, the documentation is built and installed. This switch
prevents that.
</para>
-->
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
hb-info,
hb-ot-shape-closure,
hb-shape,
hb-subset, and
hb-view (only if Cairo is installed)
</seg>
<seg>
libharfbuzz.so,
libharfbuzz-cairo.so (only if Cairo is installed),
libharfbuzz-gobject.so,
libharfbuzz-icu.so, and
libharfbuzz-subset.so
</seg>
<seg>
/usr/include/harbuzz,
/usr/lib/cmake/harfbuzz, and
/usr/share/gtk-doc/html/harfbuzz (optional)
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="hb-info">
<term><command>hb-info</command></term>
<listitem>
<para>
is used for gathering information about fonts installed on the
system
</para>
<indexterm zone="harfbuzz hb-info">
<primary sortas="b-hb-info">hb-info</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="hb-ot-shape-closure">
<term><command>hb-ot-shape-closure</command></term>
<listitem>
<para>
gives the set of characters contained in a string, represented as
single characters and/or single character names. Example:
<command>hb-ot-shape-closure
/usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."</command>
</para>
<indexterm zone="harfbuzz hb-ot-shape-closure">
<primary sortas="b-hb-ot-shape-closure">hb-ot-shape-closure</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="hb-shape">
<term><command>hb-shape</command></term>
<listitem>
<para>
is used for the conversion of text strings into positioned glyphs
</para>
<indexterm zone="harfbuzz hb-shape">
<primary sortas="b-hb-shape">hb-shape</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="hb-subset">
<term><command>hb-subset</command></term>
<listitem>
<para>
is used to create subsets of fonts, and display text using them
</para>
<indexterm zone="harfbuzz hb-subset">
<primary sortas="b-hb-subset">hb-subset</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="hb-view">
<term><command>hb-view</command></term>
<listitem>
<para>
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:
<command>hb-view --output-file=hello.png
/usr/share/fonts/dejavu/DejaVuSans.ttf "Hello World."</command>
</para>
<indexterm zone="harfbuzz hb-view">
<primary sortas="b-hb-view">hb-view</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libharfbuzz">
<term><filename class="libraryfile">libharfbuzz.so</filename></term>
<listitem>
<para>
is the HarfBuzz text shaping library
</para>
<indexterm zone="harfbuzz libharfbuzz">
<primary sortas="c-libharfbuzz">libharfbuzz.so</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libharfbuzz-cairo">
<term><filename class="libraryfile">libharfbuzz-cairo.so</filename></term>
<listitem>
<para>
provides Cairo integration for the Harfbuzz text shaping library
</para>
<indexterm zone="harfbuzz libharfbuzz-cairo">
<primary sortas="c-libharfbuzz-cairo">libharfbuzz-cairo</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libharfbuzz-gobject">
<term><filename class="libraryfile">libharfbuzz-gobject.so</filename></term>
<listitem>
<para>
provides GObject integration for the HarfBuzz text shaping library
</para>
<indexterm zone="harfbuzz libharfbuzz-gobject">
<primary sortas="c-libharfbuzz-gobject">libharfbuzz-gobject.so</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libharfbuzz-icu">
<term><filename class="libraryfile">libharfbuzz-icu.so</filename></term>
<listitem>
<para>
provides ICU integration for the HarfBuzz text shaping library
</para>
<indexterm zone="harfbuzz libharfbuzz-icu">
<primary sortas="c-libharfbuzz-icu">libharfbuzz-icu.so</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libharfbuzz-subset">
<term><filename class="libraryfile">libharfbuzz-subset.so</filename></term>
<listitem>
<para>
provides API functions for performing subsetting operations on font
files
</para>
<indexterm zone="harfbuzz libharfbuzz-subset">
<primary sortas="c-libharfbuzz-subset">libharfbuzz-subset.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>