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>What is 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="pt01.html" title="Part I. User's manual">
9 <link rel="prev" href="pt01.html" title="Part I. User's manual">
10 <link rel="next" href="why-do-i-need-a-shaping-engine.html" title="Why do I need a shaping engine?">
11 <meta name="generator" content="GTK-Doc V1.32.1 (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="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19 <td><a accesskey="p" href="pt01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20 <td><a accesskey="n" href="why-do-i-need-a-shaping-engine.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
23 <div class="titlepage"><div><div><h2 class="title">
24 <a name="what-is-harfbuzz"></a>What is HarfBuzz?</h2></div></div></div>
25 <div class="toc"><dl class="toc">
26 <dt><span class="section"><a href="what-is-harfbuzz.html#what-is-text-shaping">What is text shaping?</a></span></dt>
27 <dt><span class="section"><a href="why-do-i-need-a-shaping-engine.html">Why do I need a shaping engine?</a></span></dt>
28 <dt><span class="section"><a href="ch01s03.html">What does HarfBuzz do?</a></span></dt>
29 <dt><span class="section"><a href="what-harfbuzz-doesnt-do.html">What HarfBuzz doesn't do</a></span></dt>
30 <dt><span class="section"><a href="why-is-it-called-harfbuzz.html">Why is it called HarfBuzz?</a></span></dt>
33 HarfBuzz is a <span class="emphasis"><em>text-shaping engine</em></span>. If you
34 give HarfBuzz a font and a string containing a sequence of Unicode
35 codepoints, HarfBuzz selects and positions the corresponding
36 glyphs from the font, applying all of the necessary layout rules
37 and font features. HarfBuzz then returns the string to you in the
38 form that is correctly arranged for the language and writing
42 HarfBuzz can properly shape all of the world's major writing
43 systems. It runs on all major operating systems and software
44 platforms and it supports the major font formats in use
48 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
49 <a name="what-is-text-shaping"></a>What is text shaping?</h2></div></div></div>
51 Text shaping is the process of translating a string of character
52 codes (such as Unicode codepoints) into a properly arranged
53 sequence of glyphs that can be rendered onto a screen or into
54 final output form for inclusion in a document.
57 The shaping process is dependent on the input string, the active
58 font, the script (or writing system) that the string is in, and
59 the language that the string is in.
62 Modern software systems generally only deal with strings in the
63 Unicode encoding scheme (although legacy systems and documents may
64 involve other encodings).
67 There are several font formats that a program might
68 encounter, each of which has a set of standard text-shaping
71 <p>The dominant format is <a class="ulink" href="http://www.microsoft.com/typography/otspec/" target="_top">OpenType</a>. The
72 OpenType specification defines a series of <a class="ulink" href="https://github.com/n8willis/opentype-shaping-documents" target="_top">shaping models</a> for
73 various scripts from around the world. These shaping models depend on
74 the font incorporating certain features as
75 <span class="emphasis"><em>lookups</em></span> in its <code class="literal">GSUB</code>
76 and <code class="literal">GPOS</code> tables.
79 Alternatively, OpenType fonts can include shaping features for
80 the <a class="ulink" href="https://graphite.sil.org/" target="_top">Graphite</a> shaping model.
83 TrueType fonts can also include OpenType shaping
84 features. Alternatively, TrueType fonts can also include <a class="ulink" href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html" target="_top">Apple
85 Advanced Typography</a> (AAT) tables to implement shaping
86 support. AAT fonts are generally only found on macOS and iOS systems.
89 Text strings will usually be tagged with a script and language
90 tag that provide the context needed to perform text shaping
91 correctly. The necessary <a class="ulink" href="https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags" target="_top">script</a>
92 and <a class="ulink" href="https://docs.microsoft.com/en-us/typography/opentype/spec/languagetags" target="_top">language</a>
93 tags are defined by OpenType.
98 <hr>Generated by GTK-Doc V1.32.1</div>