summaryrefslogtreecommitdiff
path: root/doc/public/html/cairo-Fonts.html
blob: 471dd297f564600738aef672ff921449ef7204fb (plain)
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
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Fonts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="Cairo: A Vector Graphics Library">
<link rel="up" href="pt02.html" title="Part&#160;II.&#160;Reference">
<link rel="prev" href="cairo-cairo-matrix-t.html" title="cairo_matrix_t">
<link rel="next" href="cairo-FreeType-Fonts.html" title="FreeType Fonts">
<meta name="generator" content="GTK-Doc V1.4 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;Tutorial">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;Reference">
<link rel="index" href="ix01.html" title="Index">
<link rel="appendix" href="language-bindings.html" title="Appendix&#160;A.&#160;Creating a language binding for cairo">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="cairo-cairo-matrix-t.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cairo: A Vector Graphics Library</th>
<td><a accesskey="n" href="cairo-FreeType-Fonts.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry" lang="en">
<a name="cairo-Fonts"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Fonts</span></h2>
<p>Fonts &#8212; Font Handling</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



typedef     <a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a>;
typedef     <a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>;
<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a>* <a href="cairo-Fonts.html#cairo-font-face-reference">cairo_font_face_reference</a>
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
void        <a href="cairo-Fonts.html#cairo-font-face-destroy">cairo_font_face_destroy</a>         (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
<a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> <a href="cairo-Fonts.html#cairo-font-face-status">cairo_font_face_status</a>       (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);
void*       <a href="cairo-Fonts.html#cairo-font-face-get-user-data">cairo_font_face_get_user_data</a>   (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-t.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);
<a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> <a href="cairo-Fonts.html#cairo-font-face-set-user-data">cairo_font_face_set_user_data</a>
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-t.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
                                             void *user_data,
                                             <a href="cairo-cairo-t.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);
<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* <a href="cairo-Fonts.html#cairo-scaled-font-create">cairo_scaled_font_create</a>
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *font_matrix,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *ctm,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* <a href="cairo-Fonts.html#cairo-scaled-font-reference">cairo_scaled_font_reference</a>
                                            (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);
void        <a href="cairo-Fonts.html#cairo-scaled-font-destroy">cairo_scaled_font_destroy</a>       (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);
<a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> <a href="cairo-Fonts.html#cairo-scaled-font-status">cairo_scaled_font_status</a>     (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);
            <a href="cairo-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a>;
void        <a href="cairo-Fonts.html#cairo-scaled-font-extents">cairo_scaled_font_extents</a>       (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font,
                                             <a href="cairo-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);
            <a href="cairo-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a>;
void        <a href="cairo-Fonts.html#cairo-scaled-font-glyph-extents">cairo_scaled_font_glyph_extents</a> (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font,
                                             <a href="cairo-cairo-t.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
                                             int num_glyphs,
                                             <a href="cairo-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);
typedef     <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a>;
<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a>* <a href="cairo-Fonts.html#cairo-font-options-create">cairo_font_options_create</a>
                                            (void);
<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a>* <a href="cairo-Fonts.html#cairo-font-options-copy">cairo_font_options_copy</a>
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *original);
void        <a href="cairo-Fonts.html#cairo-font-options-destroy">cairo_font_options_destroy</a>      (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
<a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> <a href="cairo-Fonts.html#cairo-font-options-status">cairo_font_options_status</a>    (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
void        <a href="cairo-Fonts.html#cairo-font-options-merge">cairo_font_options_merge</a>        (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *other);
unsigned long <a href="cairo-Fonts.html#cairo-font-options-hash">cairo_font_options_hash</a>       (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
<a href="cairo-cairo-t.html#cairo-bool-t">cairo_bool_t</a> <a href="cairo-Fonts.html#cairo-font-options-equal">cairo_font_options_equal</a>       (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *other);
void        <a href="cairo-Fonts.html#cairo-font-options-set-antialias">cairo_font_options_set_antialias</a>
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);
<a href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> <a href="cairo-Fonts.html#cairo-font-options-get-antialias">cairo_font_options_get_antialias</a>
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
enum        <a href="cairo-Fonts.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a>;
void        <a href="cairo-Fonts.html#cairo-font-options-set-subpixel-order">cairo_font_options_set_subpixel_order</a>
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> subpixel_order);
<a href="cairo-Fonts.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> <a href="cairo-Fonts.html#cairo-font-options-get-subpixel-order">cairo_font_options_get_subpixel_order</a>
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
enum        <a href="cairo-Fonts.html#cairo-hint-style-t">cairo_hint_style_t</a>;
void        <a href="cairo-Fonts.html#cairo-font-options-set-hint-style">cairo_font_options_set_hint_style</a>
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-hint-style-t">cairo_hint_style_t</a> hint_style);
<a href="cairo-Fonts.html#cairo-hint-style-t">cairo_hint_style_t</a> <a href="cairo-Fonts.html#cairo-font-options-get-hint-style">cairo_font_options_get_hint_style</a>
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
enum        <a href="cairo-Fonts.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a>;
void        <a href="cairo-Fonts.html#cairo-font-options-set-hint-metrics">cairo_font_options_set_hint_metrics</a>
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> hint_metrics);
<a href="cairo-Fonts.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> <a href="cairo-Fonts.html#cairo-font-options-get-hint-metrics">cairo_font_options_get_hint_metrics</a>
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2909546"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2909557"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2909563"></a><h3>
<a name="cairo-font-face-t"></a>cairo_font_face_t</h3>
<a class="indexterm" name="id2909574"></a><pre class="programlisting">typedef struct _cairo_font_face cairo_font_face_t;
</pre>
<p>
A <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a> specifies all aspects of a font other
than the size or font matrix (a font matrix is used to distort
a font by sheering it or scaling it unequally in the two
directions) . A font face can be set on a <a href="cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> by using
<a href="cairo-cairo-t.html#cairo-set-font-face"><code class="function">cairo_set_font_face()</code></a>; the size and font matrix are set with
<a href="cairo-cairo-t.html#cairo-set-font-size"><code class="function">cairo_set_font_size()</code></a> and <a href="cairo-cairo-t.html#cairo-set-font-matrix"><code class="function">cairo_set_font_matrix()</code></a>.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909638"></a><h3>
<a name="cairo-scaled-font-t"></a>cairo_scaled_font_t</h3>
<a class="indexterm" name="id2909648"></a><pre class="programlisting">typedef struct _cairo_scaled_font cairo_scaled_font_t;
</pre>
<p>
A <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> is a font scaled to a particular size and device
resolution. A cairo_scaled_font_t is most useful for low-level font
usage where a library or application wants to cache a reference
to a scaled font to speed up the computation of metrics.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2909680"></a><h3>
<a name="cairo-font-face-reference"></a>cairo_font_face_reference ()</h3>
<a class="indexterm" name="id2909689"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a>* cairo_font_face_reference
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Increases the reference count on <em class="parameter"><code>font_face</code></em> by one. This prevents
<em class="parameter"><code>font_face</code></em> from being destroyed until a matching call to
<a href="cairo-Fonts.html#cairo-font-face-destroy"><code class="function">cairo_font_face_destroy()</code></a> is made.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>, (may be NULL in which case this
function does nothing).
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the referenced <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907782"></a><h3>
<a name="cairo-font-face-destroy"></a>cairo_font_face_destroy ()</h3>
<a class="indexterm" name="id2907791"></a><pre class="programlisting">void        cairo_font_face_destroy         (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>font_face</code></em> by one. If the result
is zero, then <em class="parameter"><code>font_face</code></em> and all associated resources are freed.
See <a href="cairo-Fonts.html#cairo-font-face-reference"><code class="function">cairo_font_face_reference()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907870"></a><h3>
<a name="cairo-font-face-status"></a>cairo_font_face_status ()</h3>
<a class="indexterm" name="id2907878"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> cairo_font_face_status       (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face);</pre>
<p>
Checks whether an error has previously occurred for this
font face</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <code class="literal">CAIRO_STATUS_SUCCESS</code> or another error such as
  <code class="literal">CAIRO_STATUS_NO_MEMORY</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907959"></a><h3>
<a name="cairo-font-face-get-user-data"></a>cairo_font_face_get_user_data ()</h3>
<a class="indexterm" name="id2907970"></a><pre class="programlisting">void*       cairo_font_face_get_user_data   (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-t.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key);</pre>
<p>
Return user data previously attached to <em class="parameter"><code>font_face</code></em> using the specified
key.  If no user data has been attached with the given key this
function returns <code class="literal">NULL</code>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td> the address of the <a href="cairo-cairo-t.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> the user data was
attached to
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the user data previously attached or <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2908086"></a><h3>
<a name="cairo-font-face-set-user-data"></a>cairo_font_face_set_user_data ()</h3>
<a class="indexterm" name="id2908097"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> cairo_font_face_set_user_data
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-t.html#cairo-user-data-key-t">cairo_user_data_key_t</a> *key,
                                             void *user_data,
                                             <a href="cairo-cairo-t.html#cairo-destroy-func-t">cairo_destroy_func_t</a> destroy);</pre>
<p>
Attach user data to <em class="parameter"><code>font_face</code></em>.  To remove user data from a font face,
call this function with the key that was used to set it and <code class="literal">NULL</code>
for <em class="parameter"><code>data</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em>&#160;:</span></td>
<td> the address of a <a href="cairo-cairo-t.html#cairo-user-data-key-t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td> the user data to attach to the font face
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>destroy</code></em>&#160;:</span></td>
<td> a <a href="cairo-cairo-t.html#cairo-destroy-func-t"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
font face is destroyed or when new user data is attached using the
same key.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <code class="literal">CAIRO_STATUS_SUCCESS</code> or <code class="literal">CAIRO_STATUS_NO_MEMORY</code> if a
slot could not be allocated for the user data.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2908276"></a><h3>
<a name="cairo-scaled-font-create"></a>cairo_scaled_font_create ()</h3>
<a class="indexterm" name="id2908285"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_create
                                            (<a href="cairo-Fonts.html#cairo-font-face-t">cairo_font_face_t</a> *font_face,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *font_matrix,
                                             const <a href="cairo-cairo-matrix-t.html#cairo-matrix-t">cairo_matrix_t</a> *ctm,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Creates a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a> object from a font face and matrices that
describe the size of the font and the environment in which it will
be used.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_face</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-face-t"><span class="type">cairo_font_face_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_matrix</code></em>&#160;:</span></td>
<td> font space to user space transformation matrix for the
      font. In the simplest case of a N point font, this matrix is
      just a scale by N, but it can also be used to shear the font
      or stretch it unequally along the two axes. See
      <a href="cairo-cairo-t.html#cairo-set-font-matrix"><code class="function">cairo_set_font_matrix()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>ctm</code></em>&#160;:</span></td>
<td> user to device transformation matrix with which the font will
      be used.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> options to use when getting metrics for the font and
          rendering with it.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a newly created <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>. Destroy with
 <a href="cairo-Fonts.html#cairo-scaled-font-destroy"><code class="function">cairo_scaled_font_destroy()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857706"></a><h3>
<a name="cairo-scaled-font-reference"></a>cairo_scaled_font_reference ()</h3>
<a class="indexterm" name="id2857715"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a>* cairo_scaled_font_reference
                                            (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Increases the reference count on <em class="parameter"><code>scaled_font</code></em> by one. This prevents
<em class="parameter"><code>scaled_font</code></em> from being destroyed until a matching call to
<a href="cairo-Fonts.html#cairo-scaled-font-destroy"><code class="function">cairo_scaled_font_destroy()</code></a> is made.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>, (may be NULL in which case
this function does nothing)
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857806"></a><h3>
<a name="cairo-scaled-font-destroy"></a>cairo_scaled_font_destroy ()</h3>
<a class="indexterm" name="id2857816"></a><pre class="programlisting">void        cairo_scaled_font_destroy       (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Decreases the reference count on <em class="parameter"><code>font</code></em> by one. If the result
is zero, then <em class="parameter"><code>font</code></em> and all associated resources are freed.
See <a href="cairo-Fonts.html#cairo-scaled-font-reference"><code class="function">cairo_scaled_font_reference()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857895"></a><h3>
<a name="cairo-scaled-font-status"></a>cairo_scaled_font_status ()</h3>
<a class="indexterm" name="id2857904"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> cairo_scaled_font_status     (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font);</pre>
<p>
Checks whether an error has previously occurred for this
scaled_font.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <code class="literal">CAIRO_STATUS_SUCCESS</code> or another error such as
  <code class="literal">CAIRO_STATUS_NO_MEMORY</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2857985"></a><h3>
<a name="cairo-font-extents-t"></a>cairo_font_extents_t</h3>
<a class="indexterm" name="id2857994"></a><pre class="programlisting">typedef struct {
    double ascent;
    double descent;
    double height;
    double max_x_advance;
    double max_y_advance;
} cairo_font_extents_t;
</pre>
<p>
The <a href="cairo-Fonts.html#cairo-text-extents-t"><span class="type">cairo_text_extents_t</span></a> structure stores metric information for
a font. Values are given in the current user-space coordinate
system.
</p>
<p>
Because font metrics are in user-space coordinates, they are
mostly, but not entirely, independent of the current transformation
matrix. If you call <code class="literal">cairo_scale(cr, 2.0, 2.0)</code>,
text will be drawn twice as big, but the reported text extents will
not be doubled. They will change slightly due to hinting (so you
can't assume that metrics are independent of the transformation
matrix), but otherwise will remain unchanged.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>ascent</code></em>;</span></td>
<td> the distance that the font extends above the baseline.
         Note that this is not always exactly equal to the maximum
         of the extents of all the glyphs in the font, but rather
         is picked to express the font designer's intent as to
         how the font should align with elements above it.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>descent</code></em>;</span></td>
<td> the distance that the font extends below the baseline.
          This value is positive for typical fonts that include
          portions below the baseline. Note that this is not always
          exactly equal to the maximum of the extents of all the
          glyphs in the font, but rather is picked to express the
          font designer's intent as to how the the font should
          align with elements below it.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>height</code></em>;</span></td>
<td> the recommended vertical distance between baselines when
         setting consecutive lines of text with the font. This
         is greater than <em class="parameter"><code>ascent</code></em>+<em class="parameter"><code>descent</code></em> by a
         quantity known as the <em class="firstterm">line spacing</em>
         or <em class="firstterm">external leading</em>. When space
         is at a premium, most fonts can be set with only
         a distance of <em class="parameter"><code>ascent</code></em>+<em class="parameter"><code>descent</code></em> between lines.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>max_x_advance</code></em>;</span></td>
<td> the maximum distance in the X direction that 
        the the origin is advanced for any glyph in the font.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>max_y_advance</code></em>;</span></td>
<td> the maximum distance in the Y direction that
        the the origin is advanced for any glyph in the font.
        this will be zero for normal fonts used for horizontal
        writing. (The scripts of East Asia are sometimes written
        vertically.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858202"></a><h3>
<a name="cairo-scaled-font-extents"></a>cairo_scaled_font_extents ()</h3>
<a class="indexterm" name="id2858211"></a><pre class="programlisting">void        cairo_scaled_font_extents       (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font,
                                             <a href="cairo-Fonts.html#cairo-font-extents-t">cairo_font_extents_t</a> *extents);</pre>
<p>
Gets the metrics for a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-scaled-font-t"><span class="type">cairo_scaled_font_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extents</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-extents-t"><span class="type">cairo_font_extents_t</span></a> which to store the retrieved extents.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858303"></a><h3>
<a name="cairo-text-extents-t"></a>cairo_text_extents_t</h3>
<a class="indexterm" name="id2858312"></a><pre class="programlisting">typedef struct {
    double x_bearing;
    double y_bearing;
    double width;
    double height;
    double x_advance;
    double y_advance;
} cairo_text_extents_t;
</pre>
<p>
The <a href="cairo-Fonts.html#cairo-text-extents-t"><span class="type">cairo_text_extents_t</span></a> structure stores the extents of a single
glyph or a string of glyphs in user-space coordinates. Because text
extents are in user-space coordinates, they are mostly, but not
entirely, independent of the current transformation matrix. If you call
<code class="literal">cairo_scale(cr, 2.0, 2.0)</code>, text will
be drawn twice as big, but the reported text extents will not be
doubled. They will change slightly due to hinting (so you can't
assume that metrics are independent of the transformation matrix),
but otherwise will remain unchanged.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>x_bearing</code></em>;</span></td>
<td> the horizontal distance from the origin to the
  leftmost part of the glyphs as drawn. Positive if the
  glyphs lie entirely to the right of the origin.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>y_bearing</code></em>;</span></td>
<td> the vertical distance from the origin to the
  topmost part of the glyphs as drawn. Positive only if the
  glyphs lie completely below the origin; will usually be
  negative.
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>width</code></em>;</span></td>
<td> width of the glyphs as drawn
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>height</code></em>;</span></td>
<td> height of the glyphs as drawn
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>x_advance</code></em>;</span></td>
<td>distance to advance in the X direction
   after drawing these glyphs
</td>
</tr>
<tr>
<td>
<span class="term">double&#160;<em class="structfield"><code>y_advance</code></em>;</span></td>
<td> distance to advance in the Y direction
  after drawing these glyphs. Will typically be zero except
  for vertical text layout as found in East-Asian languages.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858492"></a><h3>
<a name="cairo-scaled-font-glyph-extents"></a>cairo_scaled_font_glyph_extents ()</h3>
<a class="indexterm" name="id2858503"></a><pre class="programlisting">void        cairo_scaled_font_glyph_extents (<a href="cairo-Fonts.html#cairo-scaled-font-t">cairo_scaled_font_t</a> *scaled_font,
                                             <a href="cairo-cairo-t.html#cairo-glyph-t">cairo_glyph_t</a> *glyphs,
                                             int num_glyphs,
                                             <a href="cairo-Fonts.html#cairo-text-extents-t">cairo_text_extents_t</a> *extents);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>scaled_font</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>glyphs</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>num_glyphs</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>extents</code></em>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858612"></a><h3>
<a name="cairo-font-options-t"></a>cairo_font_options_t</h3>
<a class="indexterm" name="id2858621"></a><pre class="programlisting">typedef struct _cairo_font_options cairo_font_options_t;
</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858637"></a><h3>
<a name="cairo-font-options-create"></a>cairo_font_options_create ()</h3>
<a class="indexterm" name="id2858647"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_create
                                            (void);</pre>
<p>
Allocates a new font options object with all options initialized
 to default values.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a newly allocated <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>. Free with
  <a href="cairo-Fonts.html#cairo-font-options-destroy"><code class="function">cairo_font_options_destroy()</code></a>. This function always returns a
  valid pointer; if memory cannot be allocated, then a special
  error object is returned where all operations on the object do nothing.
  You can check for this with <a href="cairo-Fonts.html#cairo-font-options-status"><code class="function">cairo_font_options_status()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858716"></a><h3>
<a name="cairo-font-options-copy"></a>cairo_font_options_copy ()</h3>
<a class="indexterm" name="id2858725"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a>* cairo_font_options_copy
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *original);</pre>
<p>
Allocates a new font options object copying the option values from
 <em class="parameter"><code>original</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>original</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a newly allocated <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>. Free with
  <a href="cairo-Fonts.html#cairo-font-options-destroy"><code class="function">cairo_font_options_destroy()</code></a>. This function always returns a
  valid pointer; if memory cannot be allocated, then a special
  error object is returned where all operations on the object do nothing.
  You can check for this with <a href="cairo-Fonts.html#cairo-font-options-status"><code class="function">cairo_font_options_status()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858827"></a><h3>
<a name="cairo-font-options-destroy"></a>cairo_font_options_destroy ()</h3>
<a class="indexterm" name="id2858836"></a><pre class="programlisting">void        cairo_font_options_destroy      (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Destroys a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a> object created with with
<a href="cairo-Fonts.html#cairo-font-options-create"><code class="function">cairo_font_options_create()</code></a> or <a href="cairo-Fonts.html#cairo-font-options-copy"><code class="function">cairo_font_options_copy()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2858916"></a><h3>
<a name="cairo-font-options-status"></a>cairo_font_options_status ()</h3>
<a class="indexterm" name="id2858925"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-status-t">cairo_status_t</a> cairo_font_options_status    (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Checks whether an error has previously occurred for this
font options object</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <code class="literal">CAIRO_STATUS_SUCCESS</code> or <code class="literal">CAIRO_STATUS_NO_MEMORY</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859004"></a><h3>
<a name="cairo-font-options-merge"></a>cairo_font_options_merge ()</h3>
<a class="indexterm" name="id2859013"></a><pre class="programlisting">void        cairo_font_options_merge        (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *other);</pre>
<p>
Merges non-default options from <em class="parameter"><code>other</code></em> into <em class="parameter"><code>options</code></em>, replacing
existing values. This operation can be thought of as somewhat
similar to compositing <em class="parameter"><code>other</code></em> onto <em class="parameter"><code>options</code></em> with the operation
of <code class="literal">CAIRO_OPERATION_OVER</code>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>other</code></em>&#160;:</span></td>
<td> another <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859126"></a><h3>
<a name="cairo-font-options-hash"></a>cairo_font_options_hash ()</h3>
<a class="indexterm" name="id2859135"></a><pre class="programlisting">unsigned long cairo_font_options_hash       (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Compute a hash for the font options object; this value will
be useful when storing an object containing a cairo_font_options_t
in a hash table.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the hash value for the font options object.
  The return value can be cast to a 32-bit type if a
  32-bit hash value is needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859207"></a><h3>
<a name="cairo-font-options-equal"></a>cairo_font_options_equal ()</h3>
<a class="indexterm" name="id2859216"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-bool-t">cairo_bool_t</a> cairo_font_options_equal       (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *other);</pre>
<p>
Compares two font options objects for equality.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>other</code></em>&#160;:</span></td>
<td> another <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <code class="literal">TRUE</code> if all fields of the two font options objects match
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859317"></a><h3>
<a name="cairo-font-options-set-antialias"></a>cairo_font_options_set_antialias ()</h3>
<a class="indexterm" name="id2859328"></a><pre class="programlisting">void        cairo_font_options_set_antialias
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> antialias);</pre>
<p>
Sets the antiliasing mode for the font options object. This
specifies the type of antialiasing to do when rendering text.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>antialias</code></em>&#160;:</span></td>
<td> the new antialiasing mode
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859407"></a><h3>
<a name="cairo-font-options-get-antialias"></a>cairo_font_options_get_antialias ()</h3>
<a class="indexterm" name="id2859418"></a><pre class="programlisting"><a href="cairo-cairo-t.html#cairo-antialias-t">cairo_antialias_t</a> cairo_font_options_get_antialias
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Gets the antialising mode for the font options object.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the antialiasing mode
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859486"></a><h3>
<a name="cairo-subpixel-order-t"></a>enum cairo_subpixel_order_t</h3>
<a class="indexterm" name="id2859495"></a><pre class="programlisting">typedef enum _cairo_subpixel_order {
    CAIRO_SUBPIXEL_ORDER_DEFAULT,
    CAIRO_SUBPIXEL_ORDER_RGB,
    CAIRO_SUBPIXEL_ORDER_BGR,
    CAIRO_SUBPIXEL_ORDER_VRGB,
    CAIRO_SUBPIXEL_ORDER_VBGR
} cairo_subpixel_order_t;
</pre>
<p>
The subpixel order specifies the order of color elements within
each pixel on the display device when rendering with an
antialiasing mode of <code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_DEFAULT</code></span></td>
<td> Use the default subpixel order for
  for the target device
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_RGB</code></span></td>
<td> Subpixel elements are arranged horizontally
  with red at the left
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_BGR</code></span></td>
<td>  Subpixel elements are arranged horizontally
  with blue at the left
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_VRGB</code></span></td>
<td> Subpixel elements are arranged vertically
  with red at the top
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_SUBPIXEL_ORDER_VBGR</code></span></td>
<td> Subpixel elements are arranged vertically
  with blue at the top
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859613"></a><h3>
<a name="cairo-font-options-set-subpixel-order"></a>cairo_font_options_set_subpixel_order ()</h3>
<a class="indexterm" name="id2859624"></a><pre class="programlisting">void        cairo_font_options_set_subpixel_order
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> subpixel_order);</pre>
<p>
Sets the subpixel order for the font options object. The subpixel
order specifies the order of color elements within each pixel on
the display device when rendering with an antialiasing mode of
<code class="literal">CAIRO_ANTIALIAS_SUBPIXEL</code>. See the documentation for
<a href="cairo-Fonts.html#cairo-subpixel-order-t"><span class="type">cairo_subpixel_order_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>subpixel_order</code></em>&#160;:</span></td>
<td> the new subpixel order
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859717"></a><h3>
<a name="cairo-font-options-get-subpixel-order"></a>cairo_font_options_get_subpixel_order ()</h3>
<a class="indexterm" name="id2859729"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-subpixel-order-t">cairo_subpixel_order_t</a> cairo_font_options_get_subpixel_order
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Gets the subpixel order for the font options object.
See the documentation for <a href="cairo-Fonts.html#cairo-subpixel-order-t"><span class="type">cairo_subpixel_order_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the subpixel order for the font options object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859804"></a><h3>
<a name="cairo-hint-style-t"></a>enum cairo_hint_style_t</h3>
<a class="indexterm" name="id2859814"></a><pre class="programlisting">typedef enum _cairo_hint_style {
    CAIRO_HINT_STYLE_DEFAULT,
    CAIRO_HINT_STYLE_NONE,
    CAIRO_HINT_STYLE_SLIGHT,
    CAIRO_HINT_STYLE_MEDIUM,
    CAIRO_HINT_STYLE_FULL
} cairo_hint_style_t;
</pre>
<p>
Specifies the type of hinting to do on font outlines. Hinting
is the process of fitting outlines to the pixel grid in order
to improve the appearance of the result. Since hinting outlines
involves distorting them, it also reduces the faithfulness
to the original outline shapes. Not all of the outline hinting
styles are supported by all font backends.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_STYLE_DEFAULT</code></span></td>
<td> Use the default hint style for
  for font backend and target device
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_STYLE_NONE</code></span></td>
<td> Do not hint outlines
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_STYLE_SLIGHT</code></span></td>
<td> Hint outlines slightly to improve
  contrast while retaining good fidelity to the original
  shapes.
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_STYLE_MEDIUM</code></span></td>
<td> Hint outlines with medium strength
  giving a compromise between fidelity to the original shapes
  and contrast
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_STYLE_FULL</code></span></td>
<td> Hint outlines to maximize contrast
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2859928"></a><h3>
<a name="cairo-font-options-set-hint-style"></a>cairo_font_options_set_hint_style ()</h3>
<a class="indexterm" name="id2859940"></a><pre class="programlisting">void        cairo_font_options_set_hint_style
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-hint-style-t">cairo_hint_style_t</a> hint_style);</pre>
<p>
Sets the hint style for font outlines for the font options object.
This controls whether to fit font outlines to the pixel grid,
and if so, whether to optimize for fidelity or contrast.
See the documentation for <a href="cairo-Fonts.html#cairo-hint-style-t"><span class="type">cairo_hint_style_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hint_style</code></em>&#160;:</span></td>
<td> the new hint style
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2860028"></a><h3>
<a name="cairo-font-options-get-hint-style"></a>cairo_font_options_get_hint_style ()</h3>
<a class="indexterm" name="id2860040"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-hint-style-t">cairo_hint_style_t</a> cairo_font_options_get_hint_style
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Gets the hint style for font outlines for the font options object.
See the documentation for <a href="cairo-Fonts.html#cairo-hint-style-t"><span class="type">cairo_hint_style_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the hint style for the font options object
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2860116"></a><h3>
<a name="cairo-hint-metrics-t"></a>enum cairo_hint_metrics_t</h3>
<a class="indexterm" name="id2860125"></a><pre class="programlisting">typedef enum _cairo_hint_metrics {
    CAIRO_HINT_METRICS_DEFAULT,
    CAIRO_HINT_METRICS_OFF,
    CAIRO_HINT_METRICS_ON
} cairo_hint_metrics_t;
</pre>
<p>
Specifies whether to hint font metrics; hinting font metrics
means quantizing them so that they are integer values in
device space. Doing this improves the consistency of
letter and line spacing, however it also means that text
will be laid out differently at different zoom factors.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_METRICS_DEFAULT</code></span></td>
<td> Hint metrics in the default
 manner for the font backend and target device
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_METRICS_OFF</code></span></td>
<td> Do not hint font metrics
</td>
</tr>
<tr>
<td>
<span class="term"><code class="literal">CAIRO_HINT_METRICS_ON</code></span></td>
<td> Hint font metrics
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2860203"></a><h3>
<a name="cairo-font-options-set-hint-metrics"></a>cairo_font_options_set_hint_metrics ()</h3>
<a class="indexterm" name="id2860215"></a><pre class="programlisting">void        cairo_font_options_set_hint_metrics
                                            (<a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options,
                                             <a href="cairo-Fonts.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> hint_metrics);</pre>
<p>
Sets the metrics hinting mode for the font options object. This
controls whether metrics are quantized to integer values in
device units.
See the documentation for <a href="cairo-Fonts.html#cairo-hint-metrics-t"><span class="type">cairo_hint_metrics_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>hint_metrics</code></em>&#160;:</span></td>
<td> the new metrics hinting mode
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2860301"></a><h3>
<a name="cairo-font-options-get-hint-metrics"></a>cairo_font_options_get_hint_metrics ()</h3>
<a class="indexterm" name="id2860313"></a><pre class="programlisting"><a href="cairo-Fonts.html#cairo-hint-metrics-t">cairo_hint_metrics_t</a> cairo_font_options_get_hint_metrics
                                            (const <a href="cairo-Fonts.html#cairo-font-options-t">cairo_font_options_t</a> *options);</pre>
<p>
Gets the metrics hinting mode for the font options object.
See the documentation for <a href="cairo-Fonts.html#cairo-hint-metrics-t"><span class="type">cairo_hint_metrics_t</span></a> for full details.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>options</code></em>&#160;:</span></td>
<td> a <a href="cairo-Fonts.html#cairo-font-options-t"><span class="type">cairo_font_options_t</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the metrics hinting mode for the font options object
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
<td align="left"><a accesskey="p" href="cairo-cairo-matrix-t.html"><b>&lt;&lt;&#160;cairo_matrix_t</b></a></td>
<td align="right"><a accesskey="n" href="cairo-FreeType-Fonts.html"><b>FreeType Fonts&#160;&gt;&gt;</b></a></td>
</tr></table>
</body>
</html>