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-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">
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>
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>
26 <div class="refentry">
27 <a name="harfbuzz-hb-ot-color"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
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>
33 <td class="gallery_image" valign="top" align="right"></td>
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">
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
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>
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>
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>
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>
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>
74 <td class="function_type">unsigned <span class="returnvalue">int</span>
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>
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> *
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>
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> *
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
137 <td class="function_type">unsigned <span class="returnvalue">int</span>
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>
144 <td class="function_type">unsigned <span class="returnvalue">int</span>
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>
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>
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>
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>
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>
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">
173 <col width="150px" class="name">
174 <col class="description">
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>
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>
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
194 <div class="refsect1">
195 <a name="harfbuzz-hb-ot-color.includes"></a><h2>Includes</h2>
196 <pre class="synopsis">#include <hb-ot.h>
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>
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)))
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) & 0xFF)
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>
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) >> 24) & 0xFF)
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>
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) >> 16) & 0xFF)
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>
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) >> 8) & 0xFF)
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>
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">
251 <col width="150px" class="parameters_name">
252 <col class="parameters_description">
253 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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">
302 <col width="150px" class="parameters_name">
303 <col class="parameters_description">
304 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
340 <col width="150px" class="parameters_name">
341 <col class="parameters_description">
342 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
374 <col width="150px" class="parameters_name">
375 <col class="parameters_description">
376 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
400 <col width="150px" class="parameters_name">
401 <col class="parameters_description">
402 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
429 <col width="150px" class="parameters_name">
430 <col class="parameters_description">
431 <col width="200px" class="parameters_annotations">
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>
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>
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">
454 <col width="150px" class="parameters_name">
455 <col class="parameters_description">
456 <col width="200px" class="parameters_annotations">
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>
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>
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">
477 <col width="150px" class="parameters_name">
478 <col class="parameters_description">
479 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
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>face</p></td>
522 <td class="parameter_description"><p>a font face.</p></td>
523 <td class="parameter_annotations"> </td>
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>
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>
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>
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>
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>
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>
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>
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>
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">
575 <col width="150px" class="parameters_name">
576 <col class="parameters_description">
577 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
605 <col width="150px" class="parameters_name">
606 <col class="parameters_description">
607 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
641 <col width="150px" class="parameters_name">
642 <col class="parameters_description">
643 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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;
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>
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">
684 <col width="300px" class="enum_members_name">
685 <col class="enum_members_description">
686 <col width="200px" class="enum_members_annotations">
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>
695 <td class="enum_member_annotations"> </td>
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>
703 <td class="enum_member_annotations"> </td>
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>
711 <td class="enum_member_annotations"> </td>
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>
721 <hr>Generated by GTK-Doc V1.25</div>