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-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">
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>
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>
25 <div class="refentry">
26 <a name="harfbuzz-hb-ft"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
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>
32 <td class="gallery_image" valign="top" align="right"></td>
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">
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-face.html#hb-face-t" title="hb_face_t"><span class="returnvalue">hb_face_t</span></a> *
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>
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> *
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>
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> *
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>
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> *
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>
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> *
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>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
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>
91 <td class="function_type">
92 <span class="returnvalue">FT_Face</span>
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>
99 <td class="function_type">
100 <span class="returnvalue">FT_Face</span>
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>
107 <td class="function_type">
108 <span class="returnvalue">void</span>
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>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
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>
123 <td class="function_type">
124 <span class="returnvalue">int</span>
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>
131 <td class="function_type">
132 <span class="returnvalue">void</span>
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>
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>
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>
149 <div class="refsect1">
150 <a name="harfbuzz-hb-ft.includes"></a><h2>Includes</h2>
151 <pre class="synopsis">#include <hb-ft.h>
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
159 <div class="note">Note that FreeType is not thread-safe, therefore these
160 functions are not thread-safe either.</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>
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">
184 <col width="150px" class="parameters_name">
185 <col class="parameters_description">
186 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
233 <col width="150px" class="parameters_name">
234 <col class="parameters_description">
235 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
272 <col width="150px" class="parameters_name">
273 <col class="parameters_description">
274 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
311 is provided, it is the client program's responsibility to destroy <em class="parameter"><code>ft_face</code></em>
313 and it is the client program's responsibility to ensure that <em class="parameter"><code>ft_face</code></em>
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">
320 <col width="150px" class="parameters_name">
321 <col class="parameters_description">
322 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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">
365 <col width="150px" class="parameters_name">
366 <col class="parameters_description">
367 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
396 <col width="150px" class="parameters_name">
397 <col class="parameters_description">
398 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
423 <col width="150px" class="parameters_name">
424 <col class="parameters_description">
425 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
457 <col width="150px" class="parameters_name">
458 <col class="parameters_description">
459 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
487 <col width="150px" class="parameters_name">
488 <col class="parameters_description">
489 <col width="200px" class="parameters_annotations">
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>
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>
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">
515 <col width="150px" class="parameters_name">
516 <col class="parameters_description">
517 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
549 <col width="150px" class="parameters_name">
550 <col class="parameters_description">
551 <col width="200px" class="parameters_annotations">
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>
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>
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>
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.
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">
590 <col width="150px" class="parameters_name">
591 <col class="parameters_description">
592 <col width="200px" class="parameters_annotations">
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>
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>
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>
610 <em class="parameter"><code>font</code></em>
612 This function should be called after changing the size or
613 variation-axis settings on the <em class="parameter"><code>font</code></em>
615 This call is fast if nothing has changed on <em class="parameter"><code>font</code></em>
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">
621 <col width="150px" class="parameters_name">
622 <col class="parameters_description">
623 <col width="200px" class="parameters_annotations">
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>
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>
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>
641 <hr>Generated by GTK-Doc V1.32</div>