Imported Upstream version 2.6.4
[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="ch12.html" title="OpenType API">
9 <link rel="prev" href="ch12.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><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="ch12.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="ch12.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="function_type">
51 <span class="returnvalue">uint8_t</span>
52 </td>
53 <td class="function_name">
54 <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>
55 </td>
56 </tr>
57 <tr>
58 <td class="function_type">
59 <span class="returnvalue">uint8_t</span>
60 </td>
61 <td class="function_name">
62 <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>
63 </td>
64 </tr>
65 <tr>
66 <td class="function_type">
67 <span class="returnvalue">uint8_t</span>
68 </td>
69 <td class="function_name">
70 <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>
71 </td>
72 </tr>
73 <tr>
74 <td class="function_type">
75 <span class="returnvalue">uint8_t</span>
76 </td>
77 <td class="function_name">
78 <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>
79 </td>
80 </tr>
81 <tr>
82 <td class="function_type">unsigned <span class="returnvalue">int</span>
83 </td>
84 <td class="function_name">
85 <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>
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-png" title="hb_ot_color_glyph_reference_png ()">hb_ot_color_glyph_reference_png</a> <span class="c_punctuation">()</span>
94 </td>
95 </tr>
96 <tr>
97 <td class="function_type">
98 <a class="link" href="harfbuzz-hb-blob.html#hb-blob-t"><span class="returnvalue">hb_blob_t</span></a> *
99 </td>
100 <td class="function_name">
101 <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>
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-layers" title="hb_ot_color_has_layers ()">hb_ot_color_has_layers</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-palettes" title="hb_ot_color_has_palettes ()">hb_ot_color_has_palettes</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-png" title="hb_ot_color_has_png ()">hb_ot_color_has_png</a> <span class="c_punctuation">()</span>
126 </td>
127 </tr>
128 <tr>
129 <td class="function_type">
130 <a class="link" href="harfbuzz-hb-common.html#hb-bool-t" title="hb_bool_t"><span class="returnvalue">hb_bool_t</span></a>
131 </td>
132 <td class="function_name">
133 <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>
134 </td>
135 </tr>
136 <tr>
137 <td class="function_type">
138 <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>
139 </td>
140 <td class="function_name">
141 <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>
142 </td>
143 </tr>
144 <tr>
145 <td class="function_type">unsigned <span class="returnvalue">int</span>
146 </td>
147 <td class="function_name">
148 <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>
149 </td>
150 </tr>
151 <tr>
152 <td class="function_type">unsigned <span class="returnvalue">int</span>
153 </td>
154 <td class="function_name">
155 <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>
156 </td>
157 </tr>
158 <tr>
159 <td class="function_type">
160 <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>
161 </td>
162 <td class="function_name">
163 <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>
164 </td>
165 </tr>
166 <tr>
167 <td class="function_type">
168 <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>
169 </td>
170 <td class="function_name">
171 <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>
172 </td>
173 </tr>
174 </tbody>
175 </table></div>
176 </div>
177 <div class="refsect1">
178 <a name="harfbuzz-hb-ot-color.other"></a><h2>Types and Values</h2>
179 <div class="informaltable"><table class="informaltable" width="100%" border="0">
180 <colgroup>
181 <col width="150px" class="name">
182 <col class="description">
183 </colgroup>
184 <tbody>
185 <tr>
186 <td class="typedef_keyword">typedef</td>
187 <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>
188 </tr>
189 <tr>
190 <td class="datatype_keyword">enum</td>
191 <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>
192 </tr>
193 </tbody>
194 </table></div>
195 </div>
196 <div class="refsect1">
197 <a name="harfbuzz-hb-ot-color.object-hierarchy"></a><h2>Object Hierarchy</h2>
198 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GFlags</a>
199     <span class="lineart">╰──</span> hb_ot_color_palette_flags_t
200 </pre>
201 </div>
202 <div class="refsect1">
203 <a name="harfbuzz-hb-ot-color.includes"></a><h2>Includes</h2>
204 <pre class="synopsis">#include &lt;hb-ot.h&gt;
205 </pre>
206 </div>
207 <div class="refsect1">
208 <a name="harfbuzz-hb-ot-color.description"></a><h2>Description</h2>
209 <p>Functions for fetching color-font information from OpenType font faces.</p>
210 <p>HarfBuzz supports <code class="literal">COLR</code>/<code class="literal">CPAL</code>, <code class="literal">sbix</code>, <code class="literal">CBDT</code>, and <code class="literal">SVG</code> color fonts.</p>
211 </div>
212 <div class="refsect1">
213 <a name="harfbuzz-hb-ot-color.functions_details"></a><h2>Functions</h2>
214 <div class="refsect2">
215 <a name="HB-COLOR:CAPS"></a><h3>HB_COLOR()</h3>
216 <pre class="programlisting">#define HB_COLOR(b,g,r,a) ((hb_color_t) HB_TAG ((b),(g),(r),(a)))
217 </pre>
218 </div>
219 <hr>
220 <div class="refsect2">
221 <a name="hb-color-get-alpha"></a><h3>hb_color_get_alpha ()</h3>
222 <pre class="programlisting"><span class="returnvalue">uint8_t</span>
223 hb_color_get_alpha (<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> color</code></em>);</pre>
224 <div class="refsect3">
225 <a name="hb-color-get-alpha.returns"></a><h4>Returns</h4>
226 <p> Alpha channel value of the given color</p>
227 </div>
228 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
229 </div>
230 <hr>
231 <div class="refsect2">
232 <a name="hb-color-get-blue"></a><h3>hb_color_get_blue ()</h3>
233 <pre class="programlisting"><span class="returnvalue">uint8_t</span>
234 hb_color_get_blue (<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> color</code></em>);</pre>
235 <div class="refsect3">
236 <a name="hb-color-get-blue.returns"></a><h4>Returns</h4>
237 <p> Blue channel value of the given color</p>
238 </div>
239 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
240 </div>
241 <hr>
242 <div class="refsect2">
243 <a name="hb-color-get-green"></a><h3>hb_color_get_green ()</h3>
244 <pre class="programlisting"><span class="returnvalue">uint8_t</span>
245 hb_color_get_green (<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> color</code></em>);</pre>
246 <div class="refsect3">
247 <a name="hb-color-get-green.returns"></a><h4>Returns</h4>
248 <p> Green channel value of the given color</p>
249 </div>
250 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
251 </div>
252 <hr>
253 <div class="refsect2">
254 <a name="hb-color-get-red"></a><h3>hb_color_get_red ()</h3>
255 <pre class="programlisting"><span class="returnvalue">uint8_t</span>
256 hb_color_get_red (<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> color</code></em>);</pre>
257 <div class="refsect3">
258 <a name="hb-color-get-red.returns"></a><h4>Returns</h4>
259 <p> Red channel value of the given color</p>
260 </div>
261 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
262 </div>
263 <hr>
264 <div class="refsect2">
265 <a name="hb-ot-color-glyph-get-layers"></a><h3>hb_ot_color_glyph_get_layers ()</h3>
266 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
267 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>,
268                               <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>,
269                               <em class="parameter"><code>unsigned <span class="type">int</span> start_offset</code></em>,
270                               <em class="parameter"><code>unsigned <span class="type">int</span> *layer_count</code></em>,
271                               <em class="parameter"><code><span class="type">hb_ot_color_layer_t</span> *layers</code></em>);</pre>
272 <p>Fetches a list of all color layers for the specified glyph index in the specified
273 face. The list returned will begin at the offset provided.</p>
274 <div class="refsect3">
275 <a name="hb-ot-color-glyph-get-layers.parameters"></a><h4>Parameters</h4>
276 <div class="informaltable"><table class="informaltable" width="100%" border="0">
277 <colgroup>
278 <col width="150px" class="parameters_name">
279 <col class="parameters_description">
280 <col width="200px" class="parameters_annotations">
281 </colgroup>
282 <tbody>
283 <tr>
284 <td class="parameter_name"><p>face</p></td>
285 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
286 <td class="parameter_annotations"> </td>
287 </tr>
288 <tr>
289 <td class="parameter_name"><p>glyph</p></td>
290 <td class="parameter_description"><p>The glyph index to query</p></td>
291 <td class="parameter_annotations"> </td>
292 </tr>
293 <tr>
294 <td class="parameter_name"><p>start_offset</p></td>
295 <td class="parameter_description"><p>offset of the first layer to retrieve</p></td>
296 <td class="parameter_annotations"> </td>
297 </tr>
298 <tr>
299 <td class="parameter_name"><p>layer_count</p></td>
300 <td class="parameter_description"><p>Input = the maximum number of layers to return;
301 Output = the actual number of layers returned (may be zero). </p></td>
302 <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>
303 </tr>
304 <tr>
305 <td class="parameter_name"><p>layers</p></td>
306 <td class="parameter_description"><p>The array of layers found. </p></td>
307 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=layer_count][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
308 </tr>
309 </tbody>
310 </table></div>
311 </div>
312 <div class="refsect3">
313 <a name="hb-ot-color-glyph-get-layers.returns"></a><h4>Returns</h4>
314 <p> Total number of layers available for the glyph index queried</p>
315 </div>
316 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
317 </div>
318 <hr>
319 <div class="refsect2">
320 <a name="hb-ot-color-glyph-reference-png"></a><h3>hb_ot_color_glyph_reference_png ()</h3>
321 <pre class="programlisting"><a class="link" href="harfbuzz-hb-blob.html#hb-blob-t"><span class="returnvalue">hb_blob_t</span></a> *
322 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>,
323                                  <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>
324 <p>Fetches the PNG image for a glyph. This function takes a font object, not a face object,
325 as input. To get an optimally sized PNG blob, the UPEM value must be set on the <em class="parameter"><code>font</code></em>
326
327 object. If UPEM is unset, the blob returned will be the largest PNG available.</p>
328 <div class="refsect3">
329 <a name="hb-ot-color-glyph-reference-png.parameters"></a><h4>Parameters</h4>
330 <div class="informaltable"><table class="informaltable" width="100%" border="0">
331 <colgroup>
332 <col width="150px" class="parameters_name">
333 <col class="parameters_description">
334 <col width="200px" class="parameters_annotations">
335 </colgroup>
336 <tbody>
337 <tr>
338 <td class="parameter_name"><p>font</p></td>
339 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-font.html#hb-font-t"><span class="type">hb_font_t</span></a> to work upon</p></td>
340 <td class="parameter_annotations"> </td>
341 </tr>
342 <tr>
343 <td class="parameter_name"><p>glyph</p></td>
344 <td class="parameter_description"><p>a glyph index</p></td>
345 <td class="parameter_annotations"> </td>
346 </tr>
347 </tbody>
348 </table></div>
349 </div>
350 <div class="refsect3">
351 <a name="hb-ot-color-glyph-reference-png.returns"></a><h4>Returns</h4>
352 <p>An <a class="link" href="harfbuzz-hb-blob.html#hb-blob-t"><span class="type">hb_blob_t</span></a> containing the PNG image for the glyph, if available. </p>
353 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
354 </div>
355 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
356 </div>
357 <hr>
358 <div class="refsect2">
359 <a name="hb-ot-color-glyph-reference-svg"></a><h3>hb_ot_color_glyph_reference_svg ()</h3>
360 <pre class="programlisting"><a class="link" href="harfbuzz-hb-blob.html#hb-blob-t"><span class="returnvalue">hb_blob_t</span></a> *
361 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>,
362                                  <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>
363 <p>Fetches the SVG document for a glyph. The blob may be either plain text or gzip-encoded.</p>
364 <div class="refsect3">
365 <a name="hb-ot-color-glyph-reference-svg.parameters"></a><h4>Parameters</h4>
366 <div class="informaltable"><table class="informaltable" width="100%" border="0">
367 <colgroup>
368 <col width="150px" class="parameters_name">
369 <col class="parameters_description">
370 <col width="200px" class="parameters_annotations">
371 </colgroup>
372 <tbody>
373 <tr>
374 <td class="parameter_name"><p>face</p></td>
375 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
376 <td class="parameter_annotations"> </td>
377 </tr>
378 <tr>
379 <td class="parameter_name"><p>glyph</p></td>
380 <td class="parameter_description"><p>a svg glyph index</p></td>
381 <td class="parameter_annotations"> </td>
382 </tr>
383 </tbody>
384 </table></div>
385 </div>
386 <div class="refsect3">
387 <a name="hb-ot-color-glyph-reference-svg.returns"></a><h4>Returns</h4>
388 <p>An <a class="link" href="harfbuzz-hb-blob.html#hb-blob-t"><span class="type">hb_blob_t</span></a> containing the SVG document of the glyph, if available. </p>
389 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
390 </div>
391 <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>
393 <hr>
394 <div class="refsect2">
395 <a name="hb-ot-color-has-layers"></a><h3>hb_ot_color_has_layers ()</h3>
396 <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>
397 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>
398 <p>Tests whether a face includes any <code class="literal">COLR</code> color layers.</p>
399 <div class="refsect3">
400 <a name="hb-ot-color-has-layers.parameters"></a><h4>Parameters</h4>
401 <div class="informaltable"><table class="informaltable" width="100%" border="0">
402 <colgroup>
403 <col width="150px" class="parameters_name">
404 <col class="parameters_description">
405 <col width="200px" class="parameters_annotations">
406 </colgroup>
407 <tbody><tr>
408 <td class="parameter_name"><p>face</p></td>
409 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
410 <td class="parameter_annotations"> </td>
411 </tr></tbody>
412 </table></div>
413 </div>
414 <div class="refsect3">
415 <a name="hb-ot-color-has-layers.returns"></a><h4>Returns</h4>
416 <p> true if data found, false otherwise</p>
417 </div>
418 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
419 </div>
420 <hr>
421 <div class="refsect2">
422 <a name="hb-ot-color-has-palettes"></a><h3>hb_ot_color_has_palettes ()</h3>
423 <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>
424 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>
425 <p>Tests whether a face includes a <code class="literal">CPAL</code> color-palette table.</p>
426 <div class="refsect3">
427 <a name="hb-ot-color-has-palettes.parameters"></a><h4>Parameters</h4>
428 <div class="informaltable"><table class="informaltable" width="100%" border="0">
429 <colgroup>
430 <col width="150px" class="parameters_name">
431 <col class="parameters_description">
432 <col width="200px" class="parameters_annotations">
433 </colgroup>
434 <tbody><tr>
435 <td class="parameter_name"><p>face</p></td>
436 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
437 <td class="parameter_annotations"> </td>
438 </tr></tbody>
439 </table></div>
440 </div>
441 <div class="refsect3">
442 <a name="hb-ot-color-has-palettes.returns"></a><h4>Returns</h4>
443 <p> true if data found, false otherwise</p>
444 </div>
445 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
446 </div>
447 <hr>
448 <div class="refsect2">
449 <a name="hb-ot-color-has-png"></a><h3>hb_ot_color_has_png ()</h3>
450 <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>
451 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>
452 <p>Tests whether a face has PNG glyph images (either in <code class="literal">CBDT</code> or <code class="literal">sbix</code> tables).</p>
453 <div class="refsect3">
454 <a name="hb-ot-color-has-png.parameters"></a><h4>Parameters</h4>
455 <div class="informaltable"><table class="informaltable" width="100%" border="0">
456 <colgroup>
457 <col width="150px" class="parameters_name">
458 <col class="parameters_description">
459 <col width="200px" class="parameters_annotations">
460 </colgroup>
461 <tbody><tr>
462 <td class="parameter_name"><p>face</p></td>
463 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
464 <td class="parameter_annotations"> </td>
465 </tr></tbody>
466 </table></div>
467 </div>
468 <div class="refsect3">
469 <a name="hb-ot-color-has-png.returns"></a><h4>Returns</h4>
470 <p> true if data found, false otherwise</p>
471 </div>
472 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
473 </div>
474 <hr>
475 <div class="refsect2">
476 <a name="hb-ot-color-has-svg"></a><h3>hb_ot_color_has_svg ()</h3>
477 <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>
478 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>
479 <p>Tests whether a face includes any <code class="literal">SVG</code> glyph images.</p>
480 <div class="refsect3">
481 <a name="hb-ot-color-has-svg.parameters"></a><h4>Parameters</h4>
482 <div class="informaltable"><table class="informaltable" width="100%" border="0">
483 <colgroup>
484 <col width="150px" class="parameters_name">
485 <col class="parameters_description">
486 <col width="200px" class="parameters_annotations">
487 </colgroup>
488 <tbody><tr>
489 <td class="parameter_name"><p>face</p></td>
490 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon.</p></td>
491 <td class="parameter_annotations"> </td>
492 </tr></tbody>
493 </table></div>
494 </div>
495 <div class="refsect3">
496 <a name="hb-ot-color-has-svg.returns"></a><h4>Returns</h4>
497 <p> true if data found, false otherwise.</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-color-get-name-id"></a><h3>hb_ot_color_palette_color_get_name_id ()</h3>
504 <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>
505 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>,
506                                        <em class="parameter"><code>unsigned <span class="type">int</span> color_index</code></em>);</pre>
507 <p>Fetches the <code class="literal">name</code> table Name ID that provides display names for
508 the specificed color in a face's <code class="literal">CPAL</code> color palette. </p>
509 <p>Display names can be generic (e.g., "Background") or specific
510 (e.g., "Eye color").</p>
511 <div class="refsect3">
512 <a name="hb-ot-color-palette-color-get-name-id.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 class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
523 <td class="parameter_annotations"> </td>
524 </tr>
525 <tr>
526 <td class="parameter_name"><p>color_index</p></td>
527 <td class="parameter_description"><p>The index of the color</p></td>
528 <td class="parameter_annotations"> </td>
529 </tr>
530 </tbody>
531 </table></div>
532 </div>
533 <div class="refsect3">
534 <a name="hb-ot-color-palette-color-get-name-id.returns"></a><h4>Returns</h4>
535 <p> the Name ID found for the color.</p>
536 </div>
537 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
538 </div>
539 <hr>
540 <div class="refsect2">
541 <a name="hb-ot-color-palette-get-colors"></a><h3>hb_ot_color_palette_get_colors ()</h3>
542 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
543 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>,
544                                 <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>,
545                                 <em class="parameter"><code>unsigned <span class="type">int</span> start_offset</code></em>,
546                                 <em class="parameter"><code>unsigned <span class="type">int</span> *color_count</code></em>,
547                                 <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>
548 <p>Fetches a list of the colors in a color palette.</p>
549 <p>After calling this function, <em class="parameter"><code>colors</code></em>
550  will be filled with the palette
551 colors. If <em class="parameter"><code>colors</code></em>
552  is NULL, the function will just return the number
553 of total colors without storing any actual colors; this can be used
554 for allocating a buffer of suitable size before calling
555 <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>
556 <div class="refsect3">
557 <a name="hb-ot-color-palette-get-colors.parameters"></a><h4>Parameters</h4>
558 <div class="informaltable"><table class="informaltable" width="100%" border="0">
559 <colgroup>
560 <col width="150px" class="parameters_name">
561 <col class="parameters_description">
562 <col width="200px" class="parameters_annotations">
563 </colgroup>
564 <tbody>
565 <tr>
566 <td class="parameter_name"><p>face</p></td>
567 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
568 <td class="parameter_annotations"> </td>
569 </tr>
570 <tr>
571 <td class="parameter_name"><p>palette_index</p></td>
572 <td class="parameter_description"><p>the index of the color palette to query</p></td>
573 <td class="parameter_annotations"> </td>
574 </tr>
575 <tr>
576 <td class="parameter_name"><p>start_offset</p></td>
577 <td class="parameter_description"><p>offset of the first color to retrieve</p></td>
578 <td class="parameter_annotations"> </td>
579 </tr>
580 <tr>
581 <td class="parameter_name"><p>color_count</p></td>
582 <td class="parameter_description"><p>Input = the maximum number of colors to return;
583 Output = the actual number of colors returned (may be zero). </p></td>
584 <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>
585 </tr>
586 <tr>
587 <td class="parameter_name"><p>colors</p></td>
588 <td class="parameter_description"><p>The 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 found. </p></td>
589 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=color_count][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
590 </tr>
591 </tbody>
592 </table></div>
593 </div>
594 <div class="refsect3">
595 <a name="hb-ot-color-palette-get-colors.returns"></a><h4>Returns</h4>
596 <p> the total number of colors in the palette</p>
597 </div>
598 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
599 </div>
600 <hr>
601 <div class="refsect2">
602 <a name="hb-ot-color-palette-get-count"></a><h3>hb_ot_color_palette_get_count ()</h3>
603 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
604 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>
605 <p>Fetches the number of color palettes in a face.</p>
606 <div class="refsect3">
607 <a name="hb-ot-color-palette-get-count.parameters"></a><h4>Parameters</h4>
608 <div class="informaltable"><table class="informaltable" width="100%" border="0">
609 <colgroup>
610 <col width="150px" class="parameters_name">
611 <col class="parameters_description">
612 <col width="200px" class="parameters_annotations">
613 </colgroup>
614 <tbody><tr>
615 <td class="parameter_name"><p>face</p></td>
616 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
617 <td class="parameter_annotations"> </td>
618 </tr></tbody>
619 </table></div>
620 </div>
621 <div class="refsect3">
622 <a name="hb-ot-color-palette-get-count.returns"></a><h4>Returns</h4>
623 <p> the number of palettes found</p>
624 </div>
625 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
626 </div>
627 <hr>
628 <div class="refsect2">
629 <a name="hb-ot-color-palette-get-flags"></a><h3>hb_ot_color_palette_get_flags ()</h3>
630 <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>
631 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>,
632                                <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>);</pre>
633 <p>Fetches the flags defined for a color palette.</p>
634 <div class="refsect3">
635 <a name="hb-ot-color-palette-get-flags.parameters"></a><h4>Parameters</h4>
636 <div class="informaltable"><table class="informaltable" width="100%" border="0">
637 <colgroup>
638 <col width="150px" class="parameters_name">
639 <col class="parameters_description">
640 <col width="200px" class="parameters_annotations">
641 </colgroup>
642 <tbody>
643 <tr>
644 <td class="parameter_name"><p>face</p></td>
645 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
646 <td class="parameter_annotations"> </td>
647 </tr>
648 <tr>
649 <td class="parameter_name"><p>palette_index</p></td>
650 <td class="parameter_description"><p>The index of the color palette</p></td>
651 <td class="parameter_annotations"> </td>
652 </tr>
653 </tbody>
654 </table></div>
655 </div>
656 <div class="refsect3">
657 <a name="hb-ot-color-palette-get-flags.returns"></a><h4>Returns</h4>
658 <p> the <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="type">hb_ot_color_palette_flags_t</span></a> of the requested color palette</p>
659 </div>
660 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
661 </div>
662 <hr>
663 <div class="refsect2">
664 <a name="hb-ot-color-palette-get-name-id"></a><h3>hb_ot_color_palette_get_name_id ()</h3>
665 <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>
666 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>,
667                                  <em class="parameter"><code>unsigned <span class="type">int</span> palette_index</code></em>);</pre>
668 <p>Fetches the <code class="literal">name</code> table Name ID that provides display names for
669 a <code class="literal">CPAL</code> color palette. </p>
670 <p>Palette display names can be generic (e.g., "Default") or provide
671 specific, themed names (e.g., "Spring", "Summer", "Fall", and "Winter").</p>
672 <div class="refsect3">
673 <a name="hb-ot-color-palette-get-name-id.parameters"></a><h4>Parameters</h4>
674 <div class="informaltable"><table class="informaltable" width="100%" border="0">
675 <colgroup>
676 <col width="150px" class="parameters_name">
677 <col class="parameters_description">
678 <col width="200px" class="parameters_annotations">
679 </colgroup>
680 <tbody>
681 <tr>
682 <td class="parameter_name"><p>face</p></td>
683 <td class="parameter_description"><p><a class="link" href="harfbuzz-hb-face.html#hb-face-t"><span class="type">hb_face_t</span></a> to work upon</p></td>
684 <td class="parameter_annotations"> </td>
685 </tr>
686 <tr>
687 <td class="parameter_name"><p>palette_index</p></td>
688 <td class="parameter_description"><p>The index of the color palette </p></td>
689 <td class="parameter_annotations"> </td>
690 </tr>
691 </tbody>
692 </table></div>
693 </div>
694 <div class="refsect3">
695 <a name="hb-ot-color-palette-get-name-id.returns"></a><h4>Returns</h4>
696 <p> the Named ID found for the palette.
697 If the requested palette has no name the result is <span class="type">HB_OT_NAME_ID_INVALID</span>.</p>
698 </div>
699 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
700 </div>
701 </div>
702 <div class="refsect1">
703 <a name="harfbuzz-hb-ot-color.other_details"></a><h2>Types and Values</h2>
704 <div class="refsect2">
705 <a name="hb-color-t"></a><h3>hb_color_t</h3>
706 <pre class="programlisting">typedef uint32_t hb_color_t;
707 </pre>
708 <p>Data type for holding color values.</p>
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 <hr>
712 <div class="refsect2">
713 <a name="hb-ot-color-palette-flags-t"></a><h3>enum hb_ot_color_palette_flags_t</h3>
714 <div class="refsect3">
715 <a name="hb-ot-color-palette-flags-t.members"></a><h4>Members</h4>
716 <div class="informaltable"><table class="informaltable" width="100%" border="0">
717 <colgroup>
718 <col width="300px" class="enum_members_name">
719 <col class="enum_members_description">
720 <col width="200px" class="enum_members_annotations">
721 </colgroup>
722 <tbody>
723 <tr>
724 <td class="enum_member_name"><p><a name="HB-OT-COLOR-PALETTE-FLAG-DEFAULT:CAPS"></a>HB_OT_COLOR_PALETTE_FLAG_DEFAULT</p></td>
725 <td class="enum_member_description">
726 <p>Default indicating that there is nothing special
727   to note about a color palette.</p>
728 </td>
729 <td class="enum_member_annotations"> </td>
730 </tr>
731 <tr>
732 <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>
733 <td class="enum_member_description">
734 <p>Flag indicating that the color
735   palette is appropriate to use when displaying the font on a light background such as white.</p>
736 </td>
737 <td class="enum_member_annotations"> </td>
738 </tr>
739 <tr>
740 <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>
741 <td class="enum_member_description">
742 <p>Flag indicating that the color
743   palette is appropriate to use when displaying the font on a dark background such as black.</p>
744 </td>
745 <td class="enum_member_annotations"> </td>
746 </tr>
747 </tbody>
748 </table></div>
749 </div>
750 <p class="since">Since: <a class="link" href="api-index-2-1-0.html#api-index-2.1.0">2.1.0</a></p>
751 </div>
752 </div>
753 </div>
754 <div class="footer">
755 <hr>Generated by GTK-Doc V1.29</div>
756 </body>
757 </html>