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>Shaping operations: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="shaping-concepts.html" title="Shaping concepts">
9 <link rel="prev" href="complex-scripts.html" title="Complex scripts">
10 <link rel="next" href="unicode-character-categories.html" title="Unicode character categories">
11 <meta name="generator" content="GTK-Doc V1.32 (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="shaping-concepts.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19 <td><a accesskey="p" href="complex-scripts.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20 <td><a accesskey="n" href="unicode-character-categories.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="shaping-operations"></a>Shaping operations</h2></div></div></div>
26 Shaping a complex-script text run involves transforming the
27 input sequence of Unicode codepoints with some combination of
28 operations that is specified in the shaping model for the
32 The specific conditions that trigger a given operation for a
33 text run varies from script to script, as do the order that the
34 operations are performed in and which codepoints are
35 affected. However, the same general set of shaping operations is
36 common to all of the complex-script shaping models.
38 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
41 A <span class="emphasis"><em>reordering</em></span> operation moves a glyph
42 from its original ("logical") position in the sequence to
43 some other ("visual") position.
46 The shaping model for a given complex script might involve
47 more than one reordering step.
50 <li class="listitem"><p>
51 A <span class="emphasis"><em>joining</em></span> operation replaces a glyph
52 with an alternate form that is designed to connect with one
53 or more of the adjacent glyphs in the sequence.
57 A contextual <span class="emphasis"><em>substitution</em></span> operation
58 replaces either a single glyph or a subsequence of several
59 glyphs with an alternate glyph. This substitution is
60 performed when the original glyph or subsequence of glyphs
61 occurs in a specified position with respect to the
62 surrounding sequence. For example, one substitution might be
63 performed only when the target glyph is the first glyph in
64 the sequence, while another substitution is performed only
65 when a different target glyph occurs immediately after a
66 particular string pattern.
69 The shaping model for a given complex script might involve
70 multiple contextual-substitution operations, each applying
71 to different target glyphs and patterns, and which are
72 performed in separate steps.
77 A contextual <span class="emphasis"><em>positioning</em></span> operation
78 moves the horizontal and/or vertical position of a
79 glyph. This positioning move is performed when the glyph
80 occurs in a specified position with respect to the
84 Many contextual positioning operations are used to place
85 <span class="emphasis"><em>mark</em></span> glyphs (such as diacritics, vowel
86 signs, and tone markers) with respect to
87 <span class="emphasis"><em>base</em></span> glyphs. However, some complex
88 scripts may use contextual positioning operations to
89 correctly place base glyphs as well, such as
90 when the script uses <span class="emphasis"><em>stacking</em></span> characters.
96 <hr>Generated by GTK-Doc V1.32</div>