Imported Upstream version 8.2.2
[platform/upstream/harfbuzz.git] / docs / html / harfbuzz-hb-ft.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-ft: 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="integration-api.html" title="Integration API">
9 <link rel="prev" href="harfbuzz-hb-coretext.html" title="hb-coretext">
10 <link rel="next" href="harfbuzz-hb-glib.html" title="hb-glib">
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-ft.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="integration-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="harfbuzz-hb-coretext.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="harfbuzz-hb-glib.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-ft"></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-ft.top_of_page"></a>hb-ft</span></h2>
30 <p>hb-ft — FreeType integration</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-ft.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-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create" title="hb_ft_face_create ()">hb_ft_face_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-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
53 </td>
54 <td class="function_name">
55 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create-cached" title="hb_ft_face_create_cached ()">hb_ft_face_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-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
61 </td>
62 <td class="function_name">
63 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create-referenced" title="hb_ft_face_create_referenced ()">hb_ft_face_create_referenced</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="returnvalue">hb_font_t</span></a> *
69 </td>
70 <td class="function_name">
71 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()">hb_ft_font_create</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="returnvalue">hb_font_t</span></a> *
77 </td>
78 <td class="function_name">
79 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()">hb_ft_font_create_referenced</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
85 </td>
86 <td class="function_name">
87 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-changed" title="hb_ft_font_changed ()">hb_ft_font_changed</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <span class="returnvalue">FT_Face</span>
93 </td>
94 <td class="function_name">
95 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-get-face" title="hb_ft_font_get_face ()">hb_ft_font_get_face</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <span class="returnvalue">FT_Face</span>
101 </td>
102 <td class="function_name">
103 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-lock-face" title="hb_ft_font_lock_face ()">hb_ft_font_lock_face</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-ft.html#hb-ft-font-unlock-face" title="hb_ft_font_unlock_face ()">hb_ft_font_unlock_face</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
117 </td>
118 <td class="function_name">
119 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-set-load-flags" title="hb_ft_font_set_load_flags ()">hb_ft_font_set_load_flags</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">
124 <span class="returnvalue">int</span>
125 </td>
126 <td class="function_name">
127 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-get-load-flags" title="hb_ft_font_get_load_flags ()">hb_ft_font_get_load_flags</a> <span class="c_punctuation">()</span>
128 </td>
129 </tr>
130 <tr>
131 <td class="function_type">
132 <span class="returnvalue">void</span>
133 </td>
134 <td class="function_name">
135 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-set-funcs" title="hb_ft_font_set_funcs ()">hb_ft_font_set_funcs</a> <span class="c_punctuation">()</span>
136 </td>
137 </tr>
138 <tr>
139 <td class="function_type">
140 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
141 </td>
142 <td class="function_name">
143 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-hb-font-changed" title="hb_ft_hb_font_changed ()">hb_ft_hb_font_changed</a> <span class="c_punctuation">()</span>
144 </td>
145 </tr>
146 </tbody>
147 </table></div>
148 </div>
149 <div class="refsect1">
150 <a name="harfbuzz-hb-ft.includes"></a><h2>Includes</h2>
151 <pre class="synopsis">#include &lt;hb-ft.h&gt;
152 </pre>
153 </div>
154 <div class="refsect1">
155 <a name="harfbuzz-hb-ft.description"></a><h2>Description</h2>
156 <p>Functions for using HarfBuzz with the FreeType library.</p>
157 <p>HarfBuzz supports using FreeType to provide face and
158 font data.</p>
159 <div class="note">Note that FreeType is not thread-safe, therefore these
160 functions are not thread-safe either.</div>
161 </div>
162 <div class="refsect1">
163 <a name="harfbuzz-hb-ft.functions_details"></a><h2>Functions</h2>
164 <div class="refsect2">
165 <a name="hb-ft-face-create"></a><h3>hb_ft_face_create ()</h3>
166 <pre class="programlisting"><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
167 hb_ft_face_create (<em class="parameter"><code><span class="type">FT_Face</span> ft_face</code></em>,
168                    <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>);</pre>
169 <p>Creates an <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object from the specified FT_Face.</p>
170 <p>Note that this is using the FT_Face object just to get at the underlying
171 font data, and fonts created from the returned <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> will use the native
172 HarfBuzz font implementation, unless you call <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-set-funcs" title="hb_ft_font_set_funcs ()"><code class="function">hb_ft_font_set_funcs()</code></a> on them.</p>
173 <p>This variant of the function does not provide any life-cycle management.</p>
174 <p>Most client programs should use <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create-referenced" title="hb_ft_face_create_referenced ()"><code class="function">hb_ft_face_create_referenced()</code></a>
175 (or, perhaps, <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create-cached" title="hb_ft_face_create_cached ()"><code class="function">hb_ft_face_create_cached()</code></a>) instead. </p>
176 <p>If you know you have valid reasons not to use <a class="link" href="harfbuzz-hb-ft.html#hb-ft-face-create-referenced" title="hb_ft_face_create_referenced ()"><code class="function">hb_ft_face_create_referenced()</code></a>,
177 then it is the client program's responsibility to destroy <em class="parameter"><code>ft_face</code></em>
178  
179 after the <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object has been destroyed.</p>
180 <div class="refsect3">
181 <a name="hb-ft-face-create.parameters"></a><h4>Parameters</h4>
182 <div class="informaltable"><table class="informaltable" width="100%" border="0">
183 <colgroup>
184 <col width="150px" class="parameters_name">
185 <col class="parameters_description">
186 <col width="200px" class="parameters_annotations">
187 </colgroup>
188 <tbody>
189 <tr>
190 <td class="parameter_name"><p>ft_face</p></td>
191 <td class="parameter_description"><p>FT_Face to work upon. </p></td>
192 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'destroy_data', for callbacks."><span class="acronym">destroy</span></acronym> destroy][<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span></td>
193 </tr>
194 <tr>
195 <td class="parameter_name"><p>destroy</p></td>
196 <td class="parameter_description"><p>A callback to call when the face object is not needed anymore. </p></td>
197 <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>
198 </tr>
199 </tbody>
200 </table></div>
201 </div>
202 <div class="refsect3">
203 <a name="hb-ft-face-create.returns"></a><h4>Returns</h4>
204 <p>the new <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object. </p>
205 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
206 </div>
207 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
208 </div>
209 <hr>
210 <div class="refsect2">
211 <a name="hb-ft-face-create-cached"></a><h3>hb_ft_face_create_cached ()</h3>
212 <pre class="programlisting"><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
213 hb_ft_face_create_cached (<em class="parameter"><code><span class="type">FT_Face</span> ft_face</code></em>);</pre>
214 <p>Creates an <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object from the specified FT_Face.</p>
215 <p>Note that this is using the FT_Face object just to get at the underlying
216 font data, and fonts created from the returned <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> will use the native
217 HarfBuzz font implementation, unless you call <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-set-funcs" title="hb_ft_font_set_funcs ()"><code class="function">hb_ft_font_set_funcs()</code></a> on them.</p>
218 <p>This variant of the function caches the newly created <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a>
219 face object, using the <em class="parameter"><code>generic</code></em>
220  pointer of <em class="parameter"><code>ft_face</code></em>
221 . Subsequent function
222 calls that are passed the same <em class="parameter"><code>ft_face</code></em>
223  parameter will have the same
224 <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> returned to them, and that <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> will be correctly
225 reference counted.</p>
226 <p>However, client programs are still responsible for destroying
227 <em class="parameter"><code>ft_face</code></em>
228  after the last <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object has been destroyed.</p>
229 <div class="refsect3">
230 <a name="hb-ft-face-create-cached.parameters"></a><h4>Parameters</h4>
231 <div class="informaltable"><table class="informaltable" width="100%" border="0">
232 <colgroup>
233 <col width="150px" class="parameters_name">
234 <col class="parameters_description">
235 <col width="200px" class="parameters_annotations">
236 </colgroup>
237 <tbody><tr>
238 <td class="parameter_name"><p>ft_face</p></td>
239 <td class="parameter_description"><p>FT_Face to work upon</p></td>
240 <td class="parameter_annotations"> </td>
241 </tr></tbody>
242 </table></div>
243 </div>
244 <div class="refsect3">
245 <a name="hb-ft-face-create-cached.returns"></a><h4>Returns</h4>
246 <p>the new <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object. </p>
247 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
248 </div>
249 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
250 </div>
251 <hr>
252 <div class="refsect2">
253 <a name="hb-ft-face-create-referenced"></a><h3>hb_ft_face_create_referenced ()</h3>
254 <pre class="programlisting"><a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
255 hb_ft_face_create_referenced (<em class="parameter"><code><span class="type">FT_Face</span> ft_face</code></em>);</pre>
256 <p>Creates an <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object from the specified FT_Face.</p>
257 <p>Note that this is using the FT_Face object just to get at the underlying
258 font data, and fonts created from the returned <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> will use the native
259 HarfBuzz font implementation, unless you call <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-set-funcs" title="hb_ft_font_set_funcs ()"><code class="function">hb_ft_font_set_funcs()</code></a> on them.</p>
260 <p>This is the preferred variant of the hb_ft_face_create*
261 function family, because it calls <code class="function">FT_Reference_Face()</code> on <em class="parameter"><code>ft_face</code></em>
262 ,
263 ensuring that <em class="parameter"><code>ft_face</code></em>
264  remains alive as long as the resulting
265 <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object remains alive. Also calls <code class="function">FT_Done_Face()</code>
266 when the <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object is destroyed.</p>
267 <p>Use this version unless you know you have good reasons not to.</p>
268 <div class="refsect3">
269 <a name="hb-ft-face-create-referenced.parameters"></a><h4>Parameters</h4>
270 <div class="informaltable"><table class="informaltable" width="100%" border="0">
271 <colgroup>
272 <col width="150px" class="parameters_name">
273 <col class="parameters_description">
274 <col width="200px" class="parameters_annotations">
275 </colgroup>
276 <tbody><tr>
277 <td class="parameter_name"><p>ft_face</p></td>
278 <td class="parameter_description"><p>FT_Face to work upon</p></td>
279 <td class="parameter_annotations"> </td>
280 </tr></tbody>
281 </table></div>
282 </div>
283 <div class="refsect3">
284 <a name="hb-ft-face-create-referenced.returns"></a><h4>Returns</h4>
285 <p>the new <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object. </p>
286 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
287 </div>
288 <p class="since">Since: <a class="link" href="api-index-0-9-38.html#api-index-0.9.38">0.9.38</a></p>
289 </div>
290 <hr>
291 <div class="refsect2">
292 <a name="hb-ft-font-create"></a><h3>hb_ft_font_create ()</h3>
293 <pre class="programlisting"><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="returnvalue">hb_font_t</span></a> *
294 hb_ft_font_create (<em class="parameter"><code><span class="type">FT_Face</span> ft_face</code></em>,
295                    <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>);</pre>
296 <p>Creates an <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object from the specified FT_Face.</p>
297 <div class="note">Note: You must set the face size on <em class="parameter"><code>ft_face</code></em> before calling
298 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a> on it. HarfBuzz assumes size is always set and will
299 access `size` member of FT_Face unconditionally.</div>
300 <p>This variant of the function does not provide any life-cycle management.</p>
301 <p>Most client programs should use <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>
302 instead. </p>
303 <p>If you know you have valid reasons not to use <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>,
304 then it is the client program's responsibility to destroy <em class="parameter"><code>ft_face</code></em>
305  
306 after the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object has been destroyed.</p>
307 <p>HarfBuzz will use the <em class="parameter"><code>destroy</code></em>
308  callback on the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object 
309 if it is supplied when you use this function. However, even if <em class="parameter"><code>destroy</code></em>
310
311 is provided, it is the client program's responsibility to destroy <em class="parameter"><code>ft_face</code></em>
312 ,
313 and it is the client program's responsibility to ensure that <em class="parameter"><code>ft_face</code></em>
314  is
315 destroyed only after the <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object has been destroyed.</p>
316 <div class="refsect3">
317 <a name="hb-ft-font-create.parameters"></a><h4>Parameters</h4>
318 <div class="informaltable"><table class="informaltable" width="100%" border="0">
319 <colgroup>
320 <col width="150px" class="parameters_name">
321 <col class="parameters_description">
322 <col width="200px" class="parameters_annotations">
323 </colgroup>
324 <tbody>
325 <tr>
326 <td class="parameter_name"><p>ft_face</p></td>
327 <td class="parameter_description"><p>FT_Face to work upon. </p></td>
328 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'destroy_data', for callbacks."><span class="acronym">destroy</span></acronym> destroy][<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span></td>
329 </tr>
330 <tr>
331 <td class="parameter_name"><p>destroy</p></td>
332 <td class="parameter_description"><p>A callback to call when the font object is not needed anymore. </p></td>
333 <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>
334 </tr>
335 </tbody>
336 </table></div>
337 </div>
338 <div class="refsect3">
339 <a name="hb-ft-font-create.returns"></a><h4>Returns</h4>
340 <p>the new <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object. </p>
341 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
342 </div>
343 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
344 </div>
345 <hr>
346 <div class="refsect2">
347 <a name="hb-ft-font-create-referenced"></a><h3>hb_ft_font_create_referenced ()</h3>
348 <pre class="programlisting"><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="returnvalue">hb_font_t</span></a> *
349 hb_ft_font_create_referenced (<em class="parameter"><code><span class="type">FT_Face</span> ft_face</code></em>);</pre>
350 <p>Creates an <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object from the specified FT_Face.</p>
351 <div class="note">Note: You must set the face size on <em class="parameter"><code>ft_face</code></em> before calling
352 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a> on it. HarfBuzz assumes size is always set
353 and will access `size` member of FT_Face unconditionally.</div>
354 <p>This is the preferred variant of the hb_ft_font_create*
355 function family, because it calls <code class="function">FT_Reference_Face()</code> on <em class="parameter"><code>ft_face</code></em>
356 ,
357 ensuring that <em class="parameter"><code>ft_face</code></em>
358  remains alive as long as the resulting
359 <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object remains alive.</p>
360 <p>Use this version unless you know you have good reasons not to.</p>
361 <div class="refsect3">
362 <a name="hb-ft-font-create-referenced.parameters"></a><h4>Parameters</h4>
363 <div class="informaltable"><table class="informaltable" width="100%" border="0">
364 <colgroup>
365 <col width="150px" class="parameters_name">
366 <col class="parameters_description">
367 <col width="200px" class="parameters_annotations">
368 </colgroup>
369 <tbody><tr>
370 <td class="parameter_name"><p>ft_face</p></td>
371 <td class="parameter_description"><p>FT_Face to work upon</p></td>
372 <td class="parameter_annotations"> </td>
373 </tr></tbody>
374 </table></div>
375 </div>
376 <div class="refsect3">
377 <a name="hb-ft-font-create-referenced.returns"></a><h4>Returns</h4>
378 <p>the new <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object. </p>
379 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
380 </div>
381 <p class="since">Since: <a class="link" href="api-index-0-9-38.html#api-index-0.9.38">0.9.38</a></p>
382 </div>
383 <hr>
384 <div class="refsect2">
385 <a name="hb-ft-font-changed"></a><h3>hb_ft_font_changed ()</h3>
386 <pre class="programlisting"><span class="returnvalue">void</span>
387 hb_ft_font_changed (<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>);</pre>
388 <p>Refreshes the state of <em class="parameter"><code>font</code></em>
389  when the underlying FT_Face has changed.
390 This function should be called after changing the size or
391 variation-axis settings on the FT_Face.</p>
392 <div class="refsect3">
393 <a name="hb-ft-font-changed.parameters"></a><h4>Parameters</h4>
394 <div class="informaltable"><table class="informaltable" width="100%" border="0">
395 <colgroup>
396 <col width="150px" class="parameters_name">
397 <col class="parameters_description">
398 <col width="200px" class="parameters_annotations">
399 </colgroup>
400 <tbody><tr>
401 <td class="parameter_name"><p>font</p></td>
402 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
403 <td class="parameter_annotations"> </td>
404 </tr></tbody>
405 </table></div>
406 </div>
407 <p class="since">Since: <a class="link" href="api-index-1-0-5.html#api-index-1.0.5">1.0.5</a></p>
408 </div>
409 <hr>
410 <div class="refsect2">
411 <a name="hb-ft-font-get-face"></a><h3>hb_ft_font_get_face ()</h3>
412 <pre class="programlisting"><span class="returnvalue">FT_Face</span>
413 hb_ft_font_get_face (<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>);</pre>
414 <p>Fetches the FT_Face associated with the specified <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a>
415 font object.</p>
416 <p>This function works with <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> objects created by
417 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a> or <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>.</p>
418 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
419 <div class="refsect3">
420 <a name="hb-ft-font-get-face.parameters"></a><h4>Parameters</h4>
421 <div class="informaltable"><table class="informaltable" width="100%" border="0">
422 <colgroup>
423 <col width="150px" class="parameters_name">
424 <col class="parameters_description">
425 <col width="200px" class="parameters_annotations">
426 </colgroup>
427 <tbody><tr>
428 <td class="parameter_name"><p>font</p></td>
429 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
430 <td class="parameter_annotations"> </td>
431 </tr></tbody>
432 </table></div>
433 </div>
434 <div class="refsect3">
435 <a name="hb-ft-font-get-face.returns"></a><h4>Returns</h4>
436 <p>the FT_Face found or <code class="literal">NULL</code>. </p>
437 <p><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></p>
438 </div>
439 <p class="since">Since: <a class="link" href="api-index-0-9-2.html#api-index-0.9.2">0.9.2</a></p>
440 </div>
441 <hr>
442 <div class="refsect2">
443 <a name="hb-ft-font-lock-face"></a><h3>hb_ft_font_lock_face ()</h3>
444 <pre class="programlisting"><span class="returnvalue">FT_Face</span>
445 hb_ft_font_lock_face (<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>);</pre>
446 <p>Gets the FT_Face associated with <em class="parameter"><code>font</code></em>
447 .</p>
448 <p>This face will be kept around and access to the FT_Face object
449 from other HarfBuzz API wil be blocked until you call <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-unlock-face" title="hb_ft_font_unlock_face ()"><code class="function">hb_ft_font_unlock_face()</code></a>.</p>
450 <p>This function works with <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> objects created by
451 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a> or <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>.</p>
452 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
453 <div class="refsect3">
454 <a name="hb-ft-font-lock-face.parameters"></a><h4>Parameters</h4>
455 <div class="informaltable"><table class="informaltable" width="100%" border="0">
456 <colgroup>
457 <col width="150px" class="parameters_name">
458 <col class="parameters_description">
459 <col width="200px" class="parameters_annotations">
460 </colgroup>
461 <tbody><tr>
462 <td class="parameter_name"><p>font</p></td>
463 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
464 <td class="parameter_annotations"> </td>
465 </tr></tbody>
466 </table></div>
467 </div>
468 <div class="refsect3">
469 <a name="hb-ft-font-lock-face.returns"></a><h4>Returns</h4>
470 <p>the FT_Face associated with <em class="parameter"><code>font</code></em>
471 or <code class="literal">NULL</code>. </p>
472 <p><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>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
473 </div>
474 <p class="since">Since: <a class="link" href="api-index-2-6-5.html#api-index-2.6.5">2.6.5</a></p>
475 </div>
476 <hr>
477 <div class="refsect2">
478 <a name="hb-ft-font-unlock-face"></a><h3>hb_ft_font_unlock_face ()</h3>
479 <pre class="programlisting"><span class="returnvalue">void</span>
480 hb_ft_font_unlock_face (<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>);</pre>
481 <p>Releases an FT_Face previously obtained with <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-lock-face" title="hb_ft_font_lock_face ()"><code class="function">hb_ft_font_lock_face()</code></a>.</p>
482 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
483 <div class="refsect3">
484 <a name="hb-ft-font-unlock-face.parameters"></a><h4>Parameters</h4>
485 <div class="informaltable"><table class="informaltable" width="100%" border="0">
486 <colgroup>
487 <col width="150px" class="parameters_name">
488 <col class="parameters_description">
489 <col width="200px" class="parameters_annotations">
490 </colgroup>
491 <tbody><tr>
492 <td class="parameter_name"><p>font</p></td>
493 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
494 <td class="parameter_annotations"> </td>
495 </tr></tbody>
496 </table></div>
497 </div>
498 <p class="since">Since: <a class="link" href="api-index-2-6-5.html#api-index-2.6.5">2.6.5</a></p>
499 </div>
500 <hr>
501 <div class="refsect2">
502 <a name="hb-ft-font-set-load-flags"></a><h3>hb_ft_font_set_load_flags ()</h3>
503 <pre class="programlisting"><span class="returnvalue">void</span>
504 hb_ft_font_set_load_flags (<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>,
505                            <em class="parameter"><code><span class="type">int</span> load_flags</code></em>);</pre>
506 <p>Sets the FT_Load_Glyph load flags for the specified <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a>.</p>
507 <p>For more information, see 
508 https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html<span class="type">ft_load_xxx</span></p>
509 <p>This function works with <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> objects created by
510 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a> or <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>.</p>
511 <div class="refsect3">
512 <a name="hb-ft-font-set-load-flags.parameters"></a><h4>Parameters</h4>
513 <div class="informaltable"><table class="informaltable" width="100%" border="0">
514 <colgroup>
515 <col width="150px" class="parameters_name">
516 <col class="parameters_description">
517 <col width="200px" class="parameters_annotations">
518 </colgroup>
519 <tbody>
520 <tr>
521 <td class="parameter_name"><p>font</p></td>
522 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
523 <td class="parameter_annotations"> </td>
524 </tr>
525 <tr>
526 <td class="parameter_name"><p>load_flags</p></td>
527 <td class="parameter_description"><p>The FreeType load flags to set</p></td>
528 <td class="parameter_annotations"> </td>
529 </tr>
530 </tbody>
531 </table></div>
532 </div>
533 <p class="since">Since: <a class="link" href="api-index-1-0-5.html#api-index-1.0.5">1.0.5</a></p>
534 </div>
535 <hr>
536 <div class="refsect2">
537 <a name="hb-ft-font-get-load-flags"></a><h3>hb_ft_font_get_load_flags ()</h3>
538 <pre class="programlisting"><span class="returnvalue">int</span>
539 hb_ft_font_get_load_flags (<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>);</pre>
540 <p>Fetches the FT_Load_Glyph load flags of the specified <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a>.</p>
541 <p>For more information, see 
542 https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html<span class="type">ft_load_xxx</span></p>
543 <p>This function works with <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> objects created by
544 <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a> or <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create-referenced" title="hb_ft_font_create_referenced ()"><code class="function">hb_ft_font_create_referenced()</code></a>.</p>
545 <div class="refsect3">
546 <a name="hb-ft-font-get-load-flags.parameters"></a><h4>Parameters</h4>
547 <div class="informaltable"><table class="informaltable" width="100%" border="0">
548 <colgroup>
549 <col width="150px" class="parameters_name">
550 <col class="parameters_description">
551 <col width="200px" class="parameters_annotations">
552 </colgroup>
553 <tbody><tr>
554 <td class="parameter_name"><p>font</p></td>
555 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
556 <td class="parameter_annotations"> </td>
557 </tr></tbody>
558 </table></div>
559 </div>
560 <div class="refsect3">
561 <a name="hb-ft-font-get-load-flags.returns"></a><h4>Returns</h4>
562 <p> FT_Load_Glyph flags found, or 0</p>
563 </div>
564 <p class="since">Since: <a class="link" href="api-index-1-0-5.html#api-index-1.0.5">1.0.5</a></p>
565 </div>
566 <hr>
567 <div class="refsect2">
568 <a name="hb-ft-font-set-funcs"></a><h3>hb_ft_font_set_funcs ()</h3>
569 <pre class="programlisting"><span class="returnvalue">void</span>
570 hb_ft_font_set_funcs (<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>);</pre>
571 <p>Configures the font-functions structure of the specified
572 <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> font object to use FreeType font functions.</p>
573 <p>In particular, you can use this function to configure an
574 existing <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object for use with FreeType font
575 functions even if that <a class="link" href="harfbuzz-hb-face.html#hb-face-t" title="hb_face_t"><span class="type">hb_face_t</span></a> face object was initially
576 created with <a class="link" href="harfbuzz-hb-face.html#hb-face-create" title="hb_face_create ()"><code class="function">hb_face_create()</code></a>, and therefore was not
577 initially configured to use FreeType font functions.</p>
578 <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> object created with <a class="link" href="harfbuzz-hb-ft.html#hb-ft-font-create" title="hb_ft_font_create ()"><code class="function">hb_ft_font_create()</code></a>
579 is preconfigured for FreeType font functions and does not
580 require this function to be used.</p>
581 <p>Note that if you modify the underlying <a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> after
582 calling this function, you need to call <a class="link" href="harfbuzz-hb-ft.html#hb-ft-hb-font-changed" title="hb_ft_hb_font_changed ()"><code class="function">hb_ft_hb_font_changed()</code></a>
583 to update the underlying FT_Face.</p>
584 <div class="note">Note: Internally, this function creates an FT_Face.
585 </div>
586 <div class="refsect3">
587 <a name="hb-ft-font-set-funcs.parameters"></a><h4>Parameters</h4>
588 <div class="informaltable"><table class="informaltable" width="100%" border="0">
589 <colgroup>
590 <col width="150px" class="parameters_name">
591 <col class="parameters_description">
592 <col width="200px" class="parameters_annotations">
593 </colgroup>
594 <tbody><tr>
595 <td class="parameter_name"><p>font</p></td>
596 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
597 <td class="parameter_annotations"> </td>
598 </tr></tbody>
599 </table></div>
600 </div>
601 <p class="since">Since: <a class="link" href="api-index-1-0-5.html#api-index-1.0.5">1.0.5</a></p>
602 </div>
603 <hr>
604 <div class="refsect2">
605 <a name="hb-ft-hb-font-changed"></a><h3>hb_ft_hb_font_changed ()</h3>
606 <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>
607 hb_ft_hb_font_changed (<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>);</pre>
608 <p>Refreshes the state of the underlying FT_Face of <em class="parameter"><code>font</code></em>
609  when the hb_font_t
610 <em class="parameter"><code>font</code></em>
611  has changed.
612 This function should be called after changing the size or
613 variation-axis settings on the <em class="parameter"><code>font</code></em>
614 .
615 This call is fast if nothing has changed on <em class="parameter"><code>font</code></em>
616 .</p>
617 <div class="refsect3">
618 <a name="hb-ft-hb-font-changed.parameters"></a><h4>Parameters</h4>
619 <div class="informaltable"><table class="informaltable" width="100%" border="0">
620 <colgroup>
621 <col width="150px" class="parameters_name">
622 <col class="parameters_description">
623 <col width="200px" class="parameters_annotations">
624 </colgroup>
625 <tbody><tr>
626 <td class="parameter_name"><p>font</p></td>
627 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t" title="hb_font_t"><span class="type">hb_font_t</span></a> to work upon</p></td>
628 <td class="parameter_annotations"> </td>
629 </tr></tbody>
630 </table></div>
631 </div>
632 <div class="refsect3">
633 <a name="hb-ft-hb-font-changed.returns"></a><h4>Returns</h4>
634 <p> true if changed, false otherwise</p>
635 </div>
636 <p class="since">Since: <a class="link" href="api-index-4-4-0.html#api-index-4.4.0">4.4.0</a></p>
637 </div>
638 </div>
639 </div>
640 <div class="footer">
641 <hr>Generated by GTK-Doc V1.32</div>
642 </body>
643 </html>