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>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">
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>
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>
25 <div class="refentry">
26 <a name="harfbuzz-hb-shape-plan"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
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>
32 <td class="gallery_image" valign="top" align="right"></td>
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">
38 <col width="150px" class="functions_proto_type">
39 <col class="functions_proto_name">
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> *
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>
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> *
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>
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> *
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>
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> *
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>
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> *
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>
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> *
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>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
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>
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>
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>
107 <td class="function_type">
108 <span class="returnvalue">void</span> *
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>
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>
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>
123 <td class="function_type">const <span class="returnvalue">char</span> *
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>
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">
136 <col width="150px" class="other_proto_type">
137 <col class="other_proto_name">
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>
145 <div class="refsect1">
146 <a name="harfbuzz-hb-shape-plan.includes"></a><h2>Includes</h2>
147 <pre class="synopsis">#include <hb.h>
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,
160 <p>Most client programs will not need to deal with shape plans directly.</p>
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>
176 and <em class="parameter"><code>shaper_list</code></em>
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">
182 <col width="150px" class="parameters_name">
183 <col class="parameters_description">
184 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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">
241 <col width="150px" class="parameters_name">
242 <col class="parameters_description">
243 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
297 and <em class="parameter"><code>shaper_list</code></em>
298 , plus the variation-space coordinates <em class="parameter"><code>coords</code></em>
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">
304 <col width="150px" class="parameters_name">
305 <col class="parameters_description">
306 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
372 variation-space coordinates <em class="parameter"><code>coords</code></em>
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">
378 <col width="150px" class="parameters_name">
379 <col class="parameters_description">
380 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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">
452 <col width="150px" class="parameters_name">
453 <col class="parameters_description">
454 <col width="200px" class="parameters_annotations">
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>
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>
467 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
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>
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">
484 <col width="150px" class="parameters_name">
485 <col class="parameters_description">
486 <col width="200px" class="parameters_annotations">
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>
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>
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">
512 <col width="150px" class="parameters_name">
513 <col class="parameters_description">
514 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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">
565 <col width="150px" class="parameters_name">
566 <col class="parameters_description">
567 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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">
607 <col width="150px" class="parameters_name">
608 <col class="parameters_description">
609 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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">
656 <col width="150px" class="parameters_name">
657 <col class="parameters_description">
658 <col width="200px" class="parameters_annotations">
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>
667 <div class="refsect3">
668 <a name="hb-shape-plan-get-shaper.returns"></a><h4>Returns</h4>
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>
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>
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;
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,
692 <hr>Generated by GTK-Doc V1.32</div>