1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Building HarfBuzz: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="install-harfbuzz.html" title="Installing HarfBuzz">
9 <link rel="prev" href="install-harfbuzz.html" title="Installing HarfBuzz">
10 <link rel="next" href="getting-started.html" title="Getting started with HarfBuzz">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts"></td>
17 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
18 <td><a accesskey="u" href="install-harfbuzz.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19 <td><a accesskey="p" href="install-harfbuzz.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20 <td><a accesskey="n" href="getting-started.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
23 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
24 <a name="building"></a>Building HarfBuzz</h2></div></div></div>
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="building.linux"></a>Building on Linux</h3></div></div></div>
29 <span class="emphasis"><em>(1)</em></span> To build HarfBuzz on Linux, you must first install the
30 development packages for FreeType, Cairo, and GLib. The exact
31 commands required for this step will vary depending on
32 the Linux distribution you use.
35 For example, on an Ubuntu or Debian system, you would run:
37 <pre class="programlisting">
38 <span class="command"><strong>sudo apt install</strong></span> <span class="package">gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev</span>
41 On Fedora, RHEL, CentOS, or other Red-Hat–based systems, you would run:
43 <pre class="programlisting">
44 <span class="command"><strong>sudo yum install</strong></span> <span class="package">gcc gcc-c++ freetype-devel glib2-devel cairo-devel</span>
50 <span class="emphasis"><em>(2)</em></span> The next step depends on whether you
51 are building from the source in a downloaded release tarball or
52 from the source directly from the git repository.
55 <span class="emphasis"><em>(2)(a)</em></span> If you downloaded the HarfBuzz
56 source code in a tarball, you can now extract the source.
59 From a shell in the top-level directory of the extracted source
60 code, you can run <span class="command"><strong>./configure</strong></span> followed by
61 <span class="command"><strong>make</strong></span> as with any other standard package.
64 This should leave you with a shared
65 library in the <code class="filename">src/</code> directory, and a few
66 utility programs including <span class="command"><strong>hb-view</strong></span> and
67 <span class="command"><strong>hb-shape</strong></span> under the <code class="filename">util/</code>
71 <span class="emphasis"><em>(2)(b)</em></span> If you are building from the source in the HarfBuzz git
72 repository, rather than installing from a downloaded tarball
73 release, then you must install two more auxiliary tools before you
74 can build for the first time: <span class="package">pkg-config</span> and
75 <a class="ulink" href="http://www.complang.org/ragel/" target="_top">ragel</a>.
78 On Ubuntu or Debian, run:
80 <pre class="programlisting">
81 <span class="command"><strong>sudo apt-get install</strong></span> <span class="package">autoconf automake libtool pkg-config ragel gtk-doc-tools</span>
84 On Fedora, RHEL, CentOS, run:
86 <pre class="programlisting">
87 <span class="command"><strong>sudo yum install</strong></span> <span class="package">autoconf automake libtool pkgconfig ragel gtk-doc</span>
93 With <span class="package">pkg-config</span> and <span class="package">ragel</span>
94 installed, you can now run <span class="command"><strong>./autogen.sh</strong></span>,
95 followed by <span class="command"><strong>./configure</strong></span> and
96 <span class="command"><strong>make</strong></span> to build HarfBuzz.
100 <div class="titlepage"><div><div><h3 class="title">
101 <a name="building.windows"></a>Building on Windows</h3></div></div></div>
103 On Windows, consider using Microsoft's free <a class="ulink" href="https://github.com/Microsoft/vcpkg" target="_top">vcpkg</a> utility
104 to build HarfBuzz, its dependencies, and other open-source
108 If you need to build HarfBuzz from source, first put the
109 <span class="package">ragel</span> binary on your
110 <code class="literal">PATH</code>, then follow the appveyor CI cmake
111 <a class="ulink" href="https://github.com/harfbuzz/harfbuzz/blob/master/appveyor.yml" target="_top">build
115 <div class="section">
116 <div class="titlepage"><div><div><h3 class="title">
117 <a name="building.macos"></a>Building on macOS</h3></div></div></div>
119 There are two ways to build HarfBuzz on Mac systems: MacPorts
120 and Homebrew. The process is similar to the process used on a
124 <span class="emphasis"><em>(1)</em></span> You must first install the
125 development packages for FreeType, Cairo, and GLib. If you are
126 using MacPorts, you should run:
128 <pre class="programlisting">
129 <span class="command"><strong>sudo port install</strong></span> <span class="package">freetype glib2 cairo</span>
134 If you are using Homebrew, you should run:
136 <pre class="programlisting">
137 <span class="command"><strong>brew install</strong></span> <span class="package">freetype glib cairo</span>
142 <span class="emphasis"><em>(2)</em></span> The next step depends on whether you are building from the
143 source in a downloaded release tarball or from the source directly
144 from the git repository.
147 <span class="emphasis"><em>(2)(a)</em></span> If you are installing HarfBuzz
148 from a downloaded tarball release, extract the tarball and
149 open a Terminal in the extracted source-code directory. Run:
151 <pre class="programlisting">
152 <span class="command"><strong>./configure</strong></span>
157 <pre class="programlisting">
158 <span class="command"><strong>make</strong></span>
164 <span class="emphasis"><em>(2)(b)</em></span> Alternatively, if you are building
165 HarfBuzz from the source in the HarfBuzz git repository, then
166 you must install several built-time dependencies before
170 using MacPorts, you should run:
172 <pre class="programlisting">
173 <span class="command"><strong>sudo port install</strong></span> <span class="package">autoconf automake libtool pkgconfig ragel gtk-doc</span>
176 to install the build dependencies.
178 <p>If you are using Homebrew, you should run:
180 <pre class="programlisting">
181 <span class="command"><strong>brew install</strong></span> <span class="package">autoconf automake libtool pkgconfig ragel gtk-doc</span>
184 Finally, you can run:
186 <pre class="programlisting">
187 <span class="command"><strong>./autogen.sh</strong></span>
192 <span class="emphasis"><em>(3)</em></span> You can now build HarfBuzz (on either
193 a MacPorts or a Homebrew system) by running:
195 <pre class="programlisting">
196 <span class="command"><strong>./configure</strong></span>
201 <pre class="programlisting">
202 <span class="command"><strong>make</strong></span>
207 This should leave you with a shared
208 library in the <code class="filename">src/</code> directory, and a few
209 utility programs including <span class="command"><strong>hb-view</strong></span> and
210 <span class="command"><strong>hb-shape</strong></span> under the <code class="filename">util/</code>
214 <div class="section">
215 <div class="titlepage"><div><div><h3 class="title">
216 <a name="configuration"></a>Configuration options</h3></div></div></div>
218 The instructions in the "Building HarfBuzz" section will build
219 the source code under its default configuration. If needed,
220 the following additional configuration options are available.
222 <div class="variablelist"><table border="0" class="variablelist">
224 <col align="left" valign="top">
229 <td><p><span class="term"><span class="command"><strong>--with-libstdc++</strong></span></span></p></td>
232 Allow linking with libstdc++. <span class="emphasis"><em>(Default = no)</em></span>
235 This option enables or disables linking HarfBuzz to the
236 system's libstdc++ library.
241 <td><p><span class="term"><span class="command"><strong>--with-glib</strong></span></span></p></td>
244 Use <a class="ulink" href="https://developer.gnome.org/glib/" target="_top">GLib</a>. <span class="emphasis"><em>(Default = auto)</em></span>
247 This option enables or disables usage of the GLib
248 library. The default setting is to check for the
249 presence of GLib and, if it is found, build with
250 GLib support. GLib is native to GNU/Linux systems but is
251 available on other operating system as well.
256 <td><p><span class="term"><span class="command"><strong>--with-gobject</strong></span></span></p></td>
259 Use <a class="ulink" href="https://developer.gnome.org/gobject/stable/" target="_top">GObject</a>. <span class="emphasis"><em>(Default = no)</em></span>
262 This option enables or disables usage of the GObject
263 library. The default setting is to check for the
264 presence of GObject and, if it is found, build with
265 GObject support. GObject is native to GNU/Linux systems but is
266 available on other operating system as well.
271 <td><p><span class="term"><span class="command"><strong>--with-cairo</strong></span></span></p></td>
274 Use <a class="ulink" href="https://cairographics.org/" target="_top">Cairo</a>. <span class="emphasis"><em>(Default = auto)</em></span>
277 This option enables or disables usage of the Cairo
278 graphics-rendering library. The default setting is to
279 check for the presence of Cairo and, if it is found,
280 build with Cairo support.
283 Note: Cairo is used only by the HarfBuzz
284 command-line utilities, and not by the HarfBuzz library.
289 <td><p><span class="term"><span class="command"><strong>--with-fontconfig</strong></span></span></p></td>
292 Use <a class="ulink" href="https://www.freedesktop.org/wiki/Software/fontconfig/" target="_top">Fontconfig</a>. <span class="emphasis"><em>(Default = auto)</em></span>
295 This option enables or disables usage of the Fontconfig
296 library, which provides font-matching functions and
297 provides access to font properties. The default setting
298 is to check for the presence of Fontconfig and, if it is
299 found, build with Fontconfig support.
302 Note: Fontconfig is used only by the HarfBuzz
303 command-line utilities, and not by the HarfBuzz library.
308 <td><p><span class="term"><span class="command"><strong>--with-icu</strong></span></span></p></td>
311 Use the <a class="ulink" href="http://site.icu-project.org/home" target="_top">ICU</a> library. <span class="emphasis"><em>(Default = auto)</em></span>
314 This option enables or disables usage of the
315 <span class="emphasis"><em>International Components for
316 Unicode</em></span> (ICU) library, which provides access
317 to Unicode Character Database (UCD) properties as well
318 as normalization and conversion functions. The default
319 setting is to check for the presence of ICU and, if it
320 is found, build with ICU support.
325 <td><p><span class="term"><span class="command"><strong>--with-graphite2</strong></span></span></p></td>
328 Use the <a class="ulink" href="http://graphite.sil.org/" target="_top">Graphite2</a> library. <span class="emphasis"><em>(Default = no)</em></span>
331 This option enables or disables usage of the Graphite2
332 library, which provides support for the Graphite shaping
338 <td><p><span class="term"><span class="command"><strong>--with-freetype</strong></span></span></p></td>
341 Use the <a class="ulink" href="https://www.freetype.org/" target="_top">FreeType</a> library. <span class="emphasis"><em>(Default = auto)</em></span>
344 This option enables or disables usage of the FreeType
345 font-rendering library. The default setting is to check for the
346 presence of FreeType and, if it is found, build with
352 <td><p><span class="term"><span class="command"><strong>--with-uniscribe</strong></span></span></p></td>
355 Use the <a class="ulink" href="https://docs.microsoft.com/en-us/windows/desktop/intl/uniscribe" target="_top">Uniscribe</a>
356 library (experimental). <span class="emphasis"><em>(Default = no)</em></span>
359 This option enables or disables usage of the Uniscribe
360 font-rendering library. Uniscribe is available on
361 Windows systems. Uniscribe support is used only for
362 testing purposes and does not need to be enabled for
363 HarfBuzz to run on Windows systems.
368 <td><p><span class="term"><span class="command"><strong>--with-directwrite</strong></span></span></p></td>
371 Use the <a class="ulink" href="https://docs.microsoft.com/en-us/windows/desktop/directwrite/direct-write-portal" target="_top">DirectWrite</a> library (experimental). <span class="emphasis"><em>(Default = no)</em></span>
374 This option enables or disables usage of the DirectWrite
375 font-rendering library. DirectWrite is available on
376 Windows systems. DirectWrite support is used only for
377 testing purposes and does not need to be enabled for
378 HarfBuzz to run on Windows systems.
383 <td><p><span class="term"><span class="command"><strong>--with-coretext</strong></span></span></p></td>
386 Use the <a class="ulink" href="https://developer.apple.com/documentation/coretext" target="_top">CoreText</a> library. <span class="emphasis"><em>(Default = no)</em></span>
389 This option enables or disables usage of the CoreText
390 library. CoreText is available on macOS and iOS systems.
395 <td><p><span class="term"><span class="command"><strong>--enable-gtk-doc</strong></span></span></p></td>
398 Use <a class="ulink" href="https://www.gtk.org/gtk-doc/" target="_top">GTK-Doc</a>. <span class="emphasis"><em>(Default = no)</em></span>
401 This option enables the building of the documentation.
410 <hr>Generated by GTK-Doc V1.29</div>