Debian Codegraph @

docs/reference/ft2-cache_subsystem.html

raw symbols SCIP
1
2 <!doctype html>
3 <html lang="en" class="no-js">
4 <head>
5
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width,initial-scale=1">
8
9 <meta name="description" content="API Reference Documentation for FreeType-2.14.3">
10
11
12 <meta name="author" content="FreeType Contributors">
13
14
15 <link rel="canonical" href="http://freetype.org/freetype2/docs/reference/ft2-cache_subsystem.html">
16
17
18 <link rel="prev" href="ft2-lcd_rendering.html">
19
20
21 <link rel="next" href="ft2-computations.html">
22
23
24 <link rel="icon" href="images/favico.ico">
25 <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.9">
26
27
28
29 <title>Cache Sub-System - FreeType-2.14.3 API Reference</title>
30
31
32
33 <link rel="stylesheet" href="assets/stylesheets/main.4af4bdda.min.css">
34
35
36 <link rel="stylesheet" href="assets/stylesheets/palette.06af60db.min.css">
37
38
39
40
41
42
43
44
45
46
47
48
49 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
50 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
51 <style>:root{--md-text-font:"Noto Serif";--md-code-font:"Roboto Mono"}</style>
52
53
54
55 <link rel="stylesheet" href="stylesheets/extra.css">
56
57 <script>__md_scope=new URL(".",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
58
59
60
61
62
63
64 </head>
65
66
67
68
69
70
71
72 <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="green" data-md-color-accent="green">
73
74
75 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
76 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
77 <label class="md-overlay" for="__drawer"></label>
78 <div data-md-component="skip">
79
80
81 <a href="#cache-sub-system" class="md-skip">
82 Skip to content
83 </a>
84
85 </div>
86 <div data-md-component="announce">
87
88 </div>
89
90
91
92
93
94
95 <header class="md-header md-header--shadow" data-md-component="header">
96 <nav class="md-header__inner md-grid" aria-label="Header">
97 <a href="index.html" title="FreeType-2.14.3 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.14.3 API Reference" data-md-component="logo">
98
99 <img src="images/favico.ico" alt="logo">
100
101 </a>
102 <label class="md-header__button md-icon" for="__drawer">
103
104 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
105 </label>
106 <div class="md-header__title" data-md-component="header-title">
107 <div class="md-header__ellipsis">
108 <div class="md-header__topic">
109 <span class="md-ellipsis">
110 FreeType-2.14.3 API Reference
111 </span>
112 </div>
113 <div class="md-header__topic" data-md-component="header-topic">
114 <span class="md-ellipsis">
115
116 Cache Sub-System
117
118 </span>
119 </div>
120 </div>
121 </div>
122
123
124
125
126
127
128 <label class="md-header__button md-icon" for="__search">
129
130 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
131 </label>
132 <div class="md-search" data-md-component="search" role="dialog">
133 <label class="md-search__overlay" for="__search"></label>
134 <div class="md-search__inner" role="search">
135 <form class="md-search__form" name="search">
136 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
137 <label class="md-search__icon md-icon" for="__search">
138
139 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
140
141 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
142 </label>
143 <nav class="md-search__options" aria-label="Search">
144
145 <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
146
147 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
148 </button>
149 </nav>
150
151 </form>
152 <div class="md-search__output">
153 <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
154 <div class="md-search-result" data-md-component="search-result">
155 <div class="md-search-result__meta">
156 Initializing search
157 </div>
158 <ol class="md-search-result__list" role="presentation"></ol>
159 </div>
160 </div>
161 </div>
162 </div>
163 </div>
164
165
166 </nav>
167
168 </header>
169
170 <div class="md-container" data-md-component="container">
171
172
173
174
175
176
177 <main class="md-main" data-md-component="main">
178 <div class="md-main__inner md-grid">
179
180
181
182 <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
183 <div class="md-sidebar__scrollwrap">
184 <div class="md-sidebar__inner">
185
186
187
188
189 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
190 <label class="md-nav__title" for="__drawer">
191 <a href="index.html" title="FreeType-2.14.3 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.14.3 API Reference" data-md-component="logo">
192
193 <img src="images/favico.ico" alt="logo">
194
195 </a>
196 FreeType-2.14.3 API Reference
197 </label>
198
199 <ul class="md-nav__list" data-md-scrollfix>
200
201
202
203
204
205
206
207 <li class="md-nav__item">
208 <a href="index.html" class="md-nav__link">
209
210
211 <span class="md-ellipsis">
212 TOC
213
214 </span>
215
216
217 </a>
218 </li>
219
220
221
222
223
224
225
226
227
228 <li class="md-nav__item">
229 <a href="ft2-index.html" class="md-nav__link">
230
231
232 <span class="md-ellipsis">
233 Index
234
235 </span>
236
237
238 </a>
239 </li>
240
241
242
243
244
245
246
247
248
249
250
251
252
253 <li class="md-nav__item md-nav__item--nested">
254
255
256
257 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
258
259
260 <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
261
262
263 <span class="md-ellipsis">
264 General Remarks
265
266 </span>
267
268
269 <span class="md-nav__icon md-icon"></span>
270 </label>
271
272 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
273 <label class="md-nav__title" for="__nav_3">
274 <span class="md-nav__icon md-icon"></span>
275 General Remarks
276 </label>
277 <ul class="md-nav__list" data-md-scrollfix>
278
279
280
281
282
283
284
285 <li class="md-nav__item">
286 <a href="ft2-preamble.html" class="md-nav__link">
287
288
289 <span class="md-ellipsis">
290 Preamble
291
292 </span>
293
294
295 </a>
296 </li>
297
298
299
300
301
302
303
304
305
306
307 <li class="md-nav__item">
308 <a href="ft2-header_inclusion.html" class="md-nav__link">
309
310
311 <span class="md-ellipsis">
312 FreeType's header inclusion scheme
313
314 </span>
315
316
317 </a>
318 </li>
319
320
321
322
323
324
325
326
327
328
329 <li class="md-nav__item">
330 <a href="ft2-user_allocation.html" class="md-nav__link">
331
332
333 <span class="md-ellipsis">
334 User allocation
335
336 </span>
337
338
339 </a>
340 </li>
341
342
343
344
345 </ul>
346 </nav>
347
348 </li>
349
350
351
352
353
354
355
356
357
358
359
360
361
362 <li class="md-nav__item md-nav__item--nested">
363
364
365
366 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
367
368
369 <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
370
371
372 <span class="md-ellipsis">
373 Core API
374
375 </span>
376
377
378 <span class="md-nav__icon md-icon"></span>
379 </label>
380
381 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
382 <label class="md-nav__title" for="__nav_4">
383 <span class="md-nav__icon md-icon"></span>
384 Core API
385 </label>
386 <ul class="md-nav__list" data-md-scrollfix>
387
388
389
390
391
392
393
394 <li class="md-nav__item">
395 <a href="ft2-basic_types.html" class="md-nav__link">
396
397
398 <span class="md-ellipsis">
399 Basic Data Types
400
401 </span>
402
403
404 </a>
405 </li>
406
407
408
409
410
411
412
413
414
415
416 <li class="md-nav__item">
417 <a href="ft2-library_setup.html" class="md-nav__link">
418
419
420 <span class="md-ellipsis">
421 Library Setup
422
423 </span>
424
425
426 </a>
427 </li>
428
429
430
431
432
433
434
435
436
437
438 <li class="md-nav__item">
439 <a href="ft2-face_creation.html" class="md-nav__link">
440
441
442 <span class="md-ellipsis">
443 Face Creation
444
445 </span>
446
447
448 </a>
449 </li>
450
451
452
453
454
455
456
457
458
459
460 <li class="md-nav__item">
461 <a href="ft2-font_testing_macros.html" class="md-nav__link">
462
463
464 <span class="md-ellipsis">
465 Font Testing Macros
466
467 </span>
468
469
470 </a>
471 </li>
472
473
474
475
476
477
478
479
480
481
482 <li class="md-nav__item">
483 <a href="ft2-sizing_and_scaling.html" class="md-nav__link">
484
485
486 <span class="md-ellipsis">
487 Sizing and Scaling
488
489 </span>
490
491
492 </a>
493 </li>
494
495
496
497
498
499
500
501
502
503
504 <li class="md-nav__item">
505 <a href="ft2-glyph_retrieval.html" class="md-nav__link">
506
507
508 <span class="md-ellipsis">
509 Glyph Retrieval
510
511 </span>
512
513
514 </a>
515 </li>
516
517
518
519
520
521
522
523
524
525
526 <li class="md-nav__item">
527 <a href="ft2-character_mapping.html" class="md-nav__link">
528
529
530 <span class="md-ellipsis">
531 Character Mapping
532
533 </span>
534
535
536 </a>
537 </li>
538
539
540
541
542
543
544
545
546
547
548 <li class="md-nav__item">
549 <a href="ft2-information_retrieval.html" class="md-nav__link">
550
551
552 <span class="md-ellipsis">
553 Information Retrieval
554
555 </span>
556
557
558 </a>
559 </li>
560
561
562
563
564
565
566
567
568
569
570 <li class="md-nav__item">
571 <a href="ft2-other_api_data.html" class="md-nav__link">
572
573
574 <span class="md-ellipsis">
575 Other API Data
576
577 </span>
578
579
580 </a>
581 </li>
582
583
584
585
586 </ul>
587 </nav>
588
589 </li>
590
591
592
593
594
595
596
597
598
599
600
601
602
603 <li class="md-nav__item md-nav__item--nested">
604
605
606
607 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
608
609
610 <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
611
612
613 <span class="md-ellipsis">
614 Extended API
615
616 </span>
617
618
619 <span class="md-nav__icon md-icon"></span>
620 </label>
621
622 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
623 <label class="md-nav__title" for="__nav_5">
624 <span class="md-nav__icon md-icon"></span>
625 Extended API
626 </label>
627 <ul class="md-nav__list" data-md-scrollfix>
628
629
630
631
632
633
634
635 <li class="md-nav__item">
636 <a href="ft2-glyph_variants.html" class="md-nav__link">
637
638
639 <span class="md-ellipsis">
640 Unicode Variation Sequences
641
642 </span>
643
644
645 </a>
646 </li>
647
648
649
650
651
652
653
654
655
656
657 <li class="md-nav__item">
658 <a href="ft2-color_management.html" class="md-nav__link">
659
660
661 <span class="md-ellipsis">
662 Glyph Color Management
663
664 </span>
665
666
667 </a>
668 </li>
669
670
671
672
673
674
675
676
677
678
679 <li class="md-nav__item">
680 <a href="ft2-layer_management.html" class="md-nav__link">
681
682
683 <span class="md-ellipsis">
684 Glyph Layer Management
685
686 </span>
687
688
689 </a>
690 </li>
691
692
693
694
695
696
697
698
699
700
701 <li class="md-nav__item">
702 <a href="ft2-glyph_management.html" class="md-nav__link">
703
704
705 <span class="md-ellipsis">
706 Glyph Management
707
708 </span>
709
710
711 </a>
712 </li>
713
714
715
716
717
718
719
720
721
722
723 <li class="md-nav__item">
724 <a href="ft2-mac_specific.html" class="md-nav__link">
725
726
727 <span class="md-ellipsis">
728 Mac Specific Interface
729
730 </span>
731
732
733 </a>
734 </li>
735
736
737
738
739
740
741
742
743
744
745 <li class="md-nav__item">
746 <a href="ft2-sizes_management.html" class="md-nav__link">
747
748
749 <span class="md-ellipsis">
750 Size Management
751
752 </span>
753
754
755 </a>
756 </li>
757
758
759
760
761
762
763
764
765
766
767 <li class="md-nav__item">
768 <a href="ft2-header_file_macros.html" class="md-nav__link">
769
770
771 <span class="md-ellipsis">
772 Header File Macros
773
774 </span>
775
776
777 </a>
778 </li>
779
780
781
782
783 </ul>
784 </nav>
785
786 </li>
787
788
789
790
791
792
793
794
795
796
797
798
799
800 <li class="md-nav__item md-nav__item--nested">
801
802
803
804 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_6" >
805
806
807 <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="0">
808
809
810 <span class="md-ellipsis">
811 Format-Specific API
812
813 </span>
814
815
816 <span class="md-nav__icon md-icon"></span>
817 </label>
818
819 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
820 <label class="md-nav__title" for="__nav_6">
821 <span class="md-nav__icon md-icon"></span>
822 Format-Specific API
823 </label>
824 <ul class="md-nav__list" data-md-scrollfix>
825
826
827
828
829
830
831
832 <li class="md-nav__item">
833 <a href="ft2-multiple_masters.html" class="md-nav__link">
834
835
836 <span class="md-ellipsis">
837 OpenType Font Variations, TrueType GX, and Adobe MM Fonts
838
839 </span>
840
841
842 </a>
843 </li>
844
845
846
847
848
849
850
851
852
853
854 <li class="md-nav__item">
855 <a href="ft2-truetype_tables.html" class="md-nav__link">
856
857
858 <span class="md-ellipsis">
859 TrueType Tables
860
861 </span>
862
863
864 </a>
865 </li>
866
867
868
869
870
871
872
873
874
875
876 <li class="md-nav__item">
877 <a href="ft2-type1_tables.html" class="md-nav__link">
878
879
880 <span class="md-ellipsis">
881 Type 1 Tables
882
883 </span>
884
885
886 </a>
887 </li>
888
889
890
891
892
893
894
895
896
897
898 <li class="md-nav__item">
899 <a href="ft2-sfnt_names.html" class="md-nav__link">
900
901
902 <span class="md-ellipsis">
903 SFNT Names
904
905 </span>
906
907
908 </a>
909 </li>
910
911
912
913
914
915
916
917
918
919
920 <li class="md-nav__item">
921 <a href="ft2-bdf_fonts.html" class="md-nav__link">
922
923
924 <span class="md-ellipsis">
925 BDF and PCF Files
926
927 </span>
928
929
930 </a>
931 </li>
932
933
934
935
936
937
938
939
940
941
942 <li class="md-nav__item">
943 <a href="ft2-cid_fonts.html" class="md-nav__link">
944
945
946 <span class="md-ellipsis">
947 CID Fonts
948
949 </span>
950
951
952 </a>
953 </li>
954
955
956
957
958
959
960
961
962
963
964 <li class="md-nav__item">
965 <a href="ft2-pfr_fonts.html" class="md-nav__link">
966
967
968 <span class="md-ellipsis">
969 PFR Fonts
970
971 </span>
972
973
974 </a>
975 </li>
976
977
978
979
980
981
982
983
984
985
986 <li class="md-nav__item">
987 <a href="ft2-winfnt_fonts.html" class="md-nav__link">
988
989
990 <span class="md-ellipsis">
991 Window FNT Files
992
993 </span>
994
995
996 </a>
997 </li>
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008 <li class="md-nav__item">
1009 <a href="ft2-svg_fonts.html" class="md-nav__link">
1010
1011
1012 <span class="md-ellipsis">
1013 OpenType SVG Fonts
1014
1015 </span>
1016
1017
1018 </a>
1019 </li>
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030 <li class="md-nav__item">
1031 <a href="ft2-font_formats.html" class="md-nav__link">
1032
1033
1034 <span class="md-ellipsis">
1035 Font Formats
1036
1037 </span>
1038
1039
1040 </a>
1041 </li>
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052 <li class="md-nav__item">
1053 <a href="ft2-gasp_table.html" class="md-nav__link">
1054
1055
1056 <span class="md-ellipsis">
1057 Gasp Table
1058
1059 </span>
1060
1061
1062 </a>
1063 </li>
1064
1065
1066
1067
1068 </ul>
1069 </nav>
1070
1071 </li>
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085 <li class="md-nav__item md-nav__item--nested">
1086
1087
1088
1089 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
1090
1091
1092 <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
1093
1094
1095 <span class="md-ellipsis">
1096 Controlling FreeType Modules
1097
1098 </span>
1099
1100
1101 <span class="md-nav__icon md-icon"></span>
1102 </label>
1103
1104 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
1105 <label class="md-nav__title" for="__nav_7">
1106 <span class="md-nav__icon md-icon"></span>
1107 Controlling FreeType Modules
1108 </label>
1109 <ul class="md-nav__list" data-md-scrollfix>
1110
1111
1112
1113
1114
1115
1116
1117 <li class="md-nav__item">
1118 <a href="ft2-auto_hinter.html" class="md-nav__link">
1119
1120
1121 <span class="md-ellipsis">
1122 The auto-hinter
1123
1124 </span>
1125
1126
1127 </a>
1128 </li>
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139 <li class="md-nav__item">
1140 <a href="ft2-cff_driver.html" class="md-nav__link">
1141
1142
1143 <span class="md-ellipsis">
1144 The CFF driver
1145
1146 </span>
1147
1148
1149 </a>
1150 </li>
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161 <li class="md-nav__item">
1162 <a href="ft2-t1_cid_driver.html" class="md-nav__link">
1163
1164
1165 <span class="md-ellipsis">
1166 The Type 1 and CID drivers
1167
1168 </span>
1169
1170
1171 </a>
1172 </li>
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183 <li class="md-nav__item">
1184 <a href="ft2-tt_driver.html" class="md-nav__link">
1185
1186
1187 <span class="md-ellipsis">
1188 The TrueType driver
1189
1190 </span>
1191
1192
1193 </a>
1194 </li>
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205 <li class="md-nav__item">
1206 <a href="ft2-pcf_driver.html" class="md-nav__link">
1207
1208
1209 <span class="md-ellipsis">
1210 The PCF driver
1211
1212 </span>
1213
1214
1215 </a>
1216 </li>
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227 <li class="md-nav__item">
1228 <a href="ft2-ot_svg_driver.html" class="md-nav__link">
1229
1230
1231 <span class="md-ellipsis">
1232 The SVG driver
1233
1234 </span>
1235
1236
1237 </a>
1238 </li>
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249 <li class="md-nav__item">
1250 <a href="ft2-properties.html" class="md-nav__link">
1251
1252
1253 <span class="md-ellipsis">
1254 Driver properties
1255
1256 </span>
1257
1258
1259 </a>
1260 </li>
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271 <li class="md-nav__item">
1272 <a href="ft2-parameter_tags.html" class="md-nav__link">
1273
1274
1275 <span class="md-ellipsis">
1276 Parameter Tags
1277
1278 </span>
1279
1280
1281 </a>
1282 </li>
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293 <li class="md-nav__item">
1294 <a href="ft2-lcd_rendering.html" class="md-nav__link">
1295
1296
1297 <span class="md-ellipsis">
1298 Subpixel Rendering
1299
1300 </span>
1301
1302
1303 </a>
1304 </li>
1305
1306
1307
1308
1309 </ul>
1310 </nav>
1311
1312 </li>
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
1329
1330
1331
1332 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" checked>
1333
1334
1335 <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
1336
1337
1338 <span class="md-ellipsis">
1339 Cache Sub-System
1340
1341 </span>
1342
1343
1344 <span class="md-nav__icon md-icon"></span>
1345 </label>
1346
1347 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="true">
1348 <label class="md-nav__title" for="__nav_8">
1349 <span class="md-nav__icon md-icon"></span>
1350 Cache Sub-System
1351 </label>
1352 <ul class="md-nav__list" data-md-scrollfix>
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362 <li class="md-nav__item md-nav__item--active">
1363
1364 <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
1365
1366
1367
1368
1369
1370 <label class="md-nav__link md-nav__link--active" for="__toc">
1371
1372
1373 <span class="md-ellipsis">
1374 Cache Sub-System
1375
1376 </span>
1377
1378
1379 <span class="md-nav__icon md-icon"></span>
1380 </label>
1381
1382 <a href="ft2-cache_subsystem.html" class="md-nav__link md-nav__link--active">
1383
1384
1385 <span class="md-ellipsis">
1386 Cache Sub-System
1387
1388 </span>
1389
1390
1391 </a>
1392
1393
1394
1395 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1396
1397
1398
1399
1400
1401
1402 <label class="md-nav__title" for="__toc">
1403 <span class="md-nav__icon md-icon"></span>
1404 Table of contents
1405 </label>
1406 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1407
1408 <li class="md-nav__item">
1409 <a href="#synopsis" class="md-nav__link">
1410 <span class="md-ellipsis">
1411 Synopsis
1412 </span>
1413 </a>
1414
1415 </li>
1416
1417 <li class="md-nav__item">
1418 <a href="#ftc_manager" class="md-nav__link">
1419 <span class="md-ellipsis">
1420 FTC_Manager
1421 </span>
1422 </a>
1423
1424 </li>
1425
1426 <li class="md-nav__item">
1427 <a href="#ftc_faceid" class="md-nav__link">
1428 <span class="md-ellipsis">
1429 FTC_FaceID
1430 </span>
1431 </a>
1432
1433 </li>
1434
1435 <li class="md-nav__item">
1436 <a href="#ftc_face_requester" class="md-nav__link">
1437 <span class="md-ellipsis">
1438 FTC_Face_Requester
1439 </span>
1440 </a>
1441
1442 </li>
1443
1444 <li class="md-nav__item">
1445 <a href="#ftc_manager_new" class="md-nav__link">
1446 <span class="md-ellipsis">
1447 FTC_Manager_New
1448 </span>
1449 </a>
1450
1451 </li>
1452
1453 <li class="md-nav__item">
1454 <a href="#ftc_manager_reset" class="md-nav__link">
1455 <span class="md-ellipsis">
1456 FTC_Manager_Reset
1457 </span>
1458 </a>
1459
1460 </li>
1461
1462 <li class="md-nav__item">
1463 <a href="#ftc_manager_done" class="md-nav__link">
1464 <span class="md-ellipsis">
1465 FTC_Manager_Done
1466 </span>
1467 </a>
1468
1469 </li>
1470
1471 <li class="md-nav__item">
1472 <a href="#ftc_manager_lookupface" class="md-nav__link">
1473 <span class="md-ellipsis">
1474 FTC_Manager_LookupFace
1475 </span>
1476 </a>
1477
1478 </li>
1479
1480 <li class="md-nav__item">
1481 <a href="#ftc_manager_lookupsize" class="md-nav__link">
1482 <span class="md-ellipsis">
1483 FTC_Manager_LookupSize
1484 </span>
1485 </a>
1486
1487 </li>
1488
1489 <li class="md-nav__item">
1490 <a href="#ftc_manager_removefaceid" class="md-nav__link">
1491 <span class="md-ellipsis">
1492 FTC_Manager_RemoveFaceID
1493 </span>
1494 </a>
1495
1496 </li>
1497
1498 <li class="md-nav__item">
1499 <a href="#ftc_node" class="md-nav__link">
1500 <span class="md-ellipsis">
1501 FTC_Node
1502 </span>
1503 </a>
1504
1505 </li>
1506
1507 <li class="md-nav__item">
1508 <a href="#ftc_node_unref" class="md-nav__link">
1509 <span class="md-ellipsis">
1510 FTC_Node_Unref
1511 </span>
1512 </a>
1513
1514 </li>
1515
1516 <li class="md-nav__item">
1517 <a href="#ftc_imagecache" class="md-nav__link">
1518 <span class="md-ellipsis">
1519 FTC_ImageCache
1520 </span>
1521 </a>
1522
1523 </li>
1524
1525 <li class="md-nav__item">
1526 <a href="#ftc_imagecache_new" class="md-nav__link">
1527 <span class="md-ellipsis">
1528 FTC_ImageCache_New
1529 </span>
1530 </a>
1531
1532 </li>
1533
1534 <li class="md-nav__item">
1535 <a href="#ftc_imagecache_lookup" class="md-nav__link">
1536 <span class="md-ellipsis">
1537 FTC_ImageCache_Lookup
1538 </span>
1539 </a>
1540
1541 </li>
1542
1543 <li class="md-nav__item">
1544 <a href="#ftc_sbit" class="md-nav__link">
1545 <span class="md-ellipsis">
1546 FTC_SBit
1547 </span>
1548 </a>
1549
1550 </li>
1551
1552 <li class="md-nav__item">
1553 <a href="#ftc_sbitcache" class="md-nav__link">
1554 <span class="md-ellipsis">
1555 FTC_SBitCache
1556 </span>
1557 </a>
1558
1559 </li>
1560
1561 <li class="md-nav__item">
1562 <a href="#ftc_sbitcache_new" class="md-nav__link">
1563 <span class="md-ellipsis">
1564 FTC_SBitCache_New
1565 </span>
1566 </a>
1567
1568 </li>
1569
1570 <li class="md-nav__item">
1571 <a href="#ftc_sbitcache_lookup" class="md-nav__link">
1572 <span class="md-ellipsis">
1573 FTC_SBitCache_Lookup
1574 </span>
1575 </a>
1576
1577 </li>
1578
1579 <li class="md-nav__item">
1580 <a href="#ftc_cmapcache" class="md-nav__link">
1581 <span class="md-ellipsis">
1582 FTC_CMapCache
1583 </span>
1584 </a>
1585
1586 </li>
1587
1588 <li class="md-nav__item">
1589 <a href="#ftc_cmapcache_new" class="md-nav__link">
1590 <span class="md-ellipsis">
1591 FTC_CMapCache_New
1592 </span>
1593 </a>
1594
1595 </li>
1596
1597 <li class="md-nav__item">
1598 <a href="#ftc_cmapcache_lookup" class="md-nav__link">
1599 <span class="md-ellipsis">
1600 FTC_CMapCache_Lookup
1601 </span>
1602 </a>
1603
1604 </li>
1605
1606 <li class="md-nav__item">
1607 <a href="#ftc_scalerrec" class="md-nav__link">
1608 <span class="md-ellipsis">
1609 FTC_ScalerRec
1610 </span>
1611 </a>
1612
1613 </li>
1614
1615 <li class="md-nav__item">
1616 <a href="#ftc_scaler" class="md-nav__link">
1617 <span class="md-ellipsis">
1618 FTC_Scaler
1619 </span>
1620 </a>
1621
1622 </li>
1623
1624 <li class="md-nav__item">
1625 <a href="#ftc_imagetyperec" class="md-nav__link">
1626 <span class="md-ellipsis">
1627 FTC_ImageTypeRec
1628 </span>
1629 </a>
1630
1631 </li>
1632
1633 <li class="md-nav__item">
1634 <a href="#ftc_imagetype" class="md-nav__link">
1635 <span class="md-ellipsis">
1636 FTC_ImageType
1637 </span>
1638 </a>
1639
1640 </li>
1641
1642 <li class="md-nav__item">
1643 <a href="#ftc_imagecache_lookupscaler" class="md-nav__link">
1644 <span class="md-ellipsis">
1645 FTC_ImageCache_LookupScaler
1646 </span>
1647 </a>
1648
1649 </li>
1650
1651 <li class="md-nav__item">
1652 <a href="#ftc_sbitrec" class="md-nav__link">
1653 <span class="md-ellipsis">
1654 FTC_SBitRec
1655 </span>
1656 </a>
1657
1658 </li>
1659
1660 <li class="md-nav__item">
1661 <a href="#ftc_sbitcache_lookupscaler" class="md-nav__link">
1662 <span class="md-ellipsis">
1663 FTC_SBitCache_LookupScaler
1664 </span>
1665 </a>
1666
1667 </li>
1668
1669 </ul>
1670
1671 </nav>
1672
1673 </li>
1674
1675
1676
1677
1678 </ul>
1679 </nav>
1680
1681 </li>
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695 <li class="md-nav__item md-nav__item--nested">
1696
1697
1698
1699 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" >
1700
1701
1702 <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0">
1703
1704
1705 <span class="md-ellipsis">
1706 Support API
1707
1708 </span>
1709
1710
1711 <span class="md-nav__icon md-icon"></span>
1712 </label>
1713
1714 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
1715 <label class="md-nav__title" for="__nav_9">
1716 <span class="md-nav__icon md-icon"></span>
1717 Support API
1718 </label>
1719 <ul class="md-nav__list" data-md-scrollfix>
1720
1721
1722
1723
1724
1725
1726
1727 <li class="md-nav__item">
1728 <a href="ft2-computations.html" class="md-nav__link">
1729
1730
1731 <span class="md-ellipsis">
1732 Computations
1733
1734 </span>
1735
1736
1737 </a>
1738 </li>
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749 <li class="md-nav__item">
1750 <a href="ft2-list_processing.html" class="md-nav__link">
1751
1752
1753 <span class="md-ellipsis">
1754 List Processing
1755
1756 </span>
1757
1758
1759 </a>
1760 </li>
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771 <li class="md-nav__item">
1772 <a href="ft2-outline_processing.html" class="md-nav__link">
1773
1774
1775 <span class="md-ellipsis">
1776 Outline Processing
1777
1778 </span>
1779
1780
1781 </a>
1782 </li>
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793 <li class="md-nav__item">
1794 <a href="ft2-quick_advance.html" class="md-nav__link">
1795
1796
1797 <span class="md-ellipsis">
1798 Quick retrieval of advance values
1799
1800 </span>
1801
1802
1803 </a>
1804 </li>
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815 <li class="md-nav__item">
1816 <a href="ft2-bitmap_handling.html" class="md-nav__link">
1817
1818
1819 <span class="md-ellipsis">
1820 Bitmap Handling
1821
1822 </span>
1823
1824
1825 </a>
1826 </li>
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837 <li class="md-nav__item">
1838 <a href="ft2-raster.html" class="md-nav__link">
1839
1840
1841 <span class="md-ellipsis">
1842 Scanline Converter
1843
1844 </span>
1845
1846
1847 </a>
1848 </li>
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859 <li class="md-nav__item">
1860 <a href="ft2-glyph_stroker.html" class="md-nav__link">
1861
1862
1863 <span class="md-ellipsis">
1864 Glyph Stroker
1865
1866 </span>
1867
1868
1869 </a>
1870 </li>
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881 <li class="md-nav__item">
1882 <a href="ft2-system_interface.html" class="md-nav__link">
1883
1884
1885 <span class="md-ellipsis">
1886 System Interface
1887
1888 </span>
1889
1890
1891 </a>
1892 </li>
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903 <li class="md-nav__item">
1904 <a href="ft2-module_management.html" class="md-nav__link">
1905
1906
1907 <span class="md-ellipsis">
1908 Module Management
1909
1910 </span>
1911
1912
1913 </a>
1914 </li>
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925 <li class="md-nav__item">
1926 <a href="ft2-gzip.html" class="md-nav__link">
1927
1928
1929 <span class="md-ellipsis">
1930 GZIP Streams
1931
1932 </span>
1933
1934
1935 </a>
1936 </li>
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947 <li class="md-nav__item">
1948 <a href="ft2-lzw.html" class="md-nav__link">
1949
1950
1951 <span class="md-ellipsis">
1952 LZW Streams
1953
1954 </span>
1955
1956
1957 </a>
1958 </li>
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969 <li class="md-nav__item">
1970 <a href="ft2-bzip2.html" class="md-nav__link">
1971
1972
1973 <span class="md-ellipsis">
1974 BZIP2 Streams
1975
1976 </span>
1977
1978
1979 </a>
1980 </li>
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991 <li class="md-nav__item">
1992 <a href="ft2-debugging_apis.html" class="md-nav__link">
1993
1994
1995 <span class="md-ellipsis">
1996 External Debugging APIs
1997
1998 </span>
1999
2000
2001 </a>
2002 </li>
2003
2004
2005
2006
2007 </ul>
2008 </nav>
2009
2010 </li>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024 <li class="md-nav__item md-nav__item--nested">
2025
2026
2027
2028 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
2029
2030
2031 <label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
2032
2033
2034 <span class="md-ellipsis">
2035 Error Codes
2036
2037 </span>
2038
2039
2040 <span class="md-nav__icon md-icon"></span>
2041 </label>
2042
2043 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
2044 <label class="md-nav__title" for="__nav_10">
2045 <span class="md-nav__icon md-icon"></span>
2046 Error Codes
2047 </label>
2048 <ul class="md-nav__list" data-md-scrollfix>
2049
2050
2051
2052
2053
2054
2055
2056 <li class="md-nav__item">
2057 <a href="ft2-error_enumerations.html" class="md-nav__link">
2058
2059
2060 <span class="md-ellipsis">
2061 Error Enumerations
2062
2063 </span>
2064
2065
2066 </a>
2067 </li>
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078 <li class="md-nav__item">
2079 <a href="ft2-error_code_values.html" class="md-nav__link">
2080
2081
2082 <span class="md-ellipsis">
2083 Error Code Values
2084
2085 </span>
2086
2087
2088 </a>
2089 </li>
2090
2091
2092
2093
2094 </ul>
2095 </nav>
2096
2097 </li>
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111 <li class="md-nav__item md-nav__item--nested">
2112
2113
2114
2115 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_11" >
2116
2117
2118 <label class="md-nav__link" for="__nav_11" id="__nav_11_label" tabindex="0">
2119
2120
2121 <span class="md-ellipsis">
2122 Miscellaneous
2123
2124 </span>
2125
2126
2127 <span class="md-nav__icon md-icon"></span>
2128 </label>
2129
2130 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_11_label" aria-expanded="false">
2131 <label class="md-nav__title" for="__nav_11">
2132 <span class="md-nav__icon md-icon"></span>
2133 Miscellaneous
2134 </label>
2135 <ul class="md-nav__list" data-md-scrollfix>
2136
2137
2138
2139
2140
2141
2142
2143 <li class="md-nav__item">
2144 <a href="ft2-gx_validation.html" class="md-nav__link">
2145
2146
2147 <span class="md-ellipsis">
2148 TrueTypeGX/AAT Validation
2149
2150 </span>
2151
2152
2153 </a>
2154 </li>
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165 <li class="md-nav__item">
2166 <a href="ft2-incremental.html" class="md-nav__link">
2167
2168
2169 <span class="md-ellipsis">
2170 Incremental Loading
2171
2172 </span>
2173
2174
2175 </a>
2176 </li>
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187 <li class="md-nav__item">
2188 <a href="ft2-truetype_engine.html" class="md-nav__link">
2189
2190
2191 <span class="md-ellipsis">
2192 The TrueType Engine
2193
2194 </span>
2195
2196
2197 </a>
2198 </li>
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209 <li class="md-nav__item">
2210 <a href="ft2-ot_validation.html" class="md-nav__link">
2211
2212
2213 <span class="md-ellipsis">
2214 OpenType Validation
2215
2216 </span>
2217
2218
2219 </a>
2220 </li>
2221
2222
2223
2224
2225 </ul>
2226 </nav>
2227
2228 </li>
2229
2230
2231
2232 </ul>
2233 </nav>
2234 </div>
2235 </div>
2236 </div>
2237
2238
2239
2240 <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
2241 <div class="md-sidebar__scrollwrap">
2242 <div class="md-sidebar__inner">
2243
2244
2245 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
2246
2247
2248
2249
2250
2251
2252 <label class="md-nav__title" for="__toc">
2253 <span class="md-nav__icon md-icon"></span>
2254 Table of contents
2255 </label>
2256 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
2257
2258 <li class="md-nav__item">
2259 <a href="#synopsis" class="md-nav__link">
2260 <span class="md-ellipsis">
2261 Synopsis
2262 </span>
2263 </a>
2264
2265 </li>
2266
2267 <li class="md-nav__item">
2268 <a href="#ftc_manager" class="md-nav__link">
2269 <span class="md-ellipsis">
2270 FTC_Manager
2271 </span>
2272 </a>
2273
2274 </li>
2275
2276 <li class="md-nav__item">
2277 <a href="#ftc_faceid" class="md-nav__link">
2278 <span class="md-ellipsis">
2279 FTC_FaceID
2280 </span>
2281 </a>
2282
2283 </li>
2284
2285 <li class="md-nav__item">
2286 <a href="#ftc_face_requester" class="md-nav__link">
2287 <span class="md-ellipsis">
2288 FTC_Face_Requester
2289 </span>
2290 </a>
2291
2292 </li>
2293
2294 <li class="md-nav__item">
2295 <a href="#ftc_manager_new" class="md-nav__link">
2296 <span class="md-ellipsis">
2297 FTC_Manager_New
2298 </span>
2299 </a>
2300
2301 </li>
2302
2303 <li class="md-nav__item">
2304 <a href="#ftc_manager_reset" class="md-nav__link">
2305 <span class="md-ellipsis">
2306 FTC_Manager_Reset
2307 </span>
2308 </a>
2309
2310 </li>
2311
2312 <li class="md-nav__item">
2313 <a href="#ftc_manager_done" class="md-nav__link">
2314 <span class="md-ellipsis">
2315 FTC_Manager_Done
2316 </span>
2317 </a>
2318
2319 </li>
2320
2321 <li class="md-nav__item">
2322 <a href="#ftc_manager_lookupface" class="md-nav__link">
2323 <span class="md-ellipsis">
2324 FTC_Manager_LookupFace
2325 </span>
2326 </a>
2327
2328 </li>
2329
2330 <li class="md-nav__item">
2331 <a href="#ftc_manager_lookupsize" class="md-nav__link">
2332 <span class="md-ellipsis">
2333 FTC_Manager_LookupSize
2334 </span>
2335 </a>
2336
2337 </li>
2338
2339 <li class="md-nav__item">
2340 <a href="#ftc_manager_removefaceid" class="md-nav__link">
2341 <span class="md-ellipsis">
2342 FTC_Manager_RemoveFaceID
2343 </span>
2344 </a>
2345
2346 </li>
2347
2348 <li class="md-nav__item">
2349 <a href="#ftc_node" class="md-nav__link">
2350 <span class="md-ellipsis">
2351 FTC_Node
2352 </span>
2353 </a>
2354
2355 </li>
2356
2357 <li class="md-nav__item">
2358 <a href="#ftc_node_unref" class="md-nav__link">
2359 <span class="md-ellipsis">
2360 FTC_Node_Unref
2361 </span>
2362 </a>
2363
2364 </li>
2365
2366 <li class="md-nav__item">
2367 <a href="#ftc_imagecache" class="md-nav__link">
2368 <span class="md-ellipsis">
2369 FTC_ImageCache
2370 </span>
2371 </a>
2372
2373 </li>
2374
2375 <li class="md-nav__item">
2376 <a href="#ftc_imagecache_new" class="md-nav__link">
2377 <span class="md-ellipsis">
2378 FTC_ImageCache_New
2379 </span>
2380 </a>
2381
2382 </li>
2383
2384 <li class="md-nav__item">
2385 <a href="#ftc_imagecache_lookup" class="md-nav__link">
2386 <span class="md-ellipsis">
2387 FTC_ImageCache_Lookup
2388 </span>
2389 </a>
2390
2391 </li>
2392
2393 <li class="md-nav__item">
2394 <a href="#ftc_sbit" class="md-nav__link">
2395 <span class="md-ellipsis">
2396 FTC_SBit
2397 </span>
2398 </a>
2399
2400 </li>
2401
2402 <li class="md-nav__item">
2403 <a href="#ftc_sbitcache" class="md-nav__link">
2404 <span class="md-ellipsis">
2405 FTC_SBitCache
2406 </span>
2407 </a>
2408
2409 </li>
2410
2411 <li class="md-nav__item">
2412 <a href="#ftc_sbitcache_new" class="md-nav__link">
2413 <span class="md-ellipsis">
2414 FTC_SBitCache_New
2415 </span>
2416 </a>
2417
2418 </li>
2419
2420 <li class="md-nav__item">
2421 <a href="#ftc_sbitcache_lookup" class="md-nav__link">
2422 <span class="md-ellipsis">
2423 FTC_SBitCache_Lookup
2424 </span>
2425 </a>
2426
2427 </li>
2428
2429 <li class="md-nav__item">
2430 <a href="#ftc_cmapcache" class="md-nav__link">
2431 <span class="md-ellipsis">
2432 FTC_CMapCache
2433 </span>
2434 </a>
2435
2436 </li>
2437
2438 <li class="md-nav__item">
2439 <a href="#ftc_cmapcache_new" class="md-nav__link">
2440 <span class="md-ellipsis">
2441 FTC_CMapCache_New
2442 </span>
2443 </a>
2444
2445 </li>
2446
2447 <li class="md-nav__item">
2448 <a href="#ftc_cmapcache_lookup" class="md-nav__link">
2449 <span class="md-ellipsis">
2450 FTC_CMapCache_Lookup
2451 </span>
2452 </a>
2453
2454 </li>
2455
2456 <li class="md-nav__item">
2457 <a href="#ftc_scalerrec" class="md-nav__link">
2458 <span class="md-ellipsis">
2459 FTC_ScalerRec
2460 </span>
2461 </a>
2462
2463 </li>
2464
2465 <li class="md-nav__item">
2466 <a href="#ftc_scaler" class="md-nav__link">
2467 <span class="md-ellipsis">
2468 FTC_Scaler
2469 </span>
2470 </a>
2471
2472 </li>
2473
2474 <li class="md-nav__item">
2475 <a href="#ftc_imagetyperec" class="md-nav__link">
2476 <span class="md-ellipsis">
2477 FTC_ImageTypeRec
2478 </span>
2479 </a>
2480
2481 </li>
2482
2483 <li class="md-nav__item">
2484 <a href="#ftc_imagetype" class="md-nav__link">
2485 <span class="md-ellipsis">
2486 FTC_ImageType
2487 </span>
2488 </a>
2489
2490 </li>
2491
2492 <li class="md-nav__item">
2493 <a href="#ftc_imagecache_lookupscaler" class="md-nav__link">
2494 <span class="md-ellipsis">
2495 FTC_ImageCache_LookupScaler
2496 </span>
2497 </a>
2498
2499 </li>
2500
2501 <li class="md-nav__item">
2502 <a href="#ftc_sbitrec" class="md-nav__link">
2503 <span class="md-ellipsis">
2504 FTC_SBitRec
2505 </span>
2506 </a>
2507
2508 </li>
2509
2510 <li class="md-nav__item">
2511 <a href="#ftc_sbitcache_lookupscaler" class="md-nav__link">
2512 <span class="md-ellipsis">
2513 FTC_SBitCache_LookupScaler
2514 </span>
2515 </a>
2516
2517 </li>
2518
2519 </ul>
2520
2521 </nav>
2522 </div>
2523 </div>
2524 </div>
2525
2526
2527
2528 <div class="md-content" data-md-component="content">
2529 <article class="md-content__inner md-typeset">
2530
2531
2532
2533
2534
2535 <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#cache-sub-system">Cache Sub-System</a> &raquo; Cache Sub-System</p>
2536 <hr />
2537 <h1 id="cache-sub-system">Cache Sub-System<a class="headerlink" href="#cache-sub-system" title="Permanent link">&para;</a></h1>
2538 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
2539 <p>This section describes the FreeType&nbsp;2 cache sub-system, which is used to limit the number of concurrently opened <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> and <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.</p>
2540 <p>Note that all types and functions begin with the <code>FTC_</code> prefix rather than the usual <code>FT_</code> prefix in the rest of FreeType.</p>
2541 <p>The cache is highly portable and, thus, doesn't know anything about the fonts installed on your system, or how to access them. Therefore, it requires the following.</p>
2542 <ul>
2543 <li>
2544 <p><code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code>, an arbitrary non-zero value that uniquely identifies available or installed font faces, has to be provided to the cache by the client. Note that the cache only stores and compares these values and doesn't try to interpret them in any way, but they have to be persistent on the client side.</p>
2545 </li>
2546 <li>
2547 <p><code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code>, a method to convert an <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> into a new <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object when necessary, has to be provided to the cache by the client. The <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object is completely managed by the cache, including its termination through <code><a href="ft2-face_creation.html#ft_done_face">FT_Done_Face</a></code>. To monitor termination of face objects, the finalizer callback in the <code>generic</code> field of the <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object can be used, which might also be used to store the <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> of the face.</p>
2548 </li>
2549 </ul>
2550 <p>Clients are free to map face IDs to anything useful. The most simple usage is, for example, to associate them to a <code>{pathname,face_index}</code> pair that is then used by <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code> to call <code><a href="ft2-face_creation.html#ft_new_face">FT_New_Face</a></code>. However, more complex schemes are also possible.</p>
2551 <p>Note that for the cache to work correctly, the face ID values must be <strong>persistent</strong>, which means that the contents they point to should not change at runtime, or that their value should not become invalid. If this is unavoidable (e.g., when a font is uninstalled at runtime), you should call <code><a href="ft2-cache_subsystem.html#ftc_manager_removefaceid">FTC_Manager_RemoveFaceID</a></code> as soon as possible to let the cache get rid of any references to the old <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> it may keep internally. Failure to do so will lead to incorrect behaviour or even crashes in <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code>.</p>
2552 <p>To use the cache, start with calling <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> to create a new <code><a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a></code> object, which models a single cache instance. You can then look up <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> and <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects with <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupface">FTC_Manager_LookupFace</a></code> and <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code>, respectively, and use them in any FreeType work stream. You can also cache other FreeType objects as follows.</p>
2553 <ul>
2554 <li>
2555 <p>If you want to use the charmap caching, call <code><a href="ft2-cache_subsystem.html#ftc_cmapcache_new">FTC_CMapCache_New</a></code>, then later use <code><a href="ft2-cache_subsystem.html#ftc_cmapcache_lookup">FTC_CMapCache_Lookup</a></code> to perform the equivalent of <code><a href="ft2-character_mapping.html#ft_get_char_index">FT_Get_Char_Index</a></code>, only much faster.</p>
2556 </li>
2557 <li>
2558 <p>If you want to use the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> caching, call <code><a href="ft2-cache_subsystem.html#ftc_imagecache_new">FTC_ImageCache_New</a></code>, then later use <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code> to retrieve the corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> objects from the cache.</p>
2559 </li>
2560 <li>
2561 <p>If you need lots of small bitmaps, it is much more memory-efficient to call <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_new">FTC_SBitCache_New</a></code> followed by <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code>. This returns <code><a href="ft2-cache_subsystem.html#ftc_sbitrec">FTC_SBitRec</a></code> structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).</p>
2562 </li>
2563 </ul>
2564 <h2 id="ftc_manager">FTC_Manager<a class="headerlink" href="#ftc_manager" title="Permanent link">&para;</a></h2>
2565 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2566 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ManagerRec_* <b>FTC_Manager</b>;
2567 </code></pre></div>
2568
2569 <p>This object corresponds to one instance of the cache-subsystem. It is used to cache one or more <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> objects, along with corresponding <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects.</p>
2570 <p>The manager intentionally limits the total number of opened <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> and <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects to control memory usage. See the <code>max_faces</code> and <code>max_sizes</code> parameters of <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code>.</p>
2571 <p>The manager is also used to cache &lsquo;nodes&rsquo; of various types while limiting their total memory usage.</p>
2572 <p>All limitations are enforced by keeping lists of managed objects in most-recently-used order, and flushing old nodes to make room for new ones.</p>
2573 <hr>
2574
2575 <h2 id="ftc_faceid">FTC_FaceID<a class="headerlink" href="#ftc_faceid" title="Permanent link">&para;</a></h2>
2576 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2577 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> <b>FTC_FaceID</b>;
2578 </code></pre></div>
2579
2580 <p>An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.</p>
2581 <p>These pointers are typically used to point to a user-defined structure containing a font file path, and face index.</p>
2582 <h4>note</h4>
2583
2584 <p>Never use <code>NULL</code> as a valid <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code>.</p>
2585 <p>Face IDs are passed by the client to the cache manager that calls, when needed, the <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code> to translate them into new <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> objects.</p>
2586 <p>If the content of a given face ID changes at runtime, or if the value becomes invalid (e.g., when uninstalling a font), you should immediately call <code><a href="ft2-cache_subsystem.html#ftc_manager_removefaceid">FTC_Manager_RemoveFaceID</a></code> before any other cache function.</p>
2587 <p>Failure to do so will result in incorrect behaviour or even memory leaks and crashes.</p>
2588 <hr>
2589
2590 <h2 id="ftc_face_requester">FTC_Face_Requester<a class="headerlink" href="#ftc_face_requester" title="Permanent link">&para;</a></h2>
2591 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2592 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <a href="ft2-basic_types.html#ft_error">FT_Error</a>
2593 (*<b>FTC_Face_Requester</b>)( <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id,
2594 <a href="ft2-library_setup.html#ft_library">FT_Library</a> library,
2595 <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> req_data,
2596 <a href="ft2-face_creation.html#ft_face">FT_Face</a>* aface );
2597 </code></pre></div>
2598
2599 <p>A callback function provided by client applications. It is used by the cache manager to translate a given <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> into a new valid <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object, on demand.</p>
2600 <h4>input</h4>
2601 <table class="fields">
2602 <tr><td class="val" id="face_id">face_id</td><td class="desc">
2603 <p>The face ID to resolve.</p>
2604 </td></tr>
2605 <tr><td class="val" id="library">library</td><td class="desc">
2606 <p>A handle to a FreeType library object.</p>
2607 </td></tr>
2608 <tr><td class="val" id="req_data">req_data</td><td class="desc">
2609 <p>Application-provided request data (see note below).</p>
2610 </td></tr>
2611 </table>
2612
2613 <h4>output</h4>
2614 <table class="fields">
2615 <tr><td class="val" id="aface">aface</td><td class="desc">
2616 <p>A new <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> handle.</p>
2617 </td></tr>
2618 </table>
2619
2620 <h4>return</h4>
2621
2622 <p>FreeType error code. 0&nbsp;means success.</p>
2623 <h4>note</h4>
2624
2625 <p>The third parameter <code>req_data</code> is the same as the one passed by the client when <code><a href="ft2-cache_subsystem.html#ftc_manager_new">FTC_Manager_New</a></code> is called.</p>
2626 <p>The face requester should not perform funny things on the returned face object, like creating a new <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> for it, or setting a transformation through <code><a href="ft2-sizing_and_scaling.html#ft_set_transform">FT_Set_Transform</a></code>!</p>
2627 <hr>
2628
2629 <h2 id="ftc_manager_new">FTC_Manager_New<a class="headerlink" href="#ftc_manager_new" title="Permanent link">&para;</a></h2>
2630 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2631 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2632 <b>FTC_Manager_New</b>( <a href="ft2-library_setup.html#ft_library">FT_Library</a> library,
2633 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> max_faces,
2634 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> max_sizes,
2635 <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> max_bytes,
2636 <a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a> requester,
2637 <a href="ft2-basic_types.html#ft_pointer">FT_Pointer</a> req_data,
2638 <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> *amanager );
2639 </code></pre></div>
2640
2641 <p>Create a new cache manager.</p>
2642 <h4>input</h4>
2643 <table class="fields">
2644 <tr><td class="val" id="library">library</td><td class="desc">
2645 <p>The parent FreeType library handle to use.</p>
2646 </td></tr>
2647 <tr><td class="val" id="max_faces">max_faces</td><td class="desc">
2648 <p>Maximum number of opened <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> objects managed by this cache instance. Use 0 for defaults.</p>
2649 </td></tr>
2650 <tr><td class="val" id="max_sizes">max_sizes</td><td class="desc">
2651 <p>Maximum number of opened <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects managed by this cache instance. Use 0 for defaults.</p>
2652 </td></tr>
2653 <tr><td class="val" id="max_bytes">max_bytes</td><td class="desc">
2654 <p>Maximum number of bytes to use for cached data nodes. Use 0 for defaults. Note that this value does not account for managed <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> and <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects.</p>
2655 </td></tr>
2656 <tr><td class="val" id="requester">requester</td><td class="desc">
2657 <p>An application-provided callback used to translate face IDs into real <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> objects.</p>
2658 </td></tr>
2659 <tr><td class="val" id="req_data">req_data</td><td class="desc">
2660 <p>A generic pointer that is passed to the requester each time it is called (see <code><a href="ft2-cache_subsystem.html#ftc_face_requester">FTC_Face_Requester</a></code>).</p>
2661 </td></tr>
2662 </table>
2663
2664 <h4>output</h4>
2665 <table class="fields">
2666 <tr><td class="val" id="amanager">amanager</td><td class="desc">
2667 <p>A handle to a new manager object. 0 in case of failure.</p>
2668 </td></tr>
2669 </table>
2670
2671 <h4>return</h4>
2672
2673 <p>FreeType error code. 0&nbsp;means success.</p>
2674 <hr>
2675
2676 <h2 id="ftc_manager_reset">FTC_Manager_Reset<a class="headerlink" href="#ftc_manager_reset" title="Permanent link">&para;</a></h2>
2677 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2678 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
2679 <b>FTC_Manager_Reset</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager );
2680 </code></pre></div>
2681
2682 <p>Empty a given cache manager. This simply gets rid of all the currently cached <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> and <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects within the manager.</p>
2683 <h4>inout</h4>
2684 <table class="fields">
2685 <tr><td class="val" id="manager">manager</td><td class="desc">
2686 <p>A handle to the manager.</p>
2687 </td></tr>
2688 </table>
2689
2690 <hr>
2691
2692 <h2 id="ftc_manager_done">FTC_Manager_Done<a class="headerlink" href="#ftc_manager_done" title="Permanent link">&para;</a></h2>
2693 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2694 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
2695 <b>FTC_Manager_Done</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager );
2696 </code></pre></div>
2697
2698 <p>Destroy a given manager after emptying it.</p>
2699 <h4>input</h4>
2700 <table class="fields">
2701 <tr><td class="val" id="manager">manager</td><td class="desc">
2702 <p>A handle to the target cache manager object.</p>
2703 </td></tr>
2704 </table>
2705
2706 <hr>
2707
2708 <h2 id="ftc_manager_lookupface">FTC_Manager_LookupFace<a class="headerlink" href="#ftc_manager_lookupface" title="Permanent link">&para;</a></h2>
2709 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2710 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2711 <b>FTC_Manager_LookupFace</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
2712 <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id,
2713 <a href="ft2-face_creation.html#ft_face">FT_Face</a> *aface );
2714 </code></pre></div>
2715
2716 <p>Retrieve the <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object that corresponds to a given face ID through a cache manager.</p>
2717 <h4>input</h4>
2718 <table class="fields">
2719 <tr><td class="val" id="manager">manager</td><td class="desc">
2720 <p>A handle to the cache manager.</p>
2721 </td></tr>
2722 <tr><td class="val" id="face_id">face_id</td><td class="desc">
2723 <p>The ID of the face object.</p>
2724 </td></tr>
2725 </table>
2726
2727 <h4>output</h4>
2728 <table class="fields">
2729 <tr><td class="val" id="aface">aface</td><td class="desc">
2730 <p>A handle to the face object.</p>
2731 </td></tr>
2732 </table>
2733
2734 <h4>return</h4>
2735
2736 <p>FreeType error code. 0&nbsp;means success.</p>
2737 <h4>note</h4>
2738
2739 <p>The returned <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object is always owned by the manager. You should never try to discard it yourself.</p>
2740 <p>The <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object doesn't necessarily have a current size object (i.e., face-&gt;size can be&nbsp;0). If you need a specific &lsquo;font size&rsquo;, use <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code> instead.</p>
2741 <p>Never change the face's transformation matrix (i.e., never call the <code><a href="ft2-sizing_and_scaling.html#ft_set_transform">FT_Set_Transform</a></code> function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.</p>
2742 <p>When you perform a lookup, out-of-memory errors are detected <em>within</em> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
2743 <p>If a lookup fails with <code>FT_Err_Out_Of_Memory</code> the cache has already been completely flushed, and still no memory was available for the operation.</p>
2744 <hr>
2745
2746 <h2 id="ftc_manager_lookupsize">FTC_Manager_LookupSize<a class="headerlink" href="#ftc_manager_lookupsize" title="Permanent link">&para;</a></h2>
2747 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2748 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2749 <b>FTC_Manager_LookupSize</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
2750 <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler,
2751 <a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a> *asize );
2752 </code></pre></div>
2753
2754 <p>Retrieve the <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> object that corresponds to a given <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> pointer through a cache manager.</p>
2755 <h4>input</h4>
2756 <table class="fields">
2757 <tr><td class="val" id="manager">manager</td><td class="desc">
2758 <p>A handle to the cache manager.</p>
2759 </td></tr>
2760 <tr><td class="val" id="scaler">scaler</td><td class="desc">
2761 <p>A scaler handle.</p>
2762 </td></tr>
2763 </table>
2764
2765 <h4>output</h4>
2766 <table class="fields">
2767 <tr><td class="val" id="asize">asize</td><td class="desc">
2768 <p>A handle to the size object.</p>
2769 </td></tr>
2770 </table>
2771
2772 <h4>return</h4>
2773
2774 <p>FreeType error code. 0&nbsp;means success.</p>
2775 <h4>note</h4>
2776
2777 <p>The returned <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> object is always owned by the manager. You should never try to discard it by yourself.</p>
2778 <p>You can access the parent <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> object simply as <code>size-&gt;face</code> if you need it. Note that this object is also owned by the manager.</p>
2779 <h4>note</h4>
2780
2781 <p>When you perform a lookup, out-of-memory errors are detected <em>within</em> the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.</p>
2782 <p>If a lookup fails with <code>FT_Err_Out_Of_Memory</code> the cache has already been completely flushed, and still no memory is available for the operation.</p>
2783 <hr>
2784
2785 <h2 id="ftc_manager_removefaceid">FTC_Manager_RemoveFaceID<a class="headerlink" href="#ftc_manager_removefaceid" title="Permanent link">&para;</a></h2>
2786 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2787 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
2788 <b>FTC_Manager_RemoveFaceID</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
2789 <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id );
2790 </code></pre></div>
2791
2792 <p>A special function used to indicate to the cache manager that a given <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> is no longer valid, either because its content changed, or because it was deallocated or uninstalled.</p>
2793 <h4>input</h4>
2794 <table class="fields">
2795 <tr><td class="val" id="manager">manager</td><td class="desc">
2796 <p>The cache manager handle.</p>
2797 </td></tr>
2798 <tr><td class="val" id="face_id">face_id</td><td class="desc">
2799 <p>The <code><a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a></code> to be removed.</p>
2800 </td></tr>
2801 </table>
2802
2803 <h4>note</h4>
2804
2805 <p>This function flushes all nodes from the cache corresponding to this <code>face_id</code>, with the exception of nodes with a non-null reference count.</p>
2806 <p>Such nodes are however modified internally so as to never appear in later lookups with the same <code>face_id</code> value, and to be immediately destroyed when released by all their users.</p>
2807 <hr>
2808
2809 <h2 id="ftc_node">FTC_Node<a class="headerlink" href="#ftc_node" title="Permanent link">&para;</a></h2>
2810 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2811 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_NodeRec_* <b>FTC_Node</b>;
2812 </code></pre></div>
2813
2814 <p>An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of&nbsp;0 might be flushed out of a full cache whenever a lookup request is performed.</p>
2815 <p>If you look up nodes, you have the ability to &lsquo;acquire&rsquo; them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly &lsquo;release&rsquo; it (see <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code>).</p>
2816 <p>See also <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code> and <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code>.</p>
2817 <hr>
2818
2819 <h2 id="ftc_node_unref">FTC_Node_Unref<a class="headerlink" href="#ftc_node_unref" title="Permanent link">&para;</a></h2>
2820 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2821 <div class = "codehilite"><pre><code> FT_EXPORT( <span class="keyword">void</span> )
2822 <b>FTC_Node_Unref</b>( <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> node,
2823 <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager );
2824 </code></pre></div>
2825
2826 <p>Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.</p>
2827 <h4>input</h4>
2828 <table class="fields">
2829 <tr><td class="val" id="node">node</td><td class="desc">
2830 <p>The cache node handle.</p>
2831 </td></tr>
2832 <tr><td class="val" id="manager">manager</td><td class="desc">
2833 <p>The cache manager handle.</p>
2834 </td></tr>
2835 </table>
2836
2837 <hr>
2838
2839 <h2 id="ftc_imagecache">FTC_ImageCache<a class="headerlink" href="#ftc_imagecache" title="Permanent link">&para;</a></h2>
2840 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2841 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageCacheRec_* <b>FTC_ImageCache</b>;
2842 </code></pre></div>
2843
2844 <p>A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.</p>
2845 <hr>
2846
2847 <h2 id="ftc_imagecache_new">FTC_ImageCache_New<a class="headerlink" href="#ftc_imagecache_new" title="Permanent link">&para;</a></h2>
2848 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2849 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2850 <b>FTC_ImageCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
2851 <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> *acache );
2852 </code></pre></div>
2853
2854 <p>Create a new glyph image cache.</p>
2855 <h4>input</h4>
2856 <table class="fields">
2857 <tr><td class="val" id="manager">manager</td><td class="desc">
2858 <p>The parent manager for the image cache.</p>
2859 </td></tr>
2860 </table>
2861
2862 <h4>output</h4>
2863 <table class="fields">
2864 <tr><td class="val" id="acache">acache</td><td class="desc">
2865 <p>A handle to the new glyph image cache object.</p>
2866 </td></tr>
2867 </table>
2868
2869 <h4>return</h4>
2870
2871 <p>FreeType error code. 0&nbsp;means success.</p>
2872 <hr>
2873
2874 <h2 id="ftc_imagecache_lookup">FTC_ImageCache_Lookup<a class="headerlink" href="#ftc_imagecache_lookup" title="Permanent link">&para;</a></h2>
2875 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2876 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2877 <b>FTC_ImageCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> cache,
2878 <a href="ft2-cache_subsystem.html#ftc_imagetype">FTC_ImageType</a> type,
2879 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex,
2880 <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph,
2881 <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode );
2882 </code></pre></div>
2883
2884 <p>Retrieve a given glyph image from a glyph image cache.</p>
2885 <h4>input</h4>
2886 <table class="fields">
2887 <tr><td class="val" id="cache">cache</td><td class="desc">
2888 <p>A handle to the source glyph image cache.</p>
2889 </td></tr>
2890 <tr><td class="val" id="type">type</td><td class="desc">
2891 <p>A pointer to a glyph image type descriptor.</p>
2892 </td></tr>
2893 <tr><td class="val" id="gindex">gindex</td><td class="desc">
2894 <p>The glyph index to retrieve.</p>
2895 </td></tr>
2896 </table>
2897
2898 <h4>output</h4>
2899 <table class="fields">
2900 <tr><td class="val" id="aglyph">aglyph</td><td class="desc">
2901 <p>The corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object. 0 in case of failure.</p>
2902 </td></tr>
2903 <tr><td class="val" id="anode">anode</td><td class="desc">
2904 <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
2905 </td></tr>
2906 </table>
2907
2908 <h4>return</h4>
2909
2910 <p>FreeType error code. 0&nbsp;means success.</p>
2911 <h4>note</h4>
2912
2913 <p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <code><a href="ft2-glyph_management.html#ft_glyph_copy">FT_Glyph_Copy</a></code> and modify the new one.</p>
2914 <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p>
2915 <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
2916 <hr>
2917
2918 <h2 id="ftc_sbit">FTC_SBit<a class="headerlink" href="#ftc_sbit" title="Permanent link">&para;</a></h2>
2919 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2920 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_* <b>FTC_SBit</b>;
2921 </code></pre></div>
2922
2923 <p>A handle to a small bitmap descriptor. See the <code><a href="ft2-cache_subsystem.html#ftc_sbitrec">FTC_SBitRec</a></code> structure for details.</p>
2924 <hr>
2925
2926 <h2 id="ftc_sbitcache">FTC_SBitCache<a class="headerlink" href="#ftc_sbitcache" title="Permanent link">&para;</a></h2>
2927 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2928 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitCacheRec_* <b>FTC_SBitCache</b>;
2929 </code></pre></div>
2930
2931 <p>A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by <code><a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a></code>.</p>
2932 <hr>
2933
2934 <h2 id="ftc_sbitcache_new">FTC_SBitCache_New<a class="headerlink" href="#ftc_sbitcache_new" title="Permanent link">&para;</a></h2>
2935 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2936 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2937 <b>FTC_SBitCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
2938 <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> *acache );
2939 </code></pre></div>
2940
2941 <p>Create a new cache to store small glyph bitmaps.</p>
2942 <h4>input</h4>
2943 <table class="fields">
2944 <tr><td class="val" id="manager">manager</td><td class="desc">
2945 <p>A handle to the source cache manager.</p>
2946 </td></tr>
2947 </table>
2948
2949 <h4>output</h4>
2950 <table class="fields">
2951 <tr><td class="val" id="acache">acache</td><td class="desc">
2952 <p>A handle to the new sbit cache. <code>NULL</code> in case of error.</p>
2953 </td></tr>
2954 </table>
2955
2956 <h4>return</h4>
2957
2958 <p>FreeType error code. 0&nbsp;means success.</p>
2959 <hr>
2960
2961 <h2 id="ftc_sbitcache_lookup">FTC_SBitCache_Lookup<a class="headerlink" href="#ftc_sbitcache_lookup" title="Permanent link">&para;</a></h2>
2962 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
2963 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
2964 <b>FTC_SBitCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> cache,
2965 <a href="ft2-cache_subsystem.html#ftc_imagetype">FTC_ImageType</a> type,
2966 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex,
2967 <a href="ft2-cache_subsystem.html#ftc_sbit">FTC_SBit</a> *sbit,
2968 <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode );
2969 </code></pre></div>
2970
2971 <p>Look up a given small glyph bitmap in a given sbit cache and &lsquo;lock&rsquo; it to prevent its flushing from the cache until needed.</p>
2972 <h4>input</h4>
2973 <table class="fields">
2974 <tr><td class="val" id="cache">cache</td><td class="desc">
2975 <p>A handle to the source sbit cache.</p>
2976 </td></tr>
2977 <tr><td class="val" id="type">type</td><td class="desc">
2978 <p>A pointer to the glyph image type descriptor.</p>
2979 </td></tr>
2980 <tr><td class="val" id="gindex">gindex</td><td class="desc">
2981 <p>The glyph index.</p>
2982 </td></tr>
2983 </table>
2984
2985 <h4>output</h4>
2986 <table class="fields">
2987 <tr><td class="val" id="sbit">sbit</td><td class="desc">
2988 <p>A handle to a small bitmap descriptor.</p>
2989 </td></tr>
2990 <tr><td class="val" id="anode">anode</td><td class="desc">
2991 <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
2992 </td></tr>
2993 </table>
2994
2995 <h4>return</h4>
2996
2997 <p>FreeType error code. 0&nbsp;means success.</p>
2998 <h4>note</h4>
2999
3000 <p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
3001 <p>The descriptor's <code>buffer</code> field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
3002 <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p>
3003 <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
3004 <hr>
3005
3006 <h2 id="ftc_cmapcache">FTC_CMapCache<a class="headerlink" href="#ftc_cmapcache" title="Permanent link">&para;</a></h2>
3007 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3008 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_CMapCacheRec_* <b>FTC_CMapCache</b>;
3009 </code></pre></div>
3010
3011 <p>An opaque handle used to model a charmap cache. This cache is to hold character codes -&gt; glyph indices mappings.</p>
3012 <hr>
3013
3014 <h2 id="ftc_cmapcache_new">FTC_CMapCache_New<a class="headerlink" href="#ftc_cmapcache_new" title="Permanent link">&para;</a></h2>
3015 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3016 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
3017 <b>FTC_CMapCache_New</b>( <a href="ft2-cache_subsystem.html#ftc_manager">FTC_Manager</a> manager,
3018 <a href="ft2-cache_subsystem.html#ftc_cmapcache">FTC_CMapCache</a> *acache );
3019 </code></pre></div>
3020
3021 <p>Create a new charmap cache.</p>
3022 <h4>input</h4>
3023 <table class="fields">
3024 <tr><td class="val" id="manager">manager</td><td class="desc">
3025 <p>A handle to the cache manager.</p>
3026 </td></tr>
3027 </table>
3028
3029 <h4>output</h4>
3030 <table class="fields">
3031 <tr><td class="val" id="acache">acache</td><td class="desc">
3032 <p>A new cache handle. <code>NULL</code> in case of error.</p>
3033 </td></tr>
3034 </table>
3035
3036 <h4>return</h4>
3037
3038 <p>FreeType error code. 0&nbsp;means success.</p>
3039 <h4>note</h4>
3040
3041 <p>Like all other caches, this one will be destroyed with the cache manager.</p>
3042 <hr>
3043
3044 <h2 id="ftc_cmapcache_lookup">FTC_CMapCache_Lookup<a class="headerlink" href="#ftc_cmapcache_lookup" title="Permanent link">&para;</a></h2>
3045 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3046 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> )
3047 <b>FTC_CMapCache_Lookup</b>( <a href="ft2-cache_subsystem.html#ftc_cmapcache">FTC_CMapCache</a> cache,
3048 <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id,
3049 <a href="ft2-basic_types.html#ft_int">FT_Int</a> cmap_index,
3050 <a href="ft2-basic_types.html#ft_uint32">FT_UInt32</a> char_code );
3051 </code></pre></div>
3052
3053 <p>Translate a character code into a glyph index, using the charmap cache.</p>
3054 <h4>input</h4>
3055 <table class="fields">
3056 <tr><td class="val" id="cache">cache</td><td class="desc">
3057 <p>A charmap cache handle.</p>
3058 </td></tr>
3059 <tr><td class="val" id="face_id">face_id</td><td class="desc">
3060 <p>The source face ID.</p>
3061 </td></tr>
3062 <tr><td class="val" id="cmap_index">cmap_index</td><td class="desc">
3063 <p>The index of the charmap in the source face. Any negative value means to use the cache <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code>'s default charmap.</p>
3064 </td></tr>
3065 <tr><td class="val" id="char_code">char_code</td><td class="desc">
3066 <p>The character code (in the corresponding charmap).</p>
3067 </td></tr>
3068 </table>
3069
3070 <h4>return</h4>
3071
3072 <p>Glyph index. 0&nbsp;means &lsquo;no glyph&rsquo;.</p>
3073 <hr>
3074
3075 <h2 id="ftc_scalerrec">FTC_ScalerRec<a class="headerlink" href="#ftc_scalerrec" title="Permanent link">&para;</a></h2>
3076 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3077 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_
3078 {
3079 <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id;
3080 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> width;
3081 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> height;
3082 <a href="ft2-basic_types.html#ft_int">FT_Int</a> pixel;
3083 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> x_res;
3084 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> y_res;
3085
3086 } <b>FTC_ScalerRec</b>;
3087 </code></pre></div>
3088
3089 <p>A structure used to describe a given character size in either pixels or points to the cache manager. See <code><a href="ft2-cache_subsystem.html#ftc_manager_lookupsize">FTC_Manager_LookupSize</a></code>.</p>
3090 <h4>fields</h4>
3091 <table class="fields">
3092 <tr><td class="val" id="face_id">face_id</td><td class="desc">
3093 <p>The source face ID.</p>
3094 </td></tr>
3095 <tr><td class="val" id="width">width</td><td class="desc">
3096 <p>The character width.</p>
3097 </td></tr>
3098 <tr><td class="val" id="height">height</td><td class="desc">
3099 <p>The character height.</p>
3100 </td></tr>
3101 <tr><td class="val" id="pixel">pixel</td><td class="desc">
3102 <p>A Boolean. If 1, the <code>width</code> and <code>height</code> fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64 of points.</p>
3103 </td></tr>
3104 <tr><td class="val" id="x_res">x_res</td><td class="desc">
3105 <p>Only used when <code>pixel</code> is value 0 to indicate the horizontal resolution in dpi.</p>
3106 </td></tr>
3107 <tr><td class="val" id="y_res">y_res</td><td class="desc">
3108 <p>Only used when <code>pixel</code> is value 0 to indicate the vertical resolution in dpi.</p>
3109 </td></tr>
3110 </table>
3111
3112 <h4>note</h4>
3113
3114 <p>This type is mainly used to retrieve <code><a href="ft2-sizing_and_scaling.html#ft_size">FT_Size</a></code> objects through the cache manager.</p>
3115 <hr>
3116
3117 <h2 id="ftc_scaler">FTC_Scaler<a class="headerlink" href="#ftc_scaler" title="Permanent link">&para;</a></h2>
3118 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3119 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ScalerRec_* <b>FTC_Scaler</b>;
3120 </code></pre></div>
3121
3122 <p>A handle to an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> structure.</p>
3123 <hr>
3124
3125 <h2 id="ftc_imagetyperec">FTC_ImageTypeRec<a class="headerlink" href="#ftc_imagetyperec" title="Permanent link">&para;</a></h2>
3126 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3127 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_
3128 {
3129 <a href="ft2-cache_subsystem.html#ftc_faceid">FTC_FaceID</a> face_id;
3130 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> width;
3131 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> height;
3132 <a href="ft2-basic_types.html#ft_int32">FT_Int32</a> flags;
3133
3134 } <b>FTC_ImageTypeRec</b>;
3135 </code></pre></div>
3136
3137 <p>A structure used to model the type of images in a glyph cache.</p>
3138 <h4>fields</h4>
3139 <table class="fields">
3140 <tr><td class="val" id="face_id">face_id</td><td class="desc">
3141 <p>The face ID.</p>
3142 </td></tr>
3143 <tr><td class="val" id="width">width</td><td class="desc">
3144 <p>The width in pixels.</p>
3145 </td></tr>
3146 <tr><td class="val" id="height">height</td><td class="desc">
3147 <p>The height in pixels.</p>
3148 </td></tr>
3149 <tr><td class="val" id="flags">flags</td><td class="desc">
3150 <p>The load flags, as in <code><a href="ft2-glyph_retrieval.html#ft_load_glyph">FT_Load_Glyph</a></code>.</p>
3151 </td></tr>
3152 </table>
3153
3154 <hr>
3155
3156 <h2 id="ftc_imagetype">FTC_ImageType<a class="headerlink" href="#ftc_imagetype" title="Permanent link">&para;</a></h2>
3157 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3158 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_ImageTypeRec_* <b>FTC_ImageType</b>;
3159 </code></pre></div>
3160
3161 <p>A handle to an <code><a href="ft2-cache_subsystem.html#ftc_imagetyperec">FTC_ImageTypeRec</a></code> structure.</p>
3162 <hr>
3163
3164 <h2 id="ftc_imagecache_lookupscaler">FTC_ImageCache_LookupScaler<a class="headerlink" href="#ftc_imagecache_lookupscaler" title="Permanent link">&para;</a></h2>
3165 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3166 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
3167 <b>FTC_ImageCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#ftc_imagecache">FTC_ImageCache</a> cache,
3168 <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler,
3169 <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> load_flags,
3170 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex,
3171 <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a> *aglyph,
3172 <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode );
3173 </code></pre></div>
3174
3175 <p>A variant of <code><a href="ft2-cache_subsystem.html#ftc_imagecache_lookup">FTC_ImageCache_Lookup</a></code> that uses an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> to specify the face ID and its size.</p>
3176 <h4>input</h4>
3177 <table class="fields">
3178 <tr><td class="val" id="cache">cache</td><td class="desc">
3179 <p>A handle to the source glyph image cache.</p>
3180 </td></tr>
3181 <tr><td class="val" id="scaler">scaler</td><td class="desc">
3182 <p>A pointer to a scaler descriptor.</p>
3183 </td></tr>
3184 <tr><td class="val" id="load_flags">load_flags</td><td class="desc">
3185 <p>The corresponding load flags.</p>
3186 </td></tr>
3187 <tr><td class="val" id="gindex">gindex</td><td class="desc">
3188 <p>The glyph index to retrieve.</p>
3189 </td></tr>
3190 </table>
3191
3192 <h4>output</h4>
3193 <table class="fields">
3194 <tr><td class="val" id="aglyph">aglyph</td><td class="desc">
3195 <p>The corresponding <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object. 0 in case of failure.</p>
3196 </td></tr>
3197 <tr><td class="val" id="anode">anode</td><td class="desc">
3198 <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
3199 </td></tr>
3200 </table>
3201
3202 <h4>return</h4>
3203
3204 <p>FreeType error code. 0&nbsp;means success.</p>
3205 <h4>note</h4>
3206
3207 <p>The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with <code><a href="ft2-glyph_management.html#ft_glyph_copy">FT_Glyph_Copy</a></code> and modify the new one.</p>
3208 <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p>
3209 <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
3210 <p>Calls to <code><a href="ft2-sizing_and_scaling.html#ft_set_char_size">FT_Set_Char_Size</a></code> and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.</p>
3211 <hr>
3212
3213 <h2 id="ftc_sbitrec">FTC_SBitRec<a class="headerlink" href="#ftc_sbitrec" title="Permanent link">&para;</a></h2>
3214 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3215 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FTC_SBitRec_
3216 {
3217 <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> width;
3218 <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> height;
3219 <a href="ft2-basic_types.html#ft_char">FT_Char</a> left;
3220 <a href="ft2-basic_types.html#ft_char">FT_Char</a> top;
3221
3222 <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> format;
3223 <a href="ft2-basic_types.html#ft_byte">FT_Byte</a> max_grays;
3224 <a href="ft2-basic_types.html#ft_short">FT_Short</a> pitch;
3225 <a href="ft2-basic_types.html#ft_char">FT_Char</a> xadvance;
3226 <a href="ft2-basic_types.html#ft_char">FT_Char</a> yadvance;
3227
3228 <a href="ft2-basic_types.html#ft_byte">FT_Byte</a>* buffer;
3229
3230 } <b>FTC_SBitRec</b>;
3231 </code></pre></div>
3232
3233 <p>A very compact structure used to describe a small glyph bitmap.</p>
3234 <h4>fields</h4>
3235 <table class="fields">
3236 <tr><td class="val" id="width">width</td><td class="desc">
3237 <p>The bitmap width in pixels.</p>
3238 </td></tr>
3239 <tr><td class="val" id="height">height</td><td class="desc">
3240 <p>The bitmap height in pixels.</p>
3241 </td></tr>
3242 <tr><td class="val" id="left">left</td><td class="desc">
3243 <p>The horizontal distance from the pen position to the left bitmap border (a.k.a. ‘left side bearing’, or ‘lsb’).</p>
3244 </td></tr>
3245 <tr><td class="val" id="top">top</td><td class="desc">
3246 <p>The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. ‘top side bearing’). The distance is positive for upwards y coordinates.</p>
3247 </td></tr>
3248 <tr><td class="val" id="format">format</td><td class="desc">
3249 <p>The format of the glyph bitmap (monochrome or gray).</p>
3250 </td></tr>
3251 <tr><td class="val" id="max_grays">max_grays</td><td class="desc">
3252 <p>Maximum gray level value (in the range 1 to 255).</p>
3253 </td></tr>
3254 <tr><td class="val" id="pitch">pitch</td><td class="desc">
3255 <p>The number of bytes per bitmap line. May be positive or negative.</p>
3256 </td></tr>
3257 <tr><td class="val" id="xadvance">xadvance</td><td class="desc">
3258 <p>The horizontal advance width in pixels.</p>
3259 </td></tr>
3260 <tr><td class="val" id="yadvance">yadvance</td><td class="desc">
3261 <p>The vertical advance height in pixels.</p>
3262 </td></tr>
3263 <tr><td class="val" id="buffer">buffer</td><td class="desc">
3264 <p>A pointer to the bitmap pixels.</p>
3265 </td></tr>
3266 </table>
3267
3268 <hr>
3269
3270 <h2 id="ftc_sbitcache_lookupscaler">FTC_SBitCache_LookupScaler<a class="headerlink" href="#ftc_sbitcache_lookupscaler" title="Permanent link">&para;</a></h2>
3271 <p>Defined in FT_CACHE_H (freetype/ftcache.h).</p>
3272 <div class = "codehilite"><pre><code> FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
3273 <b>FTC_SBitCache_LookupScaler</b>( <a href="ft2-cache_subsystem.html#ftc_sbitcache">FTC_SBitCache</a> cache,
3274 <a href="ft2-cache_subsystem.html#ftc_scaler">FTC_Scaler</a> scaler,
3275 <a href="ft2-basic_types.html#ft_ulong">FT_ULong</a> load_flags,
3276 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> gindex,
3277 <a href="ft2-cache_subsystem.html#ftc_sbit">FTC_SBit</a> *sbit,
3278 <a href="ft2-cache_subsystem.html#ftc_node">FTC_Node</a> *anode );
3279 </code></pre></div>
3280
3281 <p>A variant of <code><a href="ft2-cache_subsystem.html#ftc_sbitcache_lookup">FTC_SBitCache_Lookup</a></code> that uses an <code><a href="ft2-cache_subsystem.html#ftc_scalerrec">FTC_ScalerRec</a></code> to specify the face ID and its size.</p>
3282 <h4>input</h4>
3283 <table class="fields">
3284 <tr><td class="val" id="cache">cache</td><td class="desc">
3285 <p>A handle to the source sbit cache.</p>
3286 </td></tr>
3287 <tr><td class="val" id="scaler">scaler</td><td class="desc">
3288 <p>A pointer to the scaler descriptor.</p>
3289 </td></tr>
3290 <tr><td class="val" id="load_flags">load_flags</td><td class="desc">
3291 <p>The corresponding load flags.</p>
3292 </td></tr>
3293 <tr><td class="val" id="gindex">gindex</td><td class="desc">
3294 <p>The glyph index.</p>
3295 </td></tr>
3296 </table>
3297
3298 <h4>output</h4>
3299 <table class="fields">
3300 <tr><td class="val" id="sbit">sbit</td><td class="desc">
3301 <p>A handle to a small bitmap descriptor.</p>
3302 </td></tr>
3303 <tr><td class="val" id="anode">anode</td><td class="desc">
3304 <p>Used to return the address of the corresponding cache node after incrementing its reference count (see note below).</p>
3305 </td></tr>
3306 </table>
3307
3308 <h4>return</h4>
3309
3310 <p>FreeType error code. 0&nbsp;means success.</p>
3311 <h4>note</h4>
3312
3313 <p>The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.</p>
3314 <p>The descriptor's <code>buffer</code> field is set to&nbsp;0 to indicate a missing glyph bitmap.</p>
3315 <p>If <code>anode</code> is <em>not</em> <code>NULL</code>, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call <code><a href="ft2-cache_subsystem.html#ftc_node_unref">FTC_Node_Unref</a></code> to &lsquo;release&rsquo; it.</p>
3316 <p>If <code>anode</code> is <code>NULL</code>, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!</p>
3317 <hr>
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331 </article>
3332 </div>
3333
3334
3335 <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
3336 </div>
3337
3338 </main>
3339
3340 <footer class="md-footer">
3341
3342 <div class="md-footer-meta md-typeset">
3343 <div class="md-footer-meta__inner md-grid">
3344 <div class="md-copyright">
3345
3346 <div class="md-copyright__highlight">
3347 Copyright 2026 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
3348 </div>
3349
3350
3351 Made with
3352 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
3353 Material for MkDocs
3354 </a>
3355
3356 </div>
3357
3358 </div>
3359 </div>
3360 </footer>
3361
3362 </div>
3363 <div class="md-dialog" data-md-component="dialog">
3364 <div class="md-dialog__inner md-typeset"></div>
3365 </div>
3366
3367
3368 <script id="__config" type="application/json">{"base": ".", "features": [], "search": "assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
3369
3370
3371 <script src="assets/javascripts/bundle.c8b220af.min.js"></script>
3372
3373 <script src="javascripts/extra.js"></script>
3374
3375
3376 </body>
3377 </html>