Imported Upstream version 8.2.2
[platform/upstream/harfbuzz.git] / docs / html / harfbuzz-hb-shape-plan.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-plan: 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="core-api.html" title="Core API">
9 <link rel="prev" href="harfbuzz-hb-set.html" title="hb-set">
10 <link rel="next" href="harfbuzz-hb-shape.html" title="hb-shape">
11 <meta name="generator" content="GTK-Doc V1.32 (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-plan.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="core-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="harfbuzz-hb-set.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="harfbuzz-hb-shape.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-plan"></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-plan.top_of_page"></a>hb-shape-plan</span></h2>
30 <p>hb-shape-plan — Object representing a shaping plan</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-plan.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create" title="hb_shape_plan_create ()">hb_shape_plan_create</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
53 </td>
54 <td class="function_name">
55 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create-cached" title="hb_shape_plan_create_cached ()">hb_shape_plan_create_cached</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
61 </td>
62 <td class="function_name">
63 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create2" title="hb_shape_plan_create2 ()">hb_shape_plan_create2</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
69 </td>
70 <td class="function_name">
71 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create-cached2" title="hb_shape_plan_create_cached2 ()">hb_shape_plan_create_cached2</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
77 </td>
78 <td class="function_name">
79 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-get-empty" title="hb_shape_plan_get_empty ()">hb_shape_plan_get_empty</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
85 </td>
86 <td class="function_name">
87 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-reference" title="hb_shape_plan_reference ()">hb_shape_plan_reference</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
93 </td>
94 <td class="function_name">
95 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-destroy" title="hb_shape_plan_destroy ()">hb_shape_plan_destroy</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
101 </td>
102 <td class="function_name">
103 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-set-user-data" title="hb_shape_plan_set_user_data ()">hb_shape_plan_set_user_data</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <span class="returnvalue">void</span> *
109 </td>
110 <td class="function_name">
111 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-get-user-data" title="hb_shape_plan_get_user_data ()">hb_shape_plan_get_user_data</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
117 </td>
118 <td class="function_name">
119 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-execute" title="hb_shape_plan_execute ()">hb_shape_plan_execute</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">const <span class="returnvalue">char</span> *
124 </td>
125 <td class="function_name">
126 <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-get-shaper" title="hb_shape_plan_get_shaper ()">hb_shape_plan_get_shaper</a> <span class="c_punctuation">()</span>
127 </td>
128 </tr>
129 </tbody>
130 </table></div>
131 </div>
132 <div class="refsect1">
133 <a name="harfbuzz-hb-shape-plan.other"></a><h2>Types and Values</h2>
134 <div class="informaltable"><table class="informaltable" width="100%" border="0">
135 <colgroup>
136 <col width="150px" class="other_proto_type">
137 <col class="other_proto_name">
138 </colgroup>
139 <tbody><tr>
140 <td class="typedef_keyword">typedef</td>
141 <td class="function_name"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t">hb_shape_plan_t</a></td>
142 </tr></tbody>
143 </table></div>
144 </div>
145 <div class="refsect1">
146 <a name="harfbuzz-hb-shape-plan.includes"></a><h2>Includes</h2>
147 <pre class="synopsis">#include &lt;hb.h&gt;
148 </pre>
149 </div>
150 <div class="refsect1">
151 <a name="harfbuzz-hb-shape-plan.description"></a><h2>Description</h2>
152 <p>Shape plans are an internal mechanism. Each plan contains state
153 describing how HarfBuzz will shape a particular text segment, based on
154 the combination of segment properties and the capabilities in the
155 font face in use.</p>
156 <p>Shape plans are not used for shaping directly, but can be queried to
157 access certain information about how shaping will perform, given a set
158 of specific input parameters (script, language, direction, features,
159 etc.).</p>
160 <p>Most client programs will not need to deal with shape plans directly.</p>
161 </div>
162 <div class="refsect1">
163 <a name="harfbuzz-hb-shape-plan.functions_details"></a><h2>Functions</h2>
164 <div class="refsect2">
165 <a name="hb-shape-plan-create"></a><h3>hb_shape_plan_create ()</h3>
166 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
167 hb_shape_plan_create (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> *face</code></em>,
168                       <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>,
169                       <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> *user_features</code></em>,
170                       <em class="parameter"><code>unsigned <span class="type">int</span> num_user_features</code></em>,
171                       <em class="parameter"><code>const <span class="type">char</span> * const *shaper_list</code></em>);</pre>
172 <p>Constructs a shaping plan for a combination of <em class="parameter"><code>face</code></em>
173 , <em class="parameter"><code>user_features</code></em>
174 , <em class="parameter"><code>props</code></em>
175 ,
176 and <em class="parameter"><code>shaper_list</code></em>
177 .</p>
178 <div class="refsect3">
179 <a name="hb-shape-plan-create.parameters"></a><h4>Parameters</h4>
180 <div class="informaltable"><table class="informaltable" width="100%" border="0">
181 <colgroup>
182 <col width="150px" class="parameters_name">
183 <col class="parameters_description">
184 <col width="200px" class="parameters_annotations">
185 </colgroup>
186 <tbody>
187 <tr>
188 <td class="parameter_name"><p>face</p></td>
189 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> to use</p></td>
190 <td class="parameter_annotations"> </td>
191 </tr>
192 <tr>
193 <td class="parameter_name"><p>props</p></td>
194 <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of the segment</p></td>
195 <td class="parameter_annotations"> </td>
196 </tr>
197 <tr>
198 <td class="parameter_name"><p>user_features</p></td>
199 <td class="parameter_description"><p>The list of user-selected features. </p></td>
200 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_user_features]</span></td>
201 </tr>
202 <tr>
203 <td class="parameter_name"><p>num_user_features</p></td>
204 <td class="parameter_description"><p>The number of user-selected features</p></td>
205 <td class="parameter_annotations"> </td>
206 </tr>
207 <tr>
208 <td class="parameter_name"><p>shaper_list</p></td>
209 <td class="parameter_description"><p>List of shapers to try. </p></td>
210 <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]</span></td>
211 </tr>
212 </tbody>
213 </table></div>
214 </div>
215 <div class="refsect3">
216 <a name="hb-shape-plan-create.returns"></a><h4>Returns</h4>
217 <p>The shaping plan. </p>
218 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
219 </div>
220 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
221 </div>
222 <hr>
223 <div class="refsect2">
224 <a name="hb-shape-plan-create-cached"></a><h3>hb_shape_plan_create_cached ()</h3>
225 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
226 hb_shape_plan_create_cached (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> *face</code></em>,
227                              <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>,
228                              <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> *user_features</code></em>,
229                              <em class="parameter"><code>unsigned <span class="type">int</span> num_user_features</code></em>,
230                              <em class="parameter"><code>const <span class="type">char</span> * const *shaper_list</code></em>);</pre>
231 <p>Creates a cached shaping plan suitable for reuse, for a combination
232 of <em class="parameter"><code>face</code></em>
233 , <em class="parameter"><code>user_features</code></em>
234 , <em class="parameter"><code>props</code></em>
235 , and <em class="parameter"><code>shaper_list</code></em>
236 .</p>
237 <div class="refsect3">
238 <a name="hb-shape-plan-create-cached.parameters"></a><h4>Parameters</h4>
239 <div class="informaltable"><table class="informaltable" width="100%" border="0">
240 <colgroup>
241 <col width="150px" class="parameters_name">
242 <col class="parameters_description">
243 <col width="200px" class="parameters_annotations">
244 </colgroup>
245 <tbody>
246 <tr>
247 <td class="parameter_name"><p>face</p></td>
248 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> to use</p></td>
249 <td class="parameter_annotations"> </td>
250 </tr>
251 <tr>
252 <td class="parameter_name"><p>props</p></td>
253 <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of the segment</p></td>
254 <td class="parameter_annotations"> </td>
255 </tr>
256 <tr>
257 <td class="parameter_name"><p>user_features</p></td>
258 <td class="parameter_description"><p>The list of user-selected features. </p></td>
259 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_user_features]</span></td>
260 </tr>
261 <tr>
262 <td class="parameter_name"><p>num_user_features</p></td>
263 <td class="parameter_description"><p>The number of user-selected features</p></td>
264 <td class="parameter_annotations"> </td>
265 </tr>
266 <tr>
267 <td class="parameter_name"><p>shaper_list</p></td>
268 <td class="parameter_description"><p>List of shapers to try. </p></td>
269 <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]</span></td>
270 </tr>
271 </tbody>
272 </table></div>
273 </div>
274 <div class="refsect3">
275 <a name="hb-shape-plan-create-cached.returns"></a><h4>Returns</h4>
276 <p>The shaping plan. </p>
277 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
278 </div>
279 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
280 </div>
281 <hr>
282 <div class="refsect2">
283 <a name="hb-shape-plan-create2"></a><h3>hb_shape_plan_create2 ()</h3>
284 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
285 hb_shape_plan_create2 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> *face</code></em>,
286                        <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>,
287                        <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> *user_features</code></em>,
288                        <em class="parameter"><code>unsigned <span class="type">int</span> num_user_features</code></em>,
289                        <em class="parameter"><code>const <span class="type">int</span> *coords</code></em>,
290                        <em class="parameter"><code>unsigned <span class="type">int</span> num_coords</code></em>,
291                        <em class="parameter"><code>const <span class="type">char</span> * const *shaper_list</code></em>);</pre>
292 <p>The variable-font version of <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create" title="hb_shape_plan_create ()"><span class="type">hb_shape_plan_create</span></a>. 
293 Constructs a shaping plan for a combination of <em class="parameter"><code>face</code></em>
294 , <em class="parameter"><code>user_features</code></em>
295 , <em class="parameter"><code>props</code></em>
296 ,
297 and <em class="parameter"><code>shaper_list</code></em>
298 , plus the variation-space coordinates <em class="parameter"><code>coords</code></em>
299 .</p>
300 <div class="refsect3">
301 <a name="hb-shape-plan-create2.parameters"></a><h4>Parameters</h4>
302 <div class="informaltable"><table class="informaltable" width="100%" border="0">
303 <colgroup>
304 <col width="150px" class="parameters_name">
305 <col class="parameters_description">
306 <col width="200px" class="parameters_annotations">
307 </colgroup>
308 <tbody>
309 <tr>
310 <td class="parameter_name"><p>face</p></td>
311 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> to use</p></td>
312 <td class="parameter_annotations"> </td>
313 </tr>
314 <tr>
315 <td class="parameter_name"><p>props</p></td>
316 <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of the segment</p></td>
317 <td class="parameter_annotations"> </td>
318 </tr>
319 <tr>
320 <td class="parameter_name"><p>user_features</p></td>
321 <td class="parameter_description"><p>The list of user-selected features. </p></td>
322 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_user_features]</span></td>
323 </tr>
324 <tr>
325 <td class="parameter_name"><p>num_user_features</p></td>
326 <td class="parameter_description"><p>The number of user-selected features</p></td>
327 <td class="parameter_annotations"> </td>
328 </tr>
329 <tr>
330 <td class="parameter_name"><p>coords</p></td>
331 <td class="parameter_description"><p>The list of variation-space coordinates. </p></td>
332 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_coords]</span></td>
333 </tr>
334 <tr>
335 <td class="parameter_name"><p>num_coords</p></td>
336 <td class="parameter_description"><p>The number of variation-space coordinates</p></td>
337 <td class="parameter_annotations"> </td>
338 </tr>
339 <tr>
340 <td class="parameter_name"><p>shaper_list</p></td>
341 <td class="parameter_description"><p>List of shapers to try. </p></td>
342 <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]</span></td>
343 </tr>
344 </tbody>
345 </table></div>
346 </div>
347 <div class="refsect3">
348 <a name="hb-shape-plan-create2.returns"></a><h4>Returns</h4>
349 <p>The shaping plan. </p>
350 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
351 </div>
352 <p class="since">Since: <a class="link" href="api-index-1-4-0.html#api-index-1.4.0">1.4.0</a></p>
353 </div>
354 <hr>
355 <div class="refsect2">
356 <a name="hb-shape-plan-create-cached2"></a><h3>hb_shape_plan_create_cached2 ()</h3>
357 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
358 hb_shape_plan_create_cached2 (<em class="parameter"><code><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> *face</code></em>,
359                               <em class="parameter"><code>const <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> *props</code></em>,
360                               <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> *user_features</code></em>,
361                               <em class="parameter"><code>unsigned <span class="type">int</span> num_user_features</code></em>,
362                               <em class="parameter"><code>const <span class="type">int</span> *coords</code></em>,
363                               <em class="parameter"><code>unsigned <span class="type">int</span> num_coords</code></em>,
364                               <em class="parameter"><code>const <span class="type">char</span> * const *shaper_list</code></em>);</pre>
365 <p>The variable-font version of <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-create-cached" title="hb_shape_plan_create_cached ()"><span class="type">hb_shape_plan_create_cached</span></a>. 
366 Creates a cached shaping plan suitable for reuse, for a combination
367 of <em class="parameter"><code>face</code></em>
368 , <em class="parameter"><code>user_features</code></em>
369 , <em class="parameter"><code>props</code></em>
370 , and <em class="parameter"><code>shaper_list</code></em>
371 , plus the
372 variation-space coordinates <em class="parameter"><code>coords</code></em>
373 .</p>
374 <div class="refsect3">
375 <a name="hb-shape-plan-create-cached2.parameters"></a><h4>Parameters</h4>
376 <div class="informaltable"><table class="informaltable" width="100%" border="0">
377 <colgroup>
378 <col width="150px" class="parameters_name">
379 <col class="parameters_description">
380 <col width="200px" class="parameters_annotations">
381 </colgroup>
382 <tbody>
383 <tr>
384 <td class="parameter_name"><p>face</p></td>
385 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> to use</p></td>
386 <td class="parameter_annotations"> </td>
387 </tr>
388 <tr>
389 <td class="parameter_name"><p>props</p></td>
390 <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-segment-properties-t" title="hb_segment_properties_t"><span class="type">hb_segment_properties_t</span></a> of the segment</p></td>
391 <td class="parameter_annotations"> </td>
392 </tr>
393 <tr>
394 <td class="parameter_name"><p>user_features</p></td>
395 <td class="parameter_description"><p>The list of user-selected features. </p></td>
396 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_user_features]</span></td>
397 </tr>
398 <tr>
399 <td class="parameter_name"><p>num_user_features</p></td>
400 <td class="parameter_description"><p>The number of user-selected features</p></td>
401 <td class="parameter_annotations"> </td>
402 </tr>
403 <tr>
404 <td class="parameter_name"><p>coords</p></td>
405 <td class="parameter_description"><p>The list of variation-space coordinates. </p></td>
406 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_coords]</span></td>
407 </tr>
408 <tr>
409 <td class="parameter_name"><p>num_coords</p></td>
410 <td class="parameter_description"><p>The number of variation-space coordinates</p></td>
411 <td class="parameter_annotations"> </td>
412 </tr>
413 <tr>
414 <td class="parameter_name"><p>shaper_list</p></td>
415 <td class="parameter_description"><p>List of shapers to try. </p></td>
416 <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]</span></td>
417 </tr>
418 </tbody>
419 </table></div>
420 </div>
421 <div class="refsect3">
422 <a name="hb-shape-plan-create-cached2.returns"></a><h4>Returns</h4>
423 <p>The shaping plan. </p>
424 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
425 </div>
426 <p class="since">Since: <a class="link" href="api-index-1-4-0.html#api-index-1.4.0">1.4.0</a></p>
427 </div>
428 <hr>
429 <div class="refsect2">
430 <a name="hb-shape-plan-get-empty"></a><h3>hb_shape_plan_get_empty ()</h3>
431 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
432 hb_shape_plan_get_empty (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
433 <p>Fetches the singleton empty shaping plan.</p>
434 <div class="refsect3">
435 <a name="hb-shape-plan-get-empty.returns"></a><h4>Returns</h4>
436 <p>The empty shaping plan. </p>
437 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
438 </div>
439 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
440 </div>
441 <hr>
442 <div class="refsect2">
443 <a name="hb-shape-plan-reference"></a><h3>hb_shape_plan_reference ()</h3>
444 <pre class="programlisting"><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="returnvalue">hb_shape_plan_t</span></a> *
445 hb_shape_plan_reference (<em class="parameter"><code><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>);</pre>
446 <p>Increases the reference count on the given shaping plan.</p>
447 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
448 <div class="refsect3">
449 <a name="hb-shape-plan-reference.parameters"></a><h4>Parameters</h4>
450 <div class="informaltable"><table class="informaltable" width="100%" border="0">
451 <colgroup>
452 <col width="150px" class="parameters_name">
453 <col class="parameters_description">
454 <col width="200px" class="parameters_annotations">
455 </colgroup>
456 <tbody><tr>
457 <td class="parameter_name"><p>shape_plan</p></td>
458 <td class="parameter_description"><p>A shaping plan</p></td>
459 <td class="parameter_annotations"> </td>
460 </tr></tbody>
461 </table></div>
462 </div>
463 <div class="refsect3">
464 <a name="hb-shape-plan-reference.returns"></a><h4>Returns</h4>
465 <p><em class="parameter"><code>shape_plan</code></em>
466 . </p>
467 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
468 </div>
469 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
470 </div>
471 <hr>
472 <div class="refsect2">
473 <a name="hb-shape-plan-destroy"></a><h3>hb_shape_plan_destroy ()</h3>
474 <pre class="programlisting"><span class="returnvalue">void</span>
475 hb_shape_plan_destroy (<em class="parameter"><code><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>);</pre>
476 <p>Decreases the reference count on the given shaping plan. When the
477 reference count reaches zero, the shaping plan is destroyed,
478 freeing all memory.</p>
479 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
480 <div class="refsect3">
481 <a name="hb-shape-plan-destroy.parameters"></a><h4>Parameters</h4>
482 <div class="informaltable"><table class="informaltable" width="100%" border="0">
483 <colgroup>
484 <col width="150px" class="parameters_name">
485 <col class="parameters_description">
486 <col width="200px" class="parameters_annotations">
487 </colgroup>
488 <tbody><tr>
489 <td class="parameter_name"><p>shape_plan</p></td>
490 <td class="parameter_description"><p>A shaping plan</p></td>
491 <td class="parameter_annotations"> </td>
492 </tr></tbody>
493 </table></div>
494 </div>
495 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
496 </div>
497 <hr>
498 <div class="refsect2">
499 <a name="hb-shape-plan-set-user-data"></a><h3>hb_shape_plan_set_user_data ()</h3>
500 <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>
501 hb_shape_plan_set_user_data (<em class="parameter"><code><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>,
502                              <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>,
503                              <em class="parameter"><code><span class="type">void</span> *data</code></em>,
504                              <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-destroy-func-t" title="hb_destroy_func_t ()"><span class="type">hb_destroy_func_t</span></a> destroy</code></em>,
505                              <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="type">hb_bool_t</span></a> replace</code></em>);</pre>
506 <p>Attaches a user-data key/data pair to the given shaping plan.</p>
507 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
508 <div class="refsect3">
509 <a name="hb-shape-plan-set-user-data.parameters"></a><h4>Parameters</h4>
510 <div class="informaltable"><table class="informaltable" width="100%" border="0">
511 <colgroup>
512 <col width="150px" class="parameters_name">
513 <col class="parameters_description">
514 <col width="200px" class="parameters_annotations">
515 </colgroup>
516 <tbody>
517 <tr>
518 <td class="parameter_name"><p>shape_plan</p></td>
519 <td class="parameter_description"><p>A shaping plan</p></td>
520 <td class="parameter_annotations"> </td>
521 </tr>
522 <tr>
523 <td class="parameter_name"><p>key</p></td>
524 <td class="parameter_description"><p>The user-data key to set</p></td>
525 <td class="parameter_annotations"> </td>
526 </tr>
527 <tr>
528 <td class="parameter_name"><p>data</p></td>
529 <td class="parameter_description"><p>A pointer to the user data</p></td>
530 <td class="parameter_annotations"> </td>
531 </tr>
532 <tr>
533 <td class="parameter_name"><p>destroy</p></td>
534 <td class="parameter_description"><p>A callback to call when <em class="parameter"><code>data</code></em>
535 is not needed anymore. </p></td>
536 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
537 </tr>
538 <tr>
539 <td class="parameter_name"><p>replace</p></td>
540 <td class="parameter_description"><p>Whether to replace an existing data with the same key</p></td>
541 <td class="parameter_annotations"> </td>
542 </tr>
543 </tbody>
544 </table></div>
545 </div>
546 <div class="refsect3">
547 <a name="hb-shape-plan-set-user-data.returns"></a><h4>Returns</h4>
548 <p> <code class="literal">true</code> if success, <code class="literal">false</code> otherwise.</p>
549 </div>
550 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
551 </div>
552 <hr>
553 <div class="refsect2">
554 <a name="hb-shape-plan-get-user-data"></a><h3>hb_shape_plan_get_user_data ()</h3>
555 <pre class="programlisting"><span class="returnvalue">void</span> *
556 hb_shape_plan_get_user_data (<em class="parameter"><code>const <a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>,
557                              <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-user-data-key-t" title="hb_user_data_key_t"><span class="type">hb_user_data_key_t</span></a> *key</code></em>);</pre>
558 <p>Fetches the user data associated with the specified key, 
559 attached to the specified shaping plan.</p>
560 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
561 <div class="refsect3">
562 <a name="hb-shape-plan-get-user-data.parameters"></a><h4>Parameters</h4>
563 <div class="informaltable"><table class="informaltable" width="100%" border="0">
564 <colgroup>
565 <col width="150px" class="parameters_name">
566 <col class="parameters_description">
567 <col width="200px" class="parameters_annotations">
568 </colgroup>
569 <tbody>
570 <tr>
571 <td class="parameter_name"><p>shape_plan</p></td>
572 <td class="parameter_description"><p>A shaping plan</p></td>
573 <td class="parameter_annotations"> </td>
574 </tr>
575 <tr>
576 <td class="parameter_name"><p>key</p></td>
577 <td class="parameter_description"><p>The user-data key to query</p></td>
578 <td class="parameter_annotations"> </td>
579 </tr>
580 </tbody>
581 </table></div>
582 </div>
583 <div class="refsect3">
584 <a name="hb-shape-plan-get-user-data.returns"></a><h4>Returns</h4>
585 <p>A pointer to the user data. </p>
586 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
587 </div>
588 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
589 </div>
590 <hr>
591 <div class="refsect2">
592 <a name="hb-shape-plan-execute"></a><h3>hb_shape_plan_execute ()</h3>
593 <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>
594 hb_shape_plan_execute (<em class="parameter"><code><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>,
595                        <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>,
596                        <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>,
597                        <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>,
598                        <em class="parameter"><code>unsigned <span class="type">int</span> num_features</code></em>);</pre>
599 <p>Executes the given shaping plan on the specified buffer, using
600 the given <em class="parameter"><code>font</code></em>
601  and <em class="parameter"><code>features</code></em>
602 .</p>
603 <div class="refsect3">
604 <a name="hb-shape-plan-execute.parameters"></a><h4>Parameters</h4>
605 <div class="informaltable"><table class="informaltable" width="100%" border="0">
606 <colgroup>
607 <col width="150px" class="parameters_name">
608 <col class="parameters_description">
609 <col width="200px" class="parameters_annotations">
610 </colgroup>
611 <tbody>
612 <tr>
613 <td class="parameter_name"><p>shape_plan</p></td>
614 <td class="parameter_description"><p>A shaping plan</p></td>
615 <td class="parameter_annotations"> </td>
616 </tr>
617 <tr>
618 <td class="parameter_name"><p>font</p></td>
619 <td class="parameter_description"><p>The <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</p></td>
620 <td class="parameter_annotations"> </td>
621 </tr>
622 <tr>
623 <td class="parameter_name"><p>buffer</p></td>
624 <td class="parameter_description"><p>The <a class="link" href="harfbuzz-hb-buffer.html#hb-buffer-t" title="hb_buffer_t"><span class="type">hb_buffer_t</span></a> to work upon</p></td>
625 <td class="parameter_annotations"> </td>
626 </tr>
627 <tr>
628 <td class="parameter_name"><p>features</p></td>
629 <td class="parameter_description"><p>Features to enable. </p></td>
630 <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]</span></td>
631 </tr>
632 <tr>
633 <td class="parameter_name"><p>num_features</p></td>
634 <td class="parameter_description"><p>The number of features to enable</p></td>
635 <td class="parameter_annotations"> </td>
636 </tr>
637 </tbody>
638 </table></div>
639 </div>
640 <div class="refsect3">
641 <a name="hb-shape-plan-execute.returns"></a><h4>Returns</h4>
642 <p> <code class="literal">true</code> if success, <code class="literal">false</code> otherwise.</p>
643 </div>
644 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
645 </div>
646 <hr>
647 <div class="refsect2">
648 <a name="hb-shape-plan-get-shaper"></a><h3>hb_shape_plan_get_shaper ()</h3>
649 <pre class="programlisting">const <span class="returnvalue">char</span> *
650 hb_shape_plan_get_shaper (<em class="parameter"><code><a class="link" href="harfbuzz-hb-shape-plan.html#hb-shape-plan-t" title="hb_shape_plan_t"><span class="type">hb_shape_plan_t</span></a> *shape_plan</code></em>);</pre>
651 <p>Fetches the shaper from a given shaping plan.</p>
652 <div class="refsect3">
653 <a name="hb-shape-plan-get-shaper.parameters"></a><h4>Parameters</h4>
654 <div class="informaltable"><table class="informaltable" width="100%" border="0">
655 <colgroup>
656 <col width="150px" class="parameters_name">
657 <col class="parameters_description">
658 <col width="200px" class="parameters_annotations">
659 </colgroup>
660 <tbody><tr>
661 <td class="parameter_name"><p>shape_plan</p></td>
662 <td class="parameter_description"><p>A shaping plan</p></td>
663 <td class="parameter_annotations"> </td>
664 </tr></tbody>
665 </table></div>
666 </div>
667 <div class="refsect3">
668 <a name="hb-shape-plan-get-shaper.returns"></a><h4>Returns</h4>
669 <p>The shaper. </p>
670 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
671 </div>
672 <p class="since">Since: <a class="link" href="api-index-0-9-7.html#api-index-0.9.7">0.9.7</a></p>
673 </div>
674 </div>
675 <div class="refsect1">
676 <a name="harfbuzz-hb-shape-plan.other_details"></a><h2>Types and Values</h2>
677 <div class="refsect2">
678 <a name="hb-shape-plan-t"></a><h3>hb_shape_plan_t</h3>
679 <pre class="programlisting">typedef struct hb_shape_plan_t hb_shape_plan_t;
680 </pre>
681 <p>Data type for holding a shaping plan. </p>
682 <p>Shape plans contain information about how HarfBuzz will shape a
683 particular text segment, based on the segment's properties and the
684 capabilities in the font face in use.</p>
685 <p>Shape plans can be queried about how shaping will perform, given a set
686 of specific input parameters (script, language, direction, features,
687 etc.).</p>
688 </div>
689 </div>
690 </div>
691 <div class="footer">
692 <hr>Generated by GTK-Doc V1.32</div>
693 </body>
694 </html>