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