Imported Upstream version 2.4.0
[platform/upstream/harfbuzz.git] / docs / html / harfbuzz-hb-shape.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>hb-shape: 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="ch09.html" title="Core API">
9 <link rel="prev" href="harfbuzz-hb-shape-plan.html" title="hb-shape-plan">
10 <link rel="next" href="harfbuzz-hb-unicode.html" title="hb-unicode">
11 <meta name="generator" content="GTK-Doc V1.29 (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">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#harfbuzz-hb-shape.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch09.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="harfbuzz-hb-shape-plan.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="harfbuzz-hb-unicode.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="harfbuzz-hb-shape"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="harfbuzz-hb-shape.top_of_page"></a>hb-shape</span></h2>
30 <p>hb-shape — Conversion of text strings into positioned glyphs</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="harfbuzz-hb-shape.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <span class="returnvalue">void</span>
45 </td>
46 <td class="function_name">
47 <a class="link" href="harfbuzz-hb-shape.html#hb-shape" title="hb_shape ()">hb_shape</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
53 </td>
54 <td class="function_name">
55 <a class="link" href="harfbuzz-hb-shape.html#hb-shape-full" title="hb_shape_full ()">hb_shape_full</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">const <span class="returnvalue">char</span> **
60 </td>
61 <td class="function_name">
62 <a class="link" href="harfbuzz-hb-shape.html#hb-shape-list-shapers" title="hb_shape_list_shapers ()">hb_shape_list_shapers</a> <span class="c_punctuation">()</span>
63 </td>
64 </tr>
65 </tbody>
66 </table></div>
67 </div>
68 <div class="refsect1">
69 <a name="harfbuzz-hb-shape.includes"></a><h2>Includes</h2>
70 <pre class="synopsis">#include &lt;hb.h&gt;
71 </pre>
72 </div>
73 <div class="refsect1">
74 <a name="harfbuzz-hb-shape.description"></a><h2>Description</h2>
75 <p>Shaping is the central operation of HarfBuzz. Shaping operates on buffers,
76 which are sequences of Unicode characters that use the same font and have
77 the same text direction, script, and language. After shaping the buffer
78 contains the output glyphs and their positions.</p>
79 </div>
80 <div class="refsect1">
81 <a name="harfbuzz-hb-shape.functions_details"></a><h2>Functions</h2>
82 <div class="refsect2">
83 <a name="hb-shape"></a><h3>hb_shape ()</h3>
84 <pre class="programlisting"><span class="returnvalue">void</span>
85 hb_shape (<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
86           <em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
87           <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> *features</code></em>,
88           <em class="parameter"><code>unsigned <span class="type">int</span> num_features</code></em>);</pre>
89 <p>Shapes <em class="parameter"><code>buffer</code></em>
90  using <em class="parameter"><code>font</code></em>
91  turning its Unicode characters content to
92 positioned glyphs. If <em class="parameter"><code>features</code></em>
93  is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it will be used to control the
94 features applied during shaping.</p>
95 <div class="refsect3">
96 <a name="hb-shape.parameters"></a><h4>Parameters</h4>
97 <div class="informaltable"><table class="informaltable" width="100%" border="0">
98 <colgroup>
99 <col width="150px" class="parameters_name">
100 <col class="parameters_description">
101 <col width="200px" class="parameters_annotations">
102 </colgroup>
103 <tbody>
104 <tr>
105 <td class="parameter_name"><p>font</p></td>
106 <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to use for shaping</p></td>
107 <td class="parameter_annotations"> </td>
108 </tr>
109 <tr>
110 <td class="parameter_name"><p>buffer</p></td>
111 <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> to shape</p></td>
112 <td class="parameter_annotations"> </td>
113 </tr>
114 <tr>
115 <td class="parameter_name"><p>features</p></td>
116 <td class="parameter_description"><p>an array of user
117 specified <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
118 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_features][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
119 </tr>
120 <tr>
121 <td class="parameter_name"><p>num_features</p></td>
122 <td class="parameter_description"><p>the length of <em class="parameter"><code>features</code></em>
123 array</p></td>
124 <td class="parameter_annotations"> </td>
125 </tr>
126 </tbody>
127 </table></div>
128 </div>
129 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
130 </div>
131 <hr>
132 <div class="refsect2">
133 <a name="hb-shape-full"></a><h3>hb_shape_full ()</h3>
134 <pre class="programlisting"><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
135 hb_shape_full (<em class="parameter"><code><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> *font</code></em>,
136                <em class="parameter"><code><a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> *buffer</code></em>,
137                <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> *features</code></em>,
138                <em class="parameter"><code>unsigned <span class="type">int</span> num_features</code></em>,
139                <em class="parameter"><code>const <span class="type">char</span> * const *shaper_list</code></em>);</pre>
140 <p>See <a class="link" href="harfbuzz-hb-shape.html#hb-shape" title="hb_shape ()"><code class="function">hb_shape()</code></a> for details. If <em class="parameter"><code>shaper_list</code></em>
141  is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the specified
142 shapers will be used in the given order, otherwise the default shapers list
143 will be used.</p>
144 <div class="refsect3">
145 <a name="hb-shape-full.parameters"></a><h4>Parameters</h4>
146 <div class="informaltable"><table class="informaltable" width="100%" border="0">
147 <colgroup>
148 <col width="150px" class="parameters_name">
149 <col class="parameters_description">
150 <col width="200px" class="parameters_annotations">
151 </colgroup>
152 <tbody>
153 <tr>
154 <td class="parameter_name"><p>font</p></td>
155 <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to use for shaping</p></td>
156 <td class="parameter_annotations"> </td>
157 </tr>
158 <tr>
159 <td class="parameter_name"><p>buffer</p></td>
160 <td class="parameter_description"><p>an <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> to shape</p></td>
161 <td class="parameter_annotations"> </td>
162 </tr>
163 <tr>
164 <td class="parameter_name"><p>features</p></td>
165 <td class="parameter_description"><p>an array of user
166 specified <a class="link" href="harfbuzz-hb-common.html#hb-feature-t" title="hb_feature_t"><span class="type">hb_feature_t</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
167 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_features][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
168 </tr>
169 <tr>
170 <td class="parameter_name"><p>num_features</p></td>
171 <td class="parameter_description"><p>the length of <em class="parameter"><code>features</code></em>
172 array</p></td>
173 <td class="parameter_annotations"> </td>
174 </tr>
175 <tr>
176 <td class="parameter_name"><p>shaper_list</p></td>
177 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
178 array of shapers to use or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
179 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
180 </tr>
181 </tbody>
182 </table></div>
183 </div>
184 <div class="refsect3">
185 <a name="hb-shape-full.returns"></a><h4>Returns</h4>
186 <p> false if all shapers failed, true otherwise</p>
187 </div>
188 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
189 </div>
190 <hr>
191 <div class="refsect2">
192 <a name="hb-shape-list-shapers"></a><h3>hb_shape_list_shapers ()</h3>
193 <pre class="programlisting">const <span class="returnvalue">char</span> **
194 hb_shape_list_shapers (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
195 <p>Retrieves the list of shapers supported by HarfBuzz.</p>
196 <div class="refsect3">
197 <a name="hb-shape-list-shapers.returns"></a><h4>Returns</h4>
198 <p>an array of
199 constant strings. </p>
200 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></p>
201 </div>
202 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
203 </div>
204 </div>
205 <div class="refsect1">
206 <a name="harfbuzz-hb-shape.other_details"></a><h2>Types and Values</h2>
207 </div>
208 </div>
209 <div class="footer">
210 <hr>Generated by GTK-Doc V1.29</div>
211 </body>
212 </html>