1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
|
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cairo-User-Fonts">
<refmeta>
<refentrytitle role="top_of_page" id="cairo-User-Fonts.top_of_page">User Fonts</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CAIRO Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>User Fonts</refname>
<refpurpose>Font support with font data provided by the user</refpurpose>
</refnamediv>
<refsect1 id="cairo-User-Fonts.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="cairo-user-scaled-font-init-func-t">*cairo_user_scaled_font_init_func_t</link><phrase role="c_punctuation">)</phrase> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="cairo-user-scaled-font-render-glyph-func-t">*cairo_user_scaled_font_render_glyph_func_t</link><phrase role="c_punctuation">)</phrase> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="cairo-user-scaled-font-text-to-glyphs-func-t">*cairo_user_scaled_font_text_to_glyphs_func_t</link><phrase role="c_punctuation">)</phrase> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t">*cairo_user_scaled_font_unicode_to_glyph_func_t</link><phrase role="c_punctuation">)</phrase> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-font-face-t"><returnvalue>cairo_font_face_t</returnvalue></link> *
</entry><entry role="function_name"><link linkend="cairo-user-font-face-create">cairo_user_font_face_create</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-set-init-func">cairo_user_font_face_set_init_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-user-scaled-font-init-func-t"><returnvalue>cairo_user_scaled_font_init_func_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-get-init-func">cairo_user_font_face_get_init_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-set-render-glyph-func">cairo_user_font_face_set_render_glyph_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-user-scaled-font-render-glyph-func-t"><returnvalue>cairo_user_scaled_font_render_glyph_func_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-get-render-glyph-func">cairo_user_font_face_get_render_glyph_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-set-unicode-to-glyph-func">cairo_user_font_face_set_unicode_to_glyph_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><returnvalue>cairo_user_scaled_font_unicode_to_glyph_func_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-get-unicode-to-glyph-func">cairo_user_font_face_get_unicode_to_glyph_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-set-text-to-glyphs-func">cairo_user_font_face_set_text_to_glyphs_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><returnvalue>cairo_user_scaled_font_text_to_glyphs_func_t</returnvalue></link>
</entry><entry role="function_name"><link linkend="cairo-user-font-face-get-text-to-glyphs-func">cairo_user_font_face_get_text_to_glyphs_func</link> <phrase role="c_punctuation">()</phrase></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="cairo-User-Fonts.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="CAIRO-HAS-USER-FONT:CAPS">CAIRO_HAS_USER_FONT</link></entry></row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="cairo-User-Fonts.description" role="desc">
<title role="desc.title">Description</title>
<para>The user-font feature allows the cairo user to provide drawings for glyphs
in a font. This is most useful in implementing fonts in non-standard
formats, like SVG fonts and Flash fonts, but can also be used by games and
other application to draw "funky" fonts.</para>
</refsect1>
<refsect1 id="cairo-User-Fonts.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="cairo-user-scaled-font-init-func-t" role="function" condition="since:1.8">
<title>cairo_user_scaled_font_init_func_t ()</title>
<indexterm zone="cairo-user-scaled-font-init-func-t" role="1.8"><primary sortas="user_scaled_font_init_func_t">cairo_user_scaled_font_init_func_t</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*cairo_user_scaled_font_init_func_t<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> *scaled_font</parameter>,
<parameter><link linkend="cairo-t"><type>cairo_t</type></link> *cr</parameter>,
<parameter><link linkend="cairo-font-extents-t"><type>cairo_font_extents_t</type></link> *extents</parameter>);</programlisting>
<para><link linkend="cairo-user-scaled-font-init-func-t"><type>cairo_user_scaled_font_init_func_t</type></link> is the type of function which is
called when a scaled-font needs to be created for a user font-face.</para>
<para>The cairo context <parameter>cr</parameter>
is not used by the caller, but is prepared in font
space, similar to what the cairo contexts passed to the render_glyph
method will look like. The callback can use this context for extents
computation for example. After the callback is called, <parameter>cr</parameter>
is checked
for any error status.</para>
<para>The <parameter>extents</parameter>
argument is where the user font sets the font extents for
<parameter>scaled_font</parameter>
. It is in font space, which means that for most cases its
ascent and descent members should add to 1.0. <parameter>extents</parameter>
is preset to
hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
descent and max_y_advance members.</para>
<para>The callback is optional. If not set, default font extents as described
in the previous paragraph will be used.</para>
<para>Note that <parameter>scaled_font</parameter>
is not fully initialized at this
point and trying to use it for text operations in the callback will result
in deadlock.</para>
<refsect3 id="cairo-user-scaled-font-init-func-t.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>scaled_font</para></entry>
<entry role="parameter_description"><para>the scaled-font being created</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cr</para></entry>
<entry role="parameter_description"><para>a cairo context, in font space</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>extents</para></entry>
<entry role="parameter_description"><para>font extents to fill in, in font space</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-scaled-font-init-func-t.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> upon success, or an error status on error.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-scaled-font-render-glyph-func-t" role="function" condition="since:1.8">
<title>cairo_user_scaled_font_render_glyph_func_t ()</title>
<indexterm zone="cairo-user-scaled-font-render-glyph-func-t" role="1.8"><primary sortas="user_scaled_font_render_glyph_func_t">cairo_user_scaled_font_render_glyph_func_t</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*cairo_user_scaled_font_render_glyph_func_t<phrase role="c_punctuation">)</phrase>
(<parameter><link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> *scaled_font</parameter>,
<parameter><type>unsigned long </type> glyph</parameter>,
<parameter><link linkend="cairo-t"><type>cairo_t</type></link> *cr</parameter>,
<parameter><link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> *extents</parameter>);</programlisting>
<para><link linkend="cairo-user-scaled-font-render-glyph-func-t"><type>cairo_user_scaled_font_render_glyph_func_t</type></link> is the type of function which
is called when a user scaled-font needs to render a glyph.</para>
<para>The callback is mandatory, and expected to draw the glyph with code <parameter>glyph</parameter>
to
the cairo context <parameter>cr</parameter>
. <parameter>cr</parameter>
is prepared such that the glyph drawing is done in
font space. That is, the matrix set on <parameter>cr</parameter>
is the scale matrix of <parameter>scaled_font</parameter>
,
The <parameter>extents</parameter>
argument is where the user font sets the font extents for
<parameter>scaled_font</parameter>
. However, if user prefers to draw in user space, they can
achieve that by changing the matrix on <parameter>cr</parameter>
. All cairo rendering operations
to <parameter>cr</parameter>
are permitted, however, the result is undefined if any source other
than the default source on <parameter>cr</parameter>
is used. That means, glyph bitmaps should
be rendered using <link linkend="cairo-mask"><function>cairo_mask()</function></link> instead of <link linkend="cairo-paint"><function>cairo_paint()</function></link>.</para>
<para>Other non-default settings on <parameter>cr</parameter>
include a font size of 1.0 (given that
it is set up to be in font space), and font options corresponding to
<parameter>scaled_font</parameter>
.</para>
<para>The <parameter>extents</parameter>
argument is preset to have <literal>x_bearing</literal>,
<literal>width</literal>, and <literal>y_advance</literal> of zero,
<literal>y_bearing</literal> set to <literal>-font_extents.ascent</literal>,
<literal>height</literal> to <literal>font_extents.ascent+font_extents.descent</literal>,
and <literal>x_advance</literal> to <literal>font_extents.max_x_advance</literal>.
The only field user needs to set in majority of cases is
<literal>x_advance</literal>.
If the <literal>width</literal> field is zero upon the callback returning
(which is its preset value), the glyph extents are automatically computed
based on the drawings done to <parameter>cr</parameter>
. This is in most cases exactly what the
desired behavior is. However, if for any reason the callback sets the
extents, it must be ink extents, and include the extents of all drawing
done to <parameter>cr</parameter>
in the callback.</para>
<refsect3 id="cairo-user-scaled-font-render-glyph-func-t.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>scaled_font</para></entry>
<entry role="parameter_description"><para>user scaled-font</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>glyph</para></entry>
<entry role="parameter_description"><para>glyph code to render</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cr</para></entry>
<entry role="parameter_description"><para>cairo context to draw to, in font space</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>extents</para></entry>
<entry role="parameter_description"><para>glyph extents to fill in, in font space</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-scaled-font-render-glyph-func-t.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> upon success, or
<link linkend="CAIRO-STATUS-USER-FONT-ERROR:CAPS"><literal>CAIRO_STATUS_USER_FONT_ERROR</literal></link> or any other error status on error.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-scaled-font-text-to-glyphs-func-t" role="function" condition="since:1.8">
<title>cairo_user_scaled_font_text_to_glyphs_func_t ()</title>
<indexterm zone="cairo-user-scaled-font-text-to-glyphs-func-t" role="1.8"><primary sortas="user_scaled_font_text_to_glyphs_func_t">cairo_user_scaled_font_text_to_glyphs_func_t</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*cairo_user_scaled_font_text_to_glyphs_func_t<phrase role="c_punctuation">)</phrase>
(<parameter><link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> *scaled_font</parameter>,
<parameter>const <link linkend="char"><type>char</type></link> *utf8</parameter>,
<parameter><link linkend="int"><type>int</type></link> utf8_len</parameter>,
<parameter><link linkend="cairo-glyph-t"><type>cairo_glyph_t</type></link> **glyphs</parameter>,
<parameter><link linkend="int"><type>int</type></link> *num_glyphs</parameter>,
<parameter><link linkend="cairo-text-cluster-t"><type>cairo_text_cluster_t</type></link> **clusters</parameter>,
<parameter><link linkend="int"><type>int</type></link> *num_clusters</parameter>,
<parameter><link linkend="cairo-text-cluster-flags-t"><type>cairo_text_cluster_flags_t</type></link> *cluster_flags</parameter>);</programlisting>
<para><link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><type>cairo_user_scaled_font_text_to_glyphs_func_t</type></link> is the type of function which
is called to convert input text to an array of glyphs. This is used by the
<link linkend="cairo-show-text"><function>cairo_show_text()</function></link> operation.</para>
<para>Using this callback the user-font has full control on glyphs and their
positions. That means, it allows for features like ligatures and kerning,
as well as complex <firstterm>shaping</firstterm> required for scripts like
Arabic and Indic.</para>
<para>The <parameter>num_glyphs</parameter>
argument is preset to the number of glyph entries available
in the <parameter>glyphs</parameter>
buffer. If the <parameter>glyphs</parameter>
buffer is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, the value of
<parameter>num_glyphs</parameter>
will be zero. If the provided glyph array is too short for
the conversion (or for convenience), a new glyph array may be allocated
using <link linkend="cairo-glyph-allocate"><function>cairo_glyph_allocate()</function></link> and placed in <parameter>glyphs</parameter>
. Upon return,
<parameter>num_glyphs</parameter>
should contain the number of generated glyphs. If the value
<parameter>glyphs</parameter>
points at has changed after the call, the caller will free the
allocated glyph array using <link linkend="cairo-glyph-free"><function>cairo_glyph_free()</function></link>. The caller will also free
the original value of <parameter>glyphs</parameter>
, so the callback shouldn't do so.
The callback should populate the glyph indices and positions (in font space)
assuming that the text is to be shown at the origin.</para>
<para>If <parameter>clusters</parameter>
is not <link linkend="NULL:CAPS"><literal>NULL</literal></link>, <parameter>num_clusters</parameter>
and <parameter>cluster_flags</parameter>
are also
non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, and cluster mapping should be computed. The semantics of how
cluster array allocation works is similar to the glyph array. That is,
if <parameter>clusters</parameter>
initially points to a non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> value, that array may be used
as a cluster buffer, and <parameter>num_clusters</parameter>
points to the number of cluster
entries available there. If the provided cluster array is too short for
the conversion (or for convenience), a new cluster array may be allocated
using <link linkend="cairo-text-cluster-allocate"><function>cairo_text_cluster_allocate()</function></link> and placed in <parameter>clusters</parameter>
. In this case,
the original value of <parameter>clusters</parameter>
will still be freed by the caller. Upon
return, <parameter>num_clusters</parameter>
should contain the number of generated clusters.
If the value <parameter>clusters</parameter>
points at has changed after the call, the caller
will free the allocated cluster array using <link linkend="cairo-text-cluster-free"><function>cairo_text_cluster_free()</function></link>.</para>
<para>The callback is optional. If <parameter>num_glyphs</parameter>
is negative upon
the callback returning or if the return value
is <link linkend="CAIRO-STATUS-USER-FONT-NOT-IMPLEMENTED:CAPS"><literal>CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED</literal></link>, the unicode_to_glyph callback
is tried. See <link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><type>cairo_user_scaled_font_unicode_to_glyph_func_t</type></link>.</para>
<para>Note: While cairo does not impose any limitation on glyph indices,
some applications may assume that a glyph index fits in a 16-bit
unsigned integer. As such, it is advised that user-fonts keep their
glyphs in the 0 to 65535 range. Furthermore, some applications may
assume that glyph 0 is a special glyph-not-found glyph. User-fonts
are advised to use glyph 0 for such purposes and do not use that
glyph value for other purposes.</para>
<refsect3 id="cairo-user-scaled-font-text-to-glyphs-func-t.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>scaled_font</para></entry>
<entry role="parameter_description"><para>the scaled-font being created</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>utf8</para></entry>
<entry role="parameter_description"><para>a string of text encoded in UTF-8</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>utf8_len</para></entry>
<entry role="parameter_description"><para>length of <parameter>utf8</parameter>
in bytes</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>glyphs</para></entry>
<entry role="parameter_description"><para>pointer to array of glyphs to fill, in font space</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>num_glyphs</para></entry>
<entry role="parameter_description"><para>pointer to number of glyphs</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>clusters</para></entry>
<entry role="parameter_description"><para>pointer to array of cluster mapping information to fill, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>num_clusters</para></entry>
<entry role="parameter_description"><para>pointer to number of clusters</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cluster_flags</para></entry>
<entry role="parameter_description"><para>pointer to location to store cluster flags corresponding to the
output <parameter>clusters</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-scaled-font-text-to-glyphs-func-t.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> upon success,
<link linkend="CAIRO-STATUS-USER-FONT-NOT-IMPLEMENTED:CAPS"><literal>CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED</literal></link> if fallback options should be tried,
or <link linkend="CAIRO-STATUS-USER-FONT-ERROR:CAPS"><literal>CAIRO_STATUS_USER_FONT_ERROR</literal></link> or any other error status on error.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-scaled-font-unicode-to-glyph-func-t" role="function" condition="since:1.8">
<title>cairo_user_scaled_font_unicode_to_glyph_func_t ()</title>
<indexterm zone="cairo-user-scaled-font-unicode-to-glyph-func-t" role="1.8"><primary sortas="user_scaled_font_unicode_to_glyph_func_t">cairo_user_scaled_font_unicode_to_glyph_func_t</primary></indexterm>
<programlisting language="C"><link linkend="cairo-status-t"><returnvalue>cairo_status_t</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*cairo_user_scaled_font_unicode_to_glyph_func_t<phrase role="c_punctuation">)</phrase>
(<parameter><link linkend="cairo-scaled-font-t"><type>cairo_scaled_font_t</type></link> *scaled_font</parameter>,
<parameter><type>unsigned long </type> unicode</parameter>,
<parameter>unsigned <link linkend="long"><type>long</type></link> *glyph_index</parameter>);</programlisting>
<para><link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><type>cairo_user_scaled_font_unicode_to_glyph_func_t</type></link> is the type of function which
is called to convert an input Unicode character to a single glyph.
This is used by the <link linkend="cairo-show-text"><function>cairo_show_text()</function></link> operation.</para>
<para>This callback is used to provide the same functionality as the
text_to_glyphs callback does (see <link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><type>cairo_user_scaled_font_text_to_glyphs_func_t</type></link>)
but has much less control on the output,
in exchange for increased ease of use. The inherent assumption to using
this callback is that each character maps to one glyph, and that the
mapping is context independent. It also assumes that glyphs are positioned
according to their advance width. These mean no ligatures, kerning, or
complex scripts can be implemented using this callback.</para>
<para>The callback is optional, and only used if text_to_glyphs callback is not
set or fails to return glyphs. If this callback is not set or if it returns
<link linkend="CAIRO-STATUS-USER-FONT-NOT-IMPLEMENTED:CAPS"><literal>CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED</literal></link>, an identity mapping from Unicode
code-points to glyph indices is assumed.</para>
<para>Note: While cairo does not impose any limitation on glyph indices,
some applications may assume that a glyph index fits in a 16-bit
unsigned integer. As such, it is advised that user-fonts keep their
glyphs in the 0 to 65535 range. Furthermore, some applications may
assume that glyph 0 is a special glyph-not-found glyph. User-fonts
are advised to use glyph 0 for such purposes and do not use that
glyph value for other purposes.</para>
<refsect3 id="cairo-user-scaled-font-unicode-to-glyph-func-t.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>scaled_font</para></entry>
<entry role="parameter_description"><para>the scaled-font being created</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>unicode</para></entry>
<entry role="parameter_description"><para>input unicode character code-point</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>glyph_index</para></entry>
<entry role="parameter_description"><para>output glyph index</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-scaled-font-unicode-to-glyph-func-t.returns" role="returns">
<title>Returns</title>
<para> <link linkend="CAIRO-STATUS-SUCCESS:CAPS"><literal>CAIRO_STATUS_SUCCESS</literal></link> upon success,
<link linkend="CAIRO-STATUS-USER-FONT-NOT-IMPLEMENTED:CAPS"><literal>CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED</literal></link> if fallback options should be tried,
or <link linkend="CAIRO-STATUS-USER-FONT-ERROR:CAPS"><literal>CAIRO_STATUS_USER_FONT_ERROR</literal></link> or any other error status on error.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-create" role="function" condition="since:1.8">
<title>cairo_user_font_face_create ()</title>
<indexterm zone="cairo-user-font-face-create" role="1.8"><primary sortas="user_font_face_create">cairo_user_font_face_create</primary></indexterm>
<programlisting language="C"><link linkend="cairo-font-face-t"><returnvalue>cairo_font_face_t</returnvalue></link> *
cairo_user_font_face_create (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new user font-face.</para>
<para>Use the setter functions to associate callbacks with the returned
user font. The only mandatory callback is render_glyph.</para>
<para>After the font-face is created, the user can attach arbitrary data
(the actual font data) to it using <link linkend="cairo-font-face-set-user-data"><function>cairo_font_face_set_user_data()</function></link>
and access it from the user-font callbacks by using
<link linkend="cairo-scaled-font-get-font-face"><function>cairo_scaled_font_get_font_face()</function></link> followed by
<link linkend="cairo-font-face-get-user-data"><function>cairo_font_face_get_user_data()</function></link>.</para>
<refsect3 id="cairo-user-font-face-create.returns" role="returns">
<title>Returns</title>
<para> a newly created <link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link>. Free with
<link linkend="cairo-font-face-destroy"><function>cairo_font_face_destroy()</function></link> when you are done using it.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-set-init-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_set_init_func ()</title>
<indexterm zone="cairo-user-font-face-set-init-func" role="1.8"><primary sortas="user_font_face_set_init_func">cairo_user_font_face_set_init_func</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_user_font_face_set_init_func (<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>,
<parameter><link linkend="cairo-user-scaled-font-init-func-t"><type>cairo_user_scaled_font_init_func_t</type></link> init_func</parameter>);</programlisting>
<para>Sets the scaled-font initialization function of a user-font.
See <link linkend="cairo-user-scaled-font-init-func-t"><type>cairo_user_scaled_font_init_func_t</type></link> for details of how the callback
works.</para>
<para>The font-face should not be immutable or a <link linkend="CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><literal>CAIRO_STATUS_USER_FONT_IMMUTABLE</literal></link>
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.</para>
<refsect3 id="cairo-user-font-face-set-init-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>init_func</para></entry>
<entry role="parameter_description"><para>The init callback, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-get-init-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_get_init_func ()</title>
<indexterm zone="cairo-user-font-face-get-init-func" role="1.8"><primary sortas="user_font_face_get_init_func">cairo_user_font_face_get_init_func</primary></indexterm>
<programlisting language="C"><link linkend="cairo-user-scaled-font-init-func-t"><returnvalue>cairo_user_scaled_font_init_func_t</returnvalue></link>
cairo_user_font_face_get_init_func (<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>);</programlisting>
<para>Gets the scaled-font initialization function of a user-font.</para>
<refsect3 id="cairo-user-font-face-get-init-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-font-face-get-init-func.returns" role="returns">
<title>Returns</title>
<para> The init callback of <parameter>font_face</parameter>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none set or an error has occurred.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-set-render-glyph-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_set_render_glyph_func ()</title>
<indexterm zone="cairo-user-font-face-set-render-glyph-func" role="1.8"><primary sortas="user_font_face_set_render_glyph_func">cairo_user_font_face_set_render_glyph_func</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_user_font_face_set_render_glyph_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>,
<parameter><link linkend="cairo-user-scaled-font-render-glyph-func-t"><type>cairo_user_scaled_font_render_glyph_func_t</type></link> render_glyph_func</parameter>);</programlisting>
<para>Sets the glyph rendering function of a user-font.
See <link linkend="cairo-user-scaled-font-render-glyph-func-t"><type>cairo_user_scaled_font_render_glyph_func_t</type></link> for details of how the callback
works.</para>
<para>The font-face should not be immutable or a <link linkend="CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><literal>CAIRO_STATUS_USER_FONT_IMMUTABLE</literal></link>
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.</para>
<para>The render_glyph callback is the only mandatory callback of a user-font.
If the callback is <link linkend="NULL:CAPS"><literal>NULL</literal></link> and a glyph is tried to be rendered using
<parameter>font_face</parameter>
, a <link linkend="CAIRO-STATUS-USER-FONT-ERROR:CAPS"><literal>CAIRO_STATUS_USER_FONT_ERROR</literal></link> will occur.</para>
<refsect3 id="cairo-user-font-face-set-render-glyph-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>render_glyph_func</para></entry>
<entry role="parameter_description"><para>The render_glyph callback, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-get-render-glyph-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_get_render_glyph_func ()</title>
<indexterm zone="cairo-user-font-face-get-render-glyph-func" role="1.8"><primary sortas="user_font_face_get_render_glyph_func">cairo_user_font_face_get_render_glyph_func</primary></indexterm>
<programlisting language="C"><link linkend="cairo-user-scaled-font-render-glyph-func-t"><returnvalue>cairo_user_scaled_font_render_glyph_func_t</returnvalue></link>
cairo_user_font_face_get_render_glyph_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>);</programlisting>
<para>Gets the glyph rendering function of a user-font.</para>
<refsect3 id="cairo-user-font-face-get-render-glyph-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-font-face-get-render-glyph-func.returns" role="returns">
<title>Returns</title>
<para> The render_glyph callback of <parameter>font_face</parameter>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none set or an error has occurred.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-set-unicode-to-glyph-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_set_unicode_to_glyph_func ()</title>
<indexterm zone="cairo-user-font-face-set-unicode-to-glyph-func" role="1.8"><primary sortas="user_font_face_set_unicode_to_glyph_func">cairo_user_font_face_set_unicode_to_glyph_func</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_user_font_face_set_unicode_to_glyph_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>,
<parameter><link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><type>cairo_user_scaled_font_unicode_to_glyph_func_t</type></link> unicode_to_glyph_func</parameter>);</programlisting>
<para>Sets the unicode-to-glyph conversion function of a user-font.
See <link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><type>cairo_user_scaled_font_unicode_to_glyph_func_t</type></link> for details of how the callback
works.</para>
<para>The font-face should not be immutable or a <link linkend="CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><literal>CAIRO_STATUS_USER_FONT_IMMUTABLE</literal></link>
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.</para>
<refsect3 id="cairo-user-font-face-set-unicode-to-glyph-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>unicode_to_glyph_func</para></entry>
<entry role="parameter_description"><para>The unicode_to_glyph callback, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-get-unicode-to-glyph-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_get_unicode_to_glyph_func ()</title>
<indexterm zone="cairo-user-font-face-get-unicode-to-glyph-func" role="1.8"><primary sortas="user_font_face_get_unicode_to_glyph_func">cairo_user_font_face_get_unicode_to_glyph_func</primary></indexterm>
<programlisting language="C"><link linkend="cairo-user-scaled-font-unicode-to-glyph-func-t"><returnvalue>cairo_user_scaled_font_unicode_to_glyph_func_t</returnvalue></link>
cairo_user_font_face_get_unicode_to_glyph_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>);</programlisting>
<para>Gets the unicode-to-glyph conversion function of a user-font.</para>
<refsect3 id="cairo-user-font-face-get-unicode-to-glyph-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-font-face-get-unicode-to-glyph-func.returns" role="returns">
<title>Returns</title>
<para> The unicode_to_glyph callback of <parameter>font_face</parameter>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none set or an error occurred.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-set-text-to-glyphs-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_set_text_to_glyphs_func ()</title>
<indexterm zone="cairo-user-font-face-set-text-to-glyphs-func" role="1.8"><primary sortas="user_font_face_set_text_to_glyphs_func">cairo_user_font_face_set_text_to_glyphs_func</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
cairo_user_font_face_set_text_to_glyphs_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>,
<parameter><link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><type>cairo_user_scaled_font_text_to_glyphs_func_t</type></link> text_to_glyphs_func</parameter>);</programlisting>
<para>Sets th text-to-glyphs conversion function of a user-font.
See <link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><type>cairo_user_scaled_font_text_to_glyphs_func_t</type></link> for details of how the callback
works.</para>
<para>The font-face should not be immutable or a <link linkend="CAIRO-STATUS-USER-FONT-IMMUTABLE:CAPS"><literal>CAIRO_STATUS_USER_FONT_IMMUTABLE</literal></link>
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.</para>
<refsect3 id="cairo-user-font-face-set-text-to-glyphs-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text_to_glyphs_func</para></entry>
<entry role="parameter_description"><para>The text_to_glyphs callback, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
<refsect2 id="cairo-user-font-face-get-text-to-glyphs-func" role="function" condition="since:1.8">
<title>cairo_user_font_face_get_text_to_glyphs_func ()</title>
<indexterm zone="cairo-user-font-face-get-text-to-glyphs-func" role="1.8"><primary sortas="user_font_face_get_text_to_glyphs_func">cairo_user_font_face_get_text_to_glyphs_func</primary></indexterm>
<programlisting language="C"><link linkend="cairo-user-scaled-font-text-to-glyphs-func-t"><returnvalue>cairo_user_scaled_font_text_to_glyphs_func_t</returnvalue></link>
cairo_user_font_face_get_text_to_glyphs_func
(<parameter><link linkend="cairo-font-face-t"><type>cairo_font_face_t</type></link> *font_face</parameter>);</programlisting>
<para>Gets the text-to-glyphs conversion function of a user-font.</para>
<refsect3 id="cairo-user-font-face-get-text-to-glyphs-func.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>font_face</para></entry>
<entry role="parameter_description"><para>A user font face</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="cairo-user-font-face-get-text-to-glyphs-func.returns" role="returns">
<title>Returns</title>
<para> The text_to_glyphs callback of <parameter>font_face</parameter>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none set or an error occurred.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
</refsect1>
<refsect1 id="cairo-User-Fonts.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="CAIRO-HAS-USER-FONT:CAPS" role="macro" condition="since:1.8">
<title>CAIRO_HAS_USER_FONT</title>
<indexterm zone="CAIRO-HAS-USER-FONT:CAPS" role="1.8"><primary sortas="HAS_USER_FONT">CAIRO_HAS_USER_FONT</primary></indexterm>
<programlisting language="C">#define CAIRO_HAS_USER_FONT 1
</programlisting>
<para>Defined if the user font backend is available.
This macro can be used to conditionally compile backend-specific code.
The user font backend is always built in versions of cairo that support
this feature (1.8 and later).</para>
<para role="since">Since: <link linkend="api-index-1.8">1.8</link></para></refsect2>
</refsect1>
</refentry>
|