Imported Upstream version 2.6.7
[platform/upstream/harfbuzz.git] / docs / html / what-is-harfbuzz.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
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">
13 </head>
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>
21 </tr></table>
22 <div class="chapter">
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>
31 </dl></div>
32 <p>
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
39     system. 
40   </p>
41 <p>
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
45     today.
46   </p>
47 <div class="section">
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>
50 <p>
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.
55     </p>
56 <p>
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.
60     </p>
61 <p>
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).
65     </p>
66 <p>
67       There are several font formats that a program might
68       encounter, each of which has a set of standard text-shaping
69       rules.
70     </p>
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.
77     </p>
78 <p>
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.
81     </p>
82 <p>
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.
87     </p>
88 <p>
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.
94     </p>
95 </div>
96 </div>
97 <div class="footer">
98 <hr>Generated by GTK-Doc V1.32.1</div>
99 </body>
100 </html>