Imported Upstream version 2.4.0
[platform/upstream/harfbuzz.git] / docs / html / harfbuzz-hb-ot-color.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-ot-color: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="ch10.html" title="OpenType API">
9 <link rel="prev" href="ch10.html" title="OpenType API">
10 <link rel="next" href="harfbuzz-hb-ot-font.html" title="hb-ot-font">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#harfbuzz-hb-ot-color.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="ch10.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="ch10.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="harfbuzz-hb-ot-font.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-ot-color"></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-ot-color.top_of_page"></a>hb-ot-color</span></h2>
30 <p>hb-ot-color — OpenType Color Fonts</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-ot-color.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="define_keyword">#define</td>
44 <td class="function_name">
45 <a class="link" href="harfbuzz-hb-ot-color.html#HB-COLOR:CAPS" title="HB_COLOR()">HB_COLOR</a><span class="c_punctuation">()</span>
46 </td>
47 </tr>
48 <tr>
49 <td class="define_keyword">#define</td>
50 <td class="function_name">
51 <a class="link" href="harfbuzz-hb-ot-color.html#hb-color-get-alpha" title="hb_color_get_alpha()">hb_color_get_alpha</a><span class="c_punctuation">()</span>
52 </td>
53 </tr>
54 <tr>
55 <td class="define_keyword">#define</td>
56 <td class="function_name">
57 <a class="link" href="harfbuzz-hb-ot-color.html#hb-color-get-blue" title="hb_color_get_blue()">hb_color_get_blue</a><span class="c_punctuation">()</span>
58 </td>
59 </tr>
60 <tr>
61 <td class="define_keyword">#define</td>
62 <td class="function_name">
63 <a class="link" href="harfbuzz-hb-ot-color.html#hb-color-get-green" title="hb_color_get_green()">hb_color_get_green</a><span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="define_keyword">#define</td>
68 <td class="function_name">
69 <a class="link" href="harfbuzz-hb-ot-color.html#hb-color-get-red" title="hb_color_get_red()">hb_color_get_red</a><span class="c_punctuation">()</span>
70 </td>
71 </tr>
72 <tr>
73 <td class="function_type">unsigned <span class="returnvalue">int</span>
74 </td>
75 <td class="function_name">
76 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-glyph-get-layers" title="hb_ot_color_glyph_get_layers ()">hb_ot_color_glyph_get_layers</a> <span class="c_punctuation">()</span>
77 </td>
78 </tr>
79 <tr>
80 <td class="function_type">
81 <a class="link" href="harfbuzz-hb-blob.html#hb-blob-t" title="hb_blob_t"><span class="returnvalue">hb_blob_t</span></a> *
82 </td>
83 <td class="function_name">
84 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-glyph-reference-png" title="hb_ot_color_glyph_reference_png ()">hb_ot_color_glyph_reference_png</a> <span class="c_punctuation">()</span>
85 </td>
86 </tr>
87 <tr>
88 <td class="function_type">
89 <a class="link" href="harfbuzz-hb-blob.html#hb-blob-t" title="hb_blob_t"><span class="returnvalue">hb_blob_t</span></a> *
90 </td>
91 <td class="function_name">
92 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-glyph-reference-svg" title="hb_ot_color_glyph_reference_svg ()">hb_ot_color_glyph_reference_svg</a> <span class="c_punctuation">()</span>
93 </td>
94 </tr>
95 <tr>
96 <td class="function_type">
97 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
98 </td>
99 <td class="function_name">
100 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-has-layers" title="hb_ot_color_has_layers ()">hb_ot_color_has_layers</a> <span class="c_punctuation">()</span>
101 </td>
102 </tr>
103 <tr>
104 <td class="function_type">
105 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
106 </td>
107 <td class="function_name">
108 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-has-palettes" title="hb_ot_color_has_palettes ()">hb_ot_color_has_palettes</a> <span class="c_punctuation">()</span>
109 </td>
110 </tr>
111 <tr>
112 <td class="function_type">
113 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
114 </td>
115 <td class="function_name">
116 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-has-png" title="hb_ot_color_has_png ()">hb_ot_color_has_png</a> <span class="c_punctuation">()</span>
117 </td>
118 </tr>
119 <tr>
120 <td class="function_type">
121 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
122 </td>
123 <td class="function_name">
124 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-has-svg" title="hb_ot_color_has_svg ()">hb_ot_color_has_svg</a> <span class="c_punctuation">()</span>
125 </td>
126 </tr>
127 <tr>
128 <td class="function_type">
129 <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="returnvalue">hb_ot_name_id_t</span></a>
130 </td>
131 <td class="function_name">
132 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-color-get-name-id" title="hb_ot_color_palette_color_get_name_id ()">hb_ot_color_palette_color_get_name_id</a> <span class="c_punctuation">()</span>
133 </td>
134 </tr>
135 <tr>
136 <td class="function_type">unsigned <span class="returnvalue">int</span>
137 </td>
138 <td class="function_name">
139 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-colors" title="hb_ot_color_palette_get_colors ()">hb_ot_color_palette_get_colors</a> <span class="c_punctuation">()</span>
140 </td>
141 </tr>
142 <tr>
143 <td class="function_type">unsigned <span class="returnvalue">int</span>
144 </td>
145 <td class="function_name">
146 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-count" title="hb_ot_color_palette_get_count ()">hb_ot_color_palette_get_count</a> <span class="c_punctuation">()</span>
147 </td>
148 </tr>
149 <tr>
150 <td class="function_type">
151 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-flags-t" title="enum hb_ot_color_palette_flags_t"><span class="returnvalue">hb_ot_color_palette_flags_t</span></a>
152 </td>
153 <td class="function_name">
154 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-flags" title="hb_ot_color_palette_get_flags ()">hb_ot_color_palette_get_flags</a> <span class="c_punctuation">()</span>
155 </td>
156 </tr>
157 <tr>
158 <td class="function_type">
159 <a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="returnvalue">hb_ot_name_id_t</span></a>
160 </td>
161 <td class="function_name">
162 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-name-id" title="hb_ot_color_palette_get_name_id ()">hb_ot_color_palette_get_name_id</a> <span class="c_punctuation">()</span>
163 </td>
164 </tr>
165 </tbody>
166 </table></div>
167 </div>
168 <div class="refsect1">
169 <a name="harfbuzz-hb-ot-color.other"></a><h2>Types and Values</h2>
170 <div class="informaltable"><table class="informaltable" width="100%" border="0">
171 <colgroup>
172 <col width="150px" class="name">
173 <col class="description">
174 </colgroup>
175 <tbody>
176 <tr>
177 <td class="typedef_keyword">typedef</td>
178 <td class="function_name"><a class="link" href="harfbuzz-hb-ot-color.html#hb-color-t" title="hb_color_t">hb_color_t</a></td>
179 </tr>
180 <tr>
181 <td class="datatype_keyword">enum</td>
182 <td class="function_name"><a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-flags-t" title="enum hb_ot_color_palette_flags_t">hb_ot_color_palette_flags_t</a></td>
183 </tr>
184 </tbody>
185 </table></div>
186 </div>
187 <div class="refsect1">
188 <a name="harfbuzz-hb-ot-color.includes"></a><h2>Includes</h2>
189 <pre class="synopsis">#include &lt;hb-ot.h&gt;
190 </pre>
191 </div>
192 <div class="refsect1">
193 <a name="harfbuzz-hb-ot-color.description"></a><h2>Description</h2>
194 <p>Functions for fetching color-font information from OpenType font faces.</p>
195 </div>
196 <div class="refsect1">
197 <a name="harfbuzz-hb-ot-color.functions_details"></a><h2>Functions</h2>
198 <div class="refsect2">
199 <a name="HB-COLOR:CAPS"></a><h3>HB_COLOR()</h3>
200 <pre class="programlisting">#define HB_COLOR(b,g,r,a) ((hb_color_t) HB_TAG ((b),(g),(r),(a)))
201 </pre>
202 </div>
203 <hr>
204 <div class="refsect2">
205 <a name="hb-color-get-alpha"></a><h3>hb_color_get_alpha()</h3>
206 <pre class="programlisting">#define hb_color_get_alpha(color) ((color) &amp; 0xFF)
207 </pre>
208 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
209 </div>
210 <hr>
211 <div class="refsect2">
212 <a name="hb-color-get-blue"></a><h3>hb_color_get_blue()</h3>
213 <pre class="programlisting">#define hb_color_get_blue(color) (((color) &gt;&gt; 24) &amp; 0xFF)
214 </pre>
215 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
216 </div>
217 <hr>
218 <div class="refsect2">
219 <a name="hb-color-get-green"></a><h3>hb_color_get_green()</h3>
220 <pre class="programlisting">#define hb_color_get_green(color) (((color) &gt;&gt; 16) &amp; 0xFF)
221 </pre>
222 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
223 </div>
224 <hr>
225 <div class="refsect2">
226 <a name="hb-color-get-red"></a><h3>hb_color_get_red()</h3>
227 <pre class="programlisting">#define hb_color_get_red(color)             (((color) &gt;&gt; 8) &amp; 0xFF)
228 </pre>
229 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
230 </div>
231 <hr>
232 <div class="refsect2">
233 <a name="hb-ot-color-glyph-get-layers"></a><h3>hb_ot_color_glyph_get_layers ()</h3>
234 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
235 hb_ot_color_glyph_get_layers (<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>,
236                               <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> glyph</code></em>,
237                               <em class="parameter"><code>unsigned <span class="type">int</span> start_offset</code></em>,
238                               <em class="parameter"><code>unsigned <span class="type">int</span> *count</code></em>,
239                               <em class="parameter"><code><span class="type">hb_ot_color_layer_t</span> *layers</code></em>);</pre>
240 <div class="refsect3">
241 <a name="hb-ot-color-glyph-get-layers.parameters"></a><h4>Parameters</h4>
242 <div class="informaltable"><table class="informaltable" width="100%" border="0">
243 <colgroup>
244 <col width="150px" class="parameters_name">
245 <col class="parameters_description">
246 <col width="200px" class="parameters_annotations">
247 </colgroup>
248 <tbody>
249 <tr>
250 <td class="parameter_name"><p>face</p></td>
251 <td class="parameter_description"><p>a font face.</p></td>
252 <td class="parameter_annotations"> </td>
253 </tr>
254 <tr>
255 <td class="parameter_name"><p>glyph</p></td>
256 <td class="parameter_description"><p>a layered color glyph id.</p></td>
257 <td class="parameter_annotations"> </td>
258 </tr>
259 <tr>
260 <td class="parameter_name"><p>start_offset</p></td>
261 <td class="parameter_description"><p>starting offset of layers.</p></td>
262 <td class="parameter_annotations"> </td>
263 </tr>
264 <tr>
265 <td class="parameter_name"><p>count</p></td>
266 <td class="parameter_description"><p>gets number of layers available to be written on buffer
267 and returns number of written layers. </p></td>
268 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
269 </tr>
270 <tr>
271 <td class="parameter_name"><p>layers</p></td>
272 <td class="parameter_description"><p>layers buffer to buffer. </p></td>
273 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
274 </tr>
275 </tbody>
276 </table></div>
277 </div>
278 <div class="refsect3">
279 <a name="hb-ot-color-glyph-get-layers.returns"></a><h4>Returns</h4>
280 <p> Total number of layers a layered color glyph have.</p>
281 </div>
282 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
283 </div>
284 <hr>
285 <div class="refsect2">
286 <a name="hb-ot-color-glyph-reference-png"></a><h3>hb_ot_color_glyph_reference_png ()</h3>
287 <pre class="programlisting"><a class="link" href="harfbuzz-hb-blob.html#hb-blob-t" title="hb_blob_t"><span class="returnvalue">hb_blob_t</span></a> *
288 hb_ot_color_glyph_reference_png (<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>,
289                                  <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> glyph</code></em>);</pre>
290 <p>Get PNG image for a glyph.</p>
291 <div class="refsect3">
292 <a name="hb-ot-color-glyph-reference-png.parameters"></a><h4>Parameters</h4>
293 <div class="informaltable"><table class="informaltable" width="100%" border="0">
294 <colgroup>
295 <col width="150px" class="parameters_name">
296 <col class="parameters_description">
297 <col width="200px" class="parameters_annotations">
298 </colgroup>
299 <tbody>
300 <tr>
301 <td class="parameter_name"><p>font</p></td>
302 <td class="parameter_description"><p>a font object, not face. upem should be set on
303 that font object if one wants to get optimal png blob, otherwise
304 return the biggest one</p></td>
305 <td class="parameter_annotations"> </td>
306 </tr>
307 <tr>
308 <td class="parameter_name"><p>glyph</p></td>
309 <td class="parameter_description"><p>a glyph index.</p></td>
310 <td class="parameter_annotations"> </td>
311 </tr>
312 </tbody>
313 </table></div>
314 </div>
315 <div class="refsect3">
316 <a name="hb-ot-color-glyph-reference-png.returns"></a><h4>Returns</h4>
317 <p>respective PNG blob of the glyph, if available. </p>
318 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
319 </div>
320 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
321 </div>
322 <hr>
323 <div class="refsect2">
324 <a name="hb-ot-color-glyph-reference-svg"></a><h3>hb_ot_color_glyph_reference_svg ()</h3>
325 <pre class="programlisting"><a class="link" href="harfbuzz-hb-blob.html#hb-blob-t" title="hb_blob_t"><span class="returnvalue">hb_blob_t</span></a> *
326 hb_ot_color_glyph_reference_svg (<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>,
327                                  <em class="parameter"><code><a class="link" href="harfbuzz-hb-common.html#hb-codepoint-t" title="hb_codepoint_t"><span class="type">hb_codepoint_t</span></a> glyph</code></em>);</pre>
328 <p>Get SVG document for a glyph. The blob may be either plain text or gzip-encoded.</p>
329 <div class="refsect3">
330 <a name="hb-ot-color-glyph-reference-svg.parameters"></a><h4>Parameters</h4>
331 <div class="informaltable"><table class="informaltable" width="100%" border="0">
332 <colgroup>
333 <col width="150px" class="parameters_name">
334 <col class="parameters_description">
335 <col width="200px" class="parameters_annotations">
336 </colgroup>
337 <tbody>
338 <tr>
339 <td class="parameter_name"><p>face</p></td>
340 <td class="parameter_description"><p>a font face.</p></td>
341 <td class="parameter_annotations"> </td>
342 </tr>
343 <tr>
344 <td class="parameter_name"><p>glyph</p></td>
345 <td class="parameter_description"><p>a svg glyph index.</p></td>
346 <td class="parameter_annotations"> </td>
347 </tr>
348 </tbody>
349 </table></div>
350 </div>
351 <div class="refsect3">
352 <a name="hb-ot-color-glyph-reference-svg.returns"></a><h4>Returns</h4>
353 <p>respective svg blob of the glyph, if available. </p>
354 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
355 </div>
356 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
357 </div>
358 <hr>
359 <div class="refsect2">
360 <a name="hb-ot-color-has-layers"></a><h3>hb_ot_color_has_layers ()</h3>
361 <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>
362 hb_ot_color_has_layers (<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>);</pre>
363 <div class="refsect3">
364 <a name="hb-ot-color-has-layers.parameters"></a><h4>Parameters</h4>
365 <div class="informaltable"><table class="informaltable" width="100%" border="0">
366 <colgroup>
367 <col width="150px" class="parameters_name">
368 <col class="parameters_description">
369 <col width="200px" class="parameters_annotations">
370 </colgroup>
371 <tbody><tr>
372 <td class="parameter_name"><p>face</p></td>
373 <td class="parameter_description"><p>a font face.</p></td>
374 <td class="parameter_annotations"> </td>
375 </tr></tbody>
376 </table></div>
377 </div>
378 <div class="refsect3">
379 <a name="hb-ot-color-has-layers.returns"></a><h4>Returns</h4>
380 <p> whether COLR table is available.</p>
381 </div>
382 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
383 </div>
384 <hr>
385 <div class="refsect2">
386 <a name="hb-ot-color-has-palettes"></a><h3>hb_ot_color_has_palettes ()</h3>
387 <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>
388 hb_ot_color_has_palettes (<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>);</pre>
389 <div class="refsect3">
390 <a name="hb-ot-color-has-palettes.parameters"></a><h4>Parameters</h4>
391 <div class="informaltable"><table class="informaltable" width="100%" border="0">
392 <colgroup>
393 <col width="150px" class="parameters_name">
394 <col class="parameters_description">
395 <col width="200px" class="parameters_annotations">
396 </colgroup>
397 <tbody><tr>
398 <td class="parameter_name"><p>face</p></td>
399 <td class="parameter_description"><p>a font face.</p></td>
400 <td class="parameter_annotations"> </td>
401 </tr></tbody>
402 </table></div>
403 </div>
404 <div class="refsect3">
405 <a name="hb-ot-color-has-palettes.returns"></a><h4>Returns</h4>
406 <p> whether CPAL table is available.</p>
407 </div>
408 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
409 </div>
410 <hr>
411 <div class="refsect2">
412 <a name="hb-ot-color-has-png"></a><h3>hb_ot_color_has_png ()</h3>
413 <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>
414 hb_ot_color_has_png (<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>);</pre>
415 <p>Check whether <em class="parameter"><code>face</code></em>
416  has PNG glyph images (either CBDT or sbix tables).</p>
417 <p>Returns true if available, false otherwise.</p>
418 <div class="refsect3">
419 <a name="hb-ot-color-has-png.parameters"></a><h4>Parameters</h4>
420 <div class="informaltable"><table class="informaltable" width="100%" border="0">
421 <colgroup>
422 <col width="150px" class="parameters_name">
423 <col class="parameters_description">
424 <col width="200px" class="parameters_annotations">
425 </colgroup>
426 <tbody><tr>
427 <td class="parameter_name"><p>face</p></td>
428 <td class="parameter_description"><p>a font face.</p></td>
429 <td class="parameter_annotations"> </td>
430 </tr></tbody>
431 </table></div>
432 </div>
433 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
434 </div>
435 <hr>
436 <div class="refsect2">
437 <a name="hb-ot-color-has-svg"></a><h3>hb_ot_color_has_svg ()</h3>
438 <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>
439 hb_ot_color_has_svg (<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>);</pre>
440 <p>Check whether <em class="parameter"><code>face</code></em>
441  has SVG glyph images.</p>
442 <p>Returns true if available, false otherwise.</p>
443 <div class="refsect3">
444 <a name="hb-ot-color-has-svg.parameters"></a><h4>Parameters</h4>
445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
446 <colgroup>
447 <col width="150px" class="parameters_name">
448 <col class="parameters_description">
449 <col width="200px" class="parameters_annotations">
450 </colgroup>
451 <tbody><tr>
452 <td class="parameter_name"><p>face</p></td>
453 <td class="parameter_description"><p>a font face.</p></td>
454 <td class="parameter_annotations"> </td>
455 </tr></tbody>
456 </table></div>
457 </div>
458 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
459 </div>
460 <hr>
461 <div class="refsect2">
462 <a name="hb-ot-color-palette-color-get-name-id"></a><h3>hb_ot_color_palette_color_get_name_id ()</h3>
463 <pre class="programlisting"><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="returnvalue">hb_ot_name_id_t</span></a>
464 hb_ot_color_palette_color_get_name_id (<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>,
465                                        <em class="parameter"><code>unsigned <span class="type">int</span> color_index</code></em>);</pre>
466 <div class="refsect3">
467 <a name="hb-ot-color-palette-color-get-name-id.parameters"></a><h4>Parameters</h4>
468 <div class="informaltable"><table class="informaltable" width="100%" border="0">
469 <colgroup>
470 <col width="150px" class="parameters_name">
471 <col class="parameters_description">
472 <col width="200px" class="parameters_annotations">
473 </colgroup>
474 <tbody>
475 <tr>
476 <td class="parameter_name"><p>face</p></td>
477 <td class="parameter_description"><p>a font face.</p></td>
478 <td class="parameter_annotations"> </td>
479 </tr>
480 <tr>
481 <td class="parameter_name"><p>color_index</p></td>
482 <td class="parameter_description"><p>palette entry index.</p></td>
483 <td class="parameter_annotations"> </td>
484 </tr>
485 </tbody>
486 </table></div>
487 </div>
488 <div class="refsect3">
489 <a name="hb-ot-color-palette-color-get-name-id.returns"></a><h4>Returns</h4>
490 <p> Name ID associated with a palette entry, e.g. eye color</p>
491 </div>
492 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
493 </div>
494 <hr>
495 <div class="refsect2">
496 <a name="hb-ot-color-palette-get-colors"></a><h3>hb_ot_color_palette_get_colors ()</h3>
497 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
498 hb_ot_color_palette_get_colors (<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>,
499                                 <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>,
500                                 <em class="parameter"><code>unsigned <span class="type">int</span> start_offset</code></em>,
501                                 <em class="parameter"><code>unsigned <span class="type">int</span> *color_count</code></em>,
502                                 <em class="parameter"><code><a class="link" href="harfbuzz-hb-ot-color.html#hb-color-t" title="hb_color_t"><span class="type">hb_color_t</span></a> *colors</code></em>);</pre>
503 <p>Retrieves the colors in a color palette.</p>
504 <div class="refsect3">
505 <a name="hb-ot-color-palette-get-colors.parameters"></a><h4>Parameters</h4>
506 <div class="informaltable"><table class="informaltable" width="100%" border="0">
507 <colgroup>
508 <col width="150px" class="parameters_name">
509 <col class="parameters_description">
510 <col width="200px" class="parameters_annotations">
511 </colgroup>
512 <tbody>
513 <tr>
514 <td class="parameter_name"><p>face</p></td>
515 <td class="parameter_description"><p>a font face.</p></td>
516 <td class="parameter_annotations"> </td>
517 </tr>
518 <tr>
519 <td class="parameter_name"><p>palette_index</p></td>
520 <td class="parameter_description"><p>the index of the color palette whose colors
521 are being requested.</p></td>
522 <td class="parameter_annotations"> </td>
523 </tr>
524 <tr>
525 <td class="parameter_name"><p>start_offset</p></td>
526 <td class="parameter_description"><p>the index of the first color being requested.</p></td>
527 <td class="parameter_annotations"> </td>
528 </tr>
529 <tr>
530 <td class="parameter_name"><p>color_count</p></td>
531 <td class="parameter_description"><p>on input, how many colors
532 can be maximally stored into the <em class="parameter"><code>colors</code></em>
533 array;
534 on output, how many colors were actually stored. </p></td>
535 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
536 </tr>
537 <tr>
538 <td class="parameter_name"><p>colors</p></td>
539 <td class="parameter_description"><p>an array of <a class="link" href="harfbuzz-hb-ot-color.html#hb-color-t" title="hb_color_t"><span class="type">hb_color_t</span></a> records. After calling
540 this function, <em class="parameter"><code>colors</code></em>
541 will be filled with
542 the palette colors. If <em class="parameter"><code>colors</code></em>
543 is NULL, the function
544 will just return the number of total colors
545 without storing any actual colors; this can be used
546 for allocating a buffer of suitable size before calling
547 <a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-get-colors" title="hb_ot_color_palette_get_colors ()"><code class="function">hb_ot_color_palette_get_colors()</code></a> a second time. </p></td>
548 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=color_count][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
549 </tr>
550 </tbody>
551 </table></div>
552 </div>
553 <div class="refsect3">
554 <a name="hb-ot-color-palette-get-colors.returns"></a><h4>Returns</h4>
555 <p> the total number of colors in the palette.</p>
556 </div>
557 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
558 </div>
559 <hr>
560 <div class="refsect2">
561 <a name="hb-ot-color-palette-get-count"></a><h3>hb_ot_color_palette_get_count ()</h3>
562 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
563 hb_ot_color_palette_get_count (<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>);</pre>
564 <div class="refsect3">
565 <a name="hb-ot-color-palette-get-count.parameters"></a><h4>Parameters</h4>
566 <div class="informaltable"><table class="informaltable" width="100%" border="0">
567 <colgroup>
568 <col width="150px" class="parameters_name">
569 <col class="parameters_description">
570 <col width="200px" class="parameters_annotations">
571 </colgroup>
572 <tbody><tr>
573 <td class="parameter_name"><p>face</p></td>
574 <td class="parameter_description"><p>a font face.</p></td>
575 <td class="parameter_annotations"> </td>
576 </tr></tbody>
577 </table></div>
578 </div>
579 <div class="refsect3">
580 <a name="hb-ot-color-palette-get-count.returns"></a><h4>Returns</h4>
581 <p> the number of color palettes in <em class="parameter"><code>face</code></em>
582 , or zero if <em class="parameter"><code>face</code></em>
583 has
584 no colors.</p>
585 </div>
586 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
587 </div>
588 <hr>
589 <div class="refsect2">
590 <a name="hb-ot-color-palette-get-flags"></a><h3>hb_ot_color_palette_get_flags ()</h3>
591 <pre class="programlisting"><a class="link" href="harfbuzz-hb-ot-color.html#hb-ot-color-palette-flags-t" title="enum hb_ot_color_palette_flags_t"><span class="returnvalue">hb_ot_color_palette_flags_t</span></a>
592 hb_ot_color_palette_get_flags (<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>,
593                                <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>);</pre>
594 <div class="refsect3">
595 <a name="hb-ot-color-palette-get-flags.parameters"></a><h4>Parameters</h4>
596 <div class="informaltable"><table class="informaltable" width="100%" border="0">
597 <colgroup>
598 <col width="150px" class="parameters_name">
599 <col class="parameters_description">
600 <col width="200px" class="parameters_annotations">
601 </colgroup>
602 <tbody>
603 <tr>
604 <td class="parameter_name"><p>face</p></td>
605 <td class="parameter_description"><p>a font face</p></td>
606 <td class="parameter_annotations"> </td>
607 </tr>
608 <tr>
609 <td class="parameter_name"><p>palette_index</p></td>
610 <td class="parameter_description"><p>the index of the color palette whose flags are being requested</p></td>
611 <td class="parameter_annotations"> </td>
612 </tr>
613 </tbody>
614 </table></div>
615 </div>
616 <div class="refsect3">
617 <a name="hb-ot-color-palette-get-flags.returns"></a><h4>Returns</h4>
618 <p> the flags for the requested color palette.</p>
619 </div>
620 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
621 </div>
622 <hr>
623 <div class="refsect2">
624 <a name="hb-ot-color-palette-get-name-id"></a><h3>hb_ot_color_palette_get_name_id ()</h3>
625 <pre class="programlisting"><a class="link" href="harfbuzz-hb-ot-name.html#hb-ot-name-id-t" title="hb_ot_name_id_t"><span class="returnvalue">hb_ot_name_id_t</span></a>
626 hb_ot_color_palette_get_name_id (<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>,
627                                  <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>);</pre>
628 <p>Retrieves the name id of a color palette. For example, a color font can
629 have themed palettes like "Spring", "Summer", "Fall", and "Winter".</p>
630 <div class="refsect3">
631 <a name="hb-ot-color-palette-get-name-id.parameters"></a><h4>Parameters</h4>
632 <div class="informaltable"><table class="informaltable" width="100%" border="0">
633 <colgroup>
634 <col width="150px" class="parameters_name">
635 <col class="parameters_description">
636 <col width="200px" class="parameters_annotations">
637 </colgroup>
638 <tbody>
639 <tr>
640 <td class="parameter_name"><p>face</p></td>
641 <td class="parameter_description"><p>a font face.</p></td>
642 <td class="parameter_annotations"> </td>
643 </tr>
644 <tr>
645 <td class="parameter_name"><p>palette_index</p></td>
646 <td class="parameter_description"><p>the index of the color palette whose name is being requested.</p></td>
647 <td class="parameter_annotations"> </td>
648 </tr>
649 </tbody>
650 </table></div>
651 </div>
652 <div class="refsect3">
653 <a name="hb-ot-color-palette-get-name-id.returns"></a><h4>Returns</h4>
654 <p> an identifier within <em class="parameter"><code>face</code></em>
655 's <code class="literal">name</code> table.
656 If the requested palette has no name the result is <span class="type">HB_OT_NAME_ID_INVALID</span>.</p>
657 </div>
658 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
659 </div>
660 </div>
661 <div class="refsect1">
662 <a name="harfbuzz-hb-ot-color.other_details"></a><h2>Types and Values</h2>
663 <div class="refsect2">
664 <a name="hb-color-t"></a><h3>hb_color_t</h3>
665 <pre class="programlisting">typedef uint32_t hb_color_t;
666 </pre>
667 <p>Data type for holding color values.</p>
668 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
669 </div>
670 <hr>
671 <div class="refsect2">
672 <a name="hb-ot-color-palette-flags-t"></a><h3>enum hb_ot_color_palette_flags_t</h3>
673 <div class="refsect3">
674 <a name="hb-ot-color-palette-flags-t.members"></a><h4>Members</h4>
675 <div class="informaltable"><table class="informaltable" width="100%" border="0">
676 <colgroup>
677 <col width="300px" class="enum_members_name">
678 <col class="enum_members_description">
679 <col width="200px" class="enum_members_annotations">
680 </colgroup>
681 <tbody>
682 <tr>
683 <td class="enum_member_name"><p><a name="HB-OT-COLOR-PALETTE-FLAG-DEFAULT:CAPS"></a>HB_OT_COLOR_PALETTE_FLAG_DEFAULT</p></td>
684 <td class="enum_member_description">
685 <p>default indicating that there is nothing special
686   to note about a color palette.</p>
687 </td>
688 <td class="enum_member_annotations"> </td>
689 </tr>
690 <tr>
691 <td class="enum_member_name"><p><a name="HB-OT-COLOR-PALETTE-FLAG-USABLE-WITH-LIGHT-BACKGROUND:CAPS"></a>HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND</p></td>
692 <td class="enum_member_description">
693 <p>flag indicating that the color
694   palette is appropriate to use when displaying the font on a light background such as white.</p>
695 </td>
696 <td class="enum_member_annotations"> </td>
697 </tr>
698 <tr>
699 <td class="enum_member_name"><p><a name="HB-OT-COLOR-PALETTE-FLAG-USABLE-WITH-DARK-BACKGROUND:CAPS"></a>HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND</p></td>
700 <td class="enum_member_description">
701 <p>flag indicating that the color
702   palette is appropriate to use when displaying the font on a dark background such as black.</p>
703 </td>
704 <td class="enum_member_annotations"> </td>
705 </tr>
706 </tbody>
707 </table></div>
708 </div>
709 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
710 </div>
711 </div>
712 </div>
713 <div class="footer">
714 <hr>Generated by GTK-Doc V1.29</div>
715 </body>
716 </html>