Debian Codegraph @

docs/reference/ft2-properties.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-properties.html">
16
17
18 <link rel="prev" href="ft2-ot_svg_driver.html">
19
20
21 <link rel="next" href="ft2-parameter_tags.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>Driver properties - 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="#driver-properties" 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 Driver properties
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
1086
1087 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
1088
1089
1090
1091 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" checked>
1092
1093
1094 <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
1095
1096
1097 <span class="md-ellipsis">
1098 Controlling FreeType Modules
1099
1100 </span>
1101
1102
1103 <span class="md-nav__icon md-icon"></span>
1104 </label>
1105
1106 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="true">
1107 <label class="md-nav__title" for="__nav_7">
1108 <span class="md-nav__icon md-icon"></span>
1109 Controlling FreeType Modules
1110 </label>
1111 <ul class="md-nav__list" data-md-scrollfix>
1112
1113
1114
1115
1116
1117
1118
1119 <li class="md-nav__item">
1120 <a href="ft2-auto_hinter.html" class="md-nav__link">
1121
1122
1123 <span class="md-ellipsis">
1124 The auto-hinter
1125
1126 </span>
1127
1128
1129 </a>
1130 </li>
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141 <li class="md-nav__item">
1142 <a href="ft2-cff_driver.html" class="md-nav__link">
1143
1144
1145 <span class="md-ellipsis">
1146 The CFF driver
1147
1148 </span>
1149
1150
1151 </a>
1152 </li>
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163 <li class="md-nav__item">
1164 <a href="ft2-t1_cid_driver.html" class="md-nav__link">
1165
1166
1167 <span class="md-ellipsis">
1168 The Type 1 and CID drivers
1169
1170 </span>
1171
1172
1173 </a>
1174 </li>
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185 <li class="md-nav__item">
1186 <a href="ft2-tt_driver.html" class="md-nav__link">
1187
1188
1189 <span class="md-ellipsis">
1190 The TrueType driver
1191
1192 </span>
1193
1194
1195 </a>
1196 </li>
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207 <li class="md-nav__item">
1208 <a href="ft2-pcf_driver.html" class="md-nav__link">
1209
1210
1211 <span class="md-ellipsis">
1212 The PCF driver
1213
1214 </span>
1215
1216
1217 </a>
1218 </li>
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229 <li class="md-nav__item">
1230 <a href="ft2-ot_svg_driver.html" class="md-nav__link">
1231
1232
1233 <span class="md-ellipsis">
1234 The SVG driver
1235
1236 </span>
1237
1238
1239 </a>
1240 </li>
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253 <li class="md-nav__item md-nav__item--active">
1254
1255 <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
1256
1257
1258
1259
1260
1261 <label class="md-nav__link md-nav__link--active" for="__toc">
1262
1263
1264 <span class="md-ellipsis">
1265 Driver properties
1266
1267 </span>
1268
1269
1270 <span class="md-nav__icon md-icon"></span>
1271 </label>
1272
1273 <a href="ft2-properties.html" class="md-nav__link md-nav__link--active">
1274
1275
1276 <span class="md-ellipsis">
1277 Driver properties
1278
1279 </span>
1280
1281
1282 </a>
1283
1284
1285
1286 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1287
1288
1289
1290
1291
1292
1293 <label class="md-nav__title" for="__toc">
1294 <span class="md-nav__icon md-icon"></span>
1295 Table of contents
1296 </label>
1297 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1298
1299 <li class="md-nav__item">
1300 <a href="#synopsis" class="md-nav__link">
1301 <span class="md-ellipsis">
1302 Synopsis
1303 </span>
1304 </a>
1305
1306 </li>
1307
1308 <li class="md-nav__item">
1309 <a href="#ft_hinting_xxx" class="md-nav__link">
1310 <span class="md-ellipsis">
1311 FT_HINTING_XXX
1312 </span>
1313 </a>
1314
1315 </li>
1316
1317 <li class="md-nav__item">
1318 <a href="#hinting-engine" class="md-nav__link">
1319 <span class="md-ellipsis">
1320 hinting-engine
1321 </span>
1322 </a>
1323
1324 </li>
1325
1326 <li class="md-nav__item">
1327 <a href="#no-stem-darkening" class="md-nav__link">
1328 <span class="md-ellipsis">
1329 no-stem-darkening
1330 </span>
1331 </a>
1332
1333 </li>
1334
1335 <li class="md-nav__item">
1336 <a href="#darkening-parameters" class="md-nav__link">
1337 <span class="md-ellipsis">
1338 darkening-parameters
1339 </span>
1340 </a>
1341
1342 </li>
1343
1344 <li class="md-nav__item">
1345 <a href="#random-seed" class="md-nav__link">
1346 <span class="md-ellipsis">
1347 random-seed
1348 </span>
1349 </a>
1350
1351 </li>
1352
1353 <li class="md-nav__item">
1354 <a href="#no-long-family-names" class="md-nav__link">
1355 <span class="md-ellipsis">
1356 no-long-family-names
1357 </span>
1358 </a>
1359
1360 </li>
1361
1362 <li class="md-nav__item">
1363 <a href="#tt_interpreter_version_xxx" class="md-nav__link">
1364 <span class="md-ellipsis">
1365 TT_INTERPRETER_VERSION_XXX
1366 </span>
1367 </a>
1368
1369 </li>
1370
1371 <li class="md-nav__item">
1372 <a href="#interpreter-version" class="md-nav__link">
1373 <span class="md-ellipsis">
1374 interpreter-version
1375 </span>
1376 </a>
1377
1378 </li>
1379
1380 <li class="md-nav__item">
1381 <a href="#spread" class="md-nav__link">
1382 <span class="md-ellipsis">
1383 spread
1384 </span>
1385 </a>
1386
1387 </li>
1388
1389 <li class="md-nav__item">
1390 <a href="#svg-hooks" class="md-nav__link">
1391 <span class="md-ellipsis">
1392 svg-hooks
1393 </span>
1394 </a>
1395
1396 </li>
1397
1398 <li class="md-nav__item">
1399 <a href="#glyph-to-script-map" class="md-nav__link">
1400 <span class="md-ellipsis">
1401 glyph-to-script-map
1402 </span>
1403 </a>
1404
1405 </li>
1406
1407 <li class="md-nav__item">
1408 <a href="#ft_autohinter_script_xxx" class="md-nav__link">
1409 <span class="md-ellipsis">
1410 FT_AUTOHINTER_SCRIPT_XXX
1411 </span>
1412 </a>
1413
1414 </li>
1415
1416 <li class="md-nav__item">
1417 <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link">
1418 <span class="md-ellipsis">
1419 FT_Prop_GlyphToScriptMap
1420 </span>
1421 </a>
1422
1423 </li>
1424
1425 <li class="md-nav__item">
1426 <a href="#fallback-script" class="md-nav__link">
1427 <span class="md-ellipsis">
1428 fallback-script
1429 </span>
1430 </a>
1431
1432 </li>
1433
1434 <li class="md-nav__item">
1435 <a href="#default-script" class="md-nav__link">
1436 <span class="md-ellipsis">
1437 default-script
1438 </span>
1439 </a>
1440
1441 </li>
1442
1443 <li class="md-nav__item">
1444 <a href="#increase-x-height" class="md-nav__link">
1445 <span class="md-ellipsis">
1446 increase-x-height
1447 </span>
1448 </a>
1449
1450 </li>
1451
1452 <li class="md-nav__item">
1453 <a href="#ft_prop_increasexheight" class="md-nav__link">
1454 <span class="md-ellipsis">
1455 FT_Prop_IncreaseXHeight
1456 </span>
1457 </a>
1458
1459 </li>
1460
1461 <li class="md-nav__item">
1462 <a href="#warping" class="md-nav__link">
1463 <span class="md-ellipsis">
1464 warping
1465 </span>
1466 </a>
1467
1468 </li>
1469
1470 </ul>
1471
1472 </nav>
1473
1474 </li>
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485 <li class="md-nav__item">
1486 <a href="ft2-parameter_tags.html" class="md-nav__link">
1487
1488
1489 <span class="md-ellipsis">
1490 Parameter Tags
1491
1492 </span>
1493
1494
1495 </a>
1496 </li>
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507 <li class="md-nav__item">
1508 <a href="ft2-lcd_rendering.html" class="md-nav__link">
1509
1510
1511 <span class="md-ellipsis">
1512 Subpixel Rendering
1513
1514 </span>
1515
1516
1517 </a>
1518 </li>
1519
1520
1521
1522
1523 </ul>
1524 </nav>
1525
1526 </li>
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540 <li class="md-nav__item md-nav__item--nested">
1541
1542
1543
1544 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
1545
1546
1547 <label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
1548
1549
1550 <span class="md-ellipsis">
1551 Cache Sub-System
1552
1553 </span>
1554
1555
1556 <span class="md-nav__icon md-icon"></span>
1557 </label>
1558
1559 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
1560 <label class="md-nav__title" for="__nav_8">
1561 <span class="md-nav__icon md-icon"></span>
1562 Cache Sub-System
1563 </label>
1564 <ul class="md-nav__list" data-md-scrollfix>
1565
1566
1567
1568
1569
1570
1571
1572 <li class="md-nav__item">
1573 <a href="ft2-cache_subsystem.html" class="md-nav__link">
1574
1575
1576 <span class="md-ellipsis">
1577 Cache Sub-System
1578
1579 </span>
1580
1581
1582 </a>
1583 </li>
1584
1585
1586
1587
1588 </ul>
1589 </nav>
1590
1591 </li>
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605 <li class="md-nav__item md-nav__item--nested">
1606
1607
1608
1609 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" >
1610
1611
1612 <label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0">
1613
1614
1615 <span class="md-ellipsis">
1616 Support API
1617
1618 </span>
1619
1620
1621 <span class="md-nav__icon md-icon"></span>
1622 </label>
1623
1624 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
1625 <label class="md-nav__title" for="__nav_9">
1626 <span class="md-nav__icon md-icon"></span>
1627 Support API
1628 </label>
1629 <ul class="md-nav__list" data-md-scrollfix>
1630
1631
1632
1633
1634
1635
1636
1637 <li class="md-nav__item">
1638 <a href="ft2-computations.html" class="md-nav__link">
1639
1640
1641 <span class="md-ellipsis">
1642 Computations
1643
1644 </span>
1645
1646
1647 </a>
1648 </li>
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659 <li class="md-nav__item">
1660 <a href="ft2-list_processing.html" class="md-nav__link">
1661
1662
1663 <span class="md-ellipsis">
1664 List Processing
1665
1666 </span>
1667
1668
1669 </a>
1670 </li>
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681 <li class="md-nav__item">
1682 <a href="ft2-outline_processing.html" class="md-nav__link">
1683
1684
1685 <span class="md-ellipsis">
1686 Outline Processing
1687
1688 </span>
1689
1690
1691 </a>
1692 </li>
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703 <li class="md-nav__item">
1704 <a href="ft2-quick_advance.html" class="md-nav__link">
1705
1706
1707 <span class="md-ellipsis">
1708 Quick retrieval of advance values
1709
1710 </span>
1711
1712
1713 </a>
1714 </li>
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725 <li class="md-nav__item">
1726 <a href="ft2-bitmap_handling.html" class="md-nav__link">
1727
1728
1729 <span class="md-ellipsis">
1730 Bitmap Handling
1731
1732 </span>
1733
1734
1735 </a>
1736 </li>
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747 <li class="md-nav__item">
1748 <a href="ft2-raster.html" class="md-nav__link">
1749
1750
1751 <span class="md-ellipsis">
1752 Scanline Converter
1753
1754 </span>
1755
1756
1757 </a>
1758 </li>
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769 <li class="md-nav__item">
1770 <a href="ft2-glyph_stroker.html" class="md-nav__link">
1771
1772
1773 <span class="md-ellipsis">
1774 Glyph Stroker
1775
1776 </span>
1777
1778
1779 </a>
1780 </li>
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791 <li class="md-nav__item">
1792 <a href="ft2-system_interface.html" class="md-nav__link">
1793
1794
1795 <span class="md-ellipsis">
1796 System Interface
1797
1798 </span>
1799
1800
1801 </a>
1802 </li>
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813 <li class="md-nav__item">
1814 <a href="ft2-module_management.html" class="md-nav__link">
1815
1816
1817 <span class="md-ellipsis">
1818 Module Management
1819
1820 </span>
1821
1822
1823 </a>
1824 </li>
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835 <li class="md-nav__item">
1836 <a href="ft2-gzip.html" class="md-nav__link">
1837
1838
1839 <span class="md-ellipsis">
1840 GZIP Streams
1841
1842 </span>
1843
1844
1845 </a>
1846 </li>
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857 <li class="md-nav__item">
1858 <a href="ft2-lzw.html" class="md-nav__link">
1859
1860
1861 <span class="md-ellipsis">
1862 LZW Streams
1863
1864 </span>
1865
1866
1867 </a>
1868 </li>
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879 <li class="md-nav__item">
1880 <a href="ft2-bzip2.html" class="md-nav__link">
1881
1882
1883 <span class="md-ellipsis">
1884 BZIP2 Streams
1885
1886 </span>
1887
1888
1889 </a>
1890 </li>
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901 <li class="md-nav__item">
1902 <a href="ft2-debugging_apis.html" class="md-nav__link">
1903
1904
1905 <span class="md-ellipsis">
1906 External Debugging APIs
1907
1908 </span>
1909
1910
1911 </a>
1912 </li>
1913
1914
1915
1916
1917 </ul>
1918 </nav>
1919
1920 </li>
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934 <li class="md-nav__item md-nav__item--nested">
1935
1936
1937
1938 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
1939
1940
1941 <label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
1942
1943
1944 <span class="md-ellipsis">
1945 Error Codes
1946
1947 </span>
1948
1949
1950 <span class="md-nav__icon md-icon"></span>
1951 </label>
1952
1953 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
1954 <label class="md-nav__title" for="__nav_10">
1955 <span class="md-nav__icon md-icon"></span>
1956 Error Codes
1957 </label>
1958 <ul class="md-nav__list" data-md-scrollfix>
1959
1960
1961
1962
1963
1964
1965
1966 <li class="md-nav__item">
1967 <a href="ft2-error_enumerations.html" class="md-nav__link">
1968
1969
1970 <span class="md-ellipsis">
1971 Error Enumerations
1972
1973 </span>
1974
1975
1976 </a>
1977 </li>
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988 <li class="md-nav__item">
1989 <a href="ft2-error_code_values.html" class="md-nav__link">
1990
1991
1992 <span class="md-ellipsis">
1993 Error Code Values
1994
1995 </span>
1996
1997
1998 </a>
1999 </li>
2000
2001
2002
2003
2004 </ul>
2005 </nav>
2006
2007 </li>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021 <li class="md-nav__item md-nav__item--nested">
2022
2023
2024
2025 <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_11" >
2026
2027
2028 <label class="md-nav__link" for="__nav_11" id="__nav_11_label" tabindex="0">
2029
2030
2031 <span class="md-ellipsis">
2032 Miscellaneous
2033
2034 </span>
2035
2036
2037 <span class="md-nav__icon md-icon"></span>
2038 </label>
2039
2040 <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_11_label" aria-expanded="false">
2041 <label class="md-nav__title" for="__nav_11">
2042 <span class="md-nav__icon md-icon"></span>
2043 Miscellaneous
2044 </label>
2045 <ul class="md-nav__list" data-md-scrollfix>
2046
2047
2048
2049
2050
2051
2052
2053 <li class="md-nav__item">
2054 <a href="ft2-gx_validation.html" class="md-nav__link">
2055
2056
2057 <span class="md-ellipsis">
2058 TrueTypeGX/AAT Validation
2059
2060 </span>
2061
2062
2063 </a>
2064 </li>
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075 <li class="md-nav__item">
2076 <a href="ft2-incremental.html" class="md-nav__link">
2077
2078
2079 <span class="md-ellipsis">
2080 Incremental Loading
2081
2082 </span>
2083
2084
2085 </a>
2086 </li>
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097 <li class="md-nav__item">
2098 <a href="ft2-truetype_engine.html" class="md-nav__link">
2099
2100
2101 <span class="md-ellipsis">
2102 The TrueType Engine
2103
2104 </span>
2105
2106
2107 </a>
2108 </li>
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119 <li class="md-nav__item">
2120 <a href="ft2-ot_validation.html" class="md-nav__link">
2121
2122
2123 <span class="md-ellipsis">
2124 OpenType Validation
2125
2126 </span>
2127
2128
2129 </a>
2130 </li>
2131
2132
2133
2134
2135 </ul>
2136 </nav>
2137
2138 </li>
2139
2140
2141
2142 </ul>
2143 </nav>
2144 </div>
2145 </div>
2146 </div>
2147
2148
2149
2150 <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
2151 <div class="md-sidebar__scrollwrap">
2152 <div class="md-sidebar__inner">
2153
2154
2155 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
2156
2157
2158
2159
2160
2161
2162 <label class="md-nav__title" for="__toc">
2163 <span class="md-nav__icon md-icon"></span>
2164 Table of contents
2165 </label>
2166 <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
2167
2168 <li class="md-nav__item">
2169 <a href="#synopsis" class="md-nav__link">
2170 <span class="md-ellipsis">
2171 Synopsis
2172 </span>
2173 </a>
2174
2175 </li>
2176
2177 <li class="md-nav__item">
2178 <a href="#ft_hinting_xxx" class="md-nav__link">
2179 <span class="md-ellipsis">
2180 FT_HINTING_XXX
2181 </span>
2182 </a>
2183
2184 </li>
2185
2186 <li class="md-nav__item">
2187 <a href="#hinting-engine" class="md-nav__link">
2188 <span class="md-ellipsis">
2189 hinting-engine
2190 </span>
2191 </a>
2192
2193 </li>
2194
2195 <li class="md-nav__item">
2196 <a href="#no-stem-darkening" class="md-nav__link">
2197 <span class="md-ellipsis">
2198 no-stem-darkening
2199 </span>
2200 </a>
2201
2202 </li>
2203
2204 <li class="md-nav__item">
2205 <a href="#darkening-parameters" class="md-nav__link">
2206 <span class="md-ellipsis">
2207 darkening-parameters
2208 </span>
2209 </a>
2210
2211 </li>
2212
2213 <li class="md-nav__item">
2214 <a href="#random-seed" class="md-nav__link">
2215 <span class="md-ellipsis">
2216 random-seed
2217 </span>
2218 </a>
2219
2220 </li>
2221
2222 <li class="md-nav__item">
2223 <a href="#no-long-family-names" class="md-nav__link">
2224 <span class="md-ellipsis">
2225 no-long-family-names
2226 </span>
2227 </a>
2228
2229 </li>
2230
2231 <li class="md-nav__item">
2232 <a href="#tt_interpreter_version_xxx" class="md-nav__link">
2233 <span class="md-ellipsis">
2234 TT_INTERPRETER_VERSION_XXX
2235 </span>
2236 </a>
2237
2238 </li>
2239
2240 <li class="md-nav__item">
2241 <a href="#interpreter-version" class="md-nav__link">
2242 <span class="md-ellipsis">
2243 interpreter-version
2244 </span>
2245 </a>
2246
2247 </li>
2248
2249 <li class="md-nav__item">
2250 <a href="#spread" class="md-nav__link">
2251 <span class="md-ellipsis">
2252 spread
2253 </span>
2254 </a>
2255
2256 </li>
2257
2258 <li class="md-nav__item">
2259 <a href="#svg-hooks" class="md-nav__link">
2260 <span class="md-ellipsis">
2261 svg-hooks
2262 </span>
2263 </a>
2264
2265 </li>
2266
2267 <li class="md-nav__item">
2268 <a href="#glyph-to-script-map" class="md-nav__link">
2269 <span class="md-ellipsis">
2270 glyph-to-script-map
2271 </span>
2272 </a>
2273
2274 </li>
2275
2276 <li class="md-nav__item">
2277 <a href="#ft_autohinter_script_xxx" class="md-nav__link">
2278 <span class="md-ellipsis">
2279 FT_AUTOHINTER_SCRIPT_XXX
2280 </span>
2281 </a>
2282
2283 </li>
2284
2285 <li class="md-nav__item">
2286 <a href="#ft_prop_glyphtoscriptmap" class="md-nav__link">
2287 <span class="md-ellipsis">
2288 FT_Prop_GlyphToScriptMap
2289 </span>
2290 </a>
2291
2292 </li>
2293
2294 <li class="md-nav__item">
2295 <a href="#fallback-script" class="md-nav__link">
2296 <span class="md-ellipsis">
2297 fallback-script
2298 </span>
2299 </a>
2300
2301 </li>
2302
2303 <li class="md-nav__item">
2304 <a href="#default-script" class="md-nav__link">
2305 <span class="md-ellipsis">
2306 default-script
2307 </span>
2308 </a>
2309
2310 </li>
2311
2312 <li class="md-nav__item">
2313 <a href="#increase-x-height" class="md-nav__link">
2314 <span class="md-ellipsis">
2315 increase-x-height
2316 </span>
2317 </a>
2318
2319 </li>
2320
2321 <li class="md-nav__item">
2322 <a href="#ft_prop_increasexheight" class="md-nav__link">
2323 <span class="md-ellipsis">
2324 FT_Prop_IncreaseXHeight
2325 </span>
2326 </a>
2327
2328 </li>
2329
2330 <li class="md-nav__item">
2331 <a href="#warping" class="md-nav__link">
2332 <span class="md-ellipsis">
2333 warping
2334 </span>
2335 </a>
2336
2337 </li>
2338
2339 </ul>
2340
2341 </nav>
2342 </div>
2343 </div>
2344 </div>
2345
2346
2347
2348 <div class="md-content" data-md-component="content">
2349 <article class="md-content__inner md-typeset">
2350
2351
2352
2353
2354
2355 <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#controlling-freetype-modules">Controlling FreeType Modules</a> &raquo; Driver properties</p>
2356 <hr />
2357 <h1 id="driver-properties">Driver properties<a class="headerlink" href="#driver-properties" title="Permanent link">&para;</a></h1>
2358 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
2359 <p>Driver modules can be controlled by setting and unsetting properties, using the functions <code><a href="ft2-module_management.html#ft_property_set">FT_Property_Set</a></code> and <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code>. This section documents the available properties, together with auxiliary macros and structures.</p>
2360 <h2 id="ft_hinting_xxx">FT_HINTING_XXX<a class="headerlink" href="#ft_hinting_xxx" title="Permanent link">&para;</a></h2>
2361 <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
2362 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a> 0
2363 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a> 1
2364
2365 /* these constants (introduced in 2.4.12) are deprecated */
2366 #<span class="keyword">define</span> FT_CFF_HINTING_FREETYPE <a href="ft2-properties.html#ft_hinting_freetype">FT_HINTING_FREETYPE</a>
2367 #<span class="keyword">define</span> FT_CFF_HINTING_ADOBE <a href="ft2-properties.html#ft_hinting_adobe">FT_HINTING_ADOBE</a>
2368 </code></pre></div>
2369
2370 <p>A list of constants used for the <code><a href="ft2-properties.html#hinting-engine">hinting-engine</a></code> property to select the hinting engine for CFF, Type&nbsp;1, and CID fonts.</p>
2371 <h4>values</h4>
2372 <table class="fields">
2373 <tr><td class="val" id="ft_hinting_freetype">FT_HINTING_FREETYPE</td><td class="desc">
2374 <p>Use the old FreeType hinting engine.</p>
2375 </td></tr>
2376 <tr><td class="val" id="ft_hinting_adobe">FT_HINTING_ADOBE</td><td class="desc">
2377 <p>Use the hinting engine contributed by Adobe.</p>
2378 </td></tr>
2379 </table>
2380
2381 <h4>since</h4>
2382
2383 <p>2.9</p>
2384 <hr>
2385
2386 <h2 id="hinting-engine">hinting-engine<a class="headerlink" href="#hinting-engine" title="Permanent link">&para;</a></h2>
2387 <p>Thanks to Adobe, which contributed a new hinting (and parsing) engine, an application can select between &lsquo;freetype&rsquo; and &lsquo;adobe&rsquo; if compiled with <code>CFF_CONFIG_OPTION_OLD_ENGINE</code>. If this configuration macro isn't defined, &lsquo;hinting-engine&rsquo; does nothing.</p>
2388 <p>The same holds for the Type&nbsp;1 and CID modules if compiled with <code>T1_CONFIG_OPTION_OLD_ENGINE</code>.</p>
2389 <p>For the &lsquo;cff&rsquo; module, the default engine is &lsquo;adobe&rsquo;. For both the &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules, the default engine is &lsquo;adobe&rsquo;, too.</p>
2390 <h4>note</h4>
2391
2392 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2393 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;adobe&rsquo; or &lsquo;freetype&rsquo;).</p>
2394 <h4>example</h4>
2395
2396 <p>The following example code demonstrates how to select Adobe's hinting engine for the &lsquo;cff&rsquo; module (omitting the error handling).
2397 <div class="highlight"><pre><span></span><code> FT_Library library;
2398 FT_UInt hinting_engine = FT_HINTING_ADOBE;
2399
2400
2401 FT_Init_FreeType( &amp;library );
2402
2403 FT_Property_Set( library, &quot;cff&quot;,
2404 &quot;hinting-engine&quot;, &amp;hinting_engine );
2405 </code></pre></div></p>
2406 <h4>since</h4>
2407
2408 <p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
2409 <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
2410 <hr>
2411
2412 <h2 id="no-stem-darkening">no-stem-darkening<a class="headerlink" href="#no-stem-darkening" title="Permanent link">&para;</a></h2>
2413 <p>All glyphs that pass through the auto-hinter will be emboldened unless this property is set to TRUE. The same is true for the CFF, Type&nbsp;1, and CID font modules if the &lsquo;Adobe&rsquo; engine is selected (which is the default).</p>
2414 <p>Stem darkening emboldens glyphs at smaller sizes to make them more readable on common low-DPI screens when using linear alpha blending and gamma correction, see <code><a href="ft2-glyph_retrieval.html#ft_render_glyph">FT_Render_Glyph</a></code>. When not using linear alpha blending and gamma correction, glyphs will appear heavy and fuzzy!</p>
2415 <p>Gamma correction essentially lightens fonts since shades of grey are shifted to higher pixel values (=&nbsp;higher brightness) to match the original intention to the reality of our screens. The side-effect is that glyphs &lsquo;thin out&rsquo;. Mac OS&nbsp;X and Adobe's proprietary font rendering library implement a counter-measure: stem darkening at smaller sizes where shades of gray dominate. By emboldening a glyph slightly in relation to its pixel size, individual pixels get higher coverage of filled-in outlines and are therefore &lsquo;blacker&rsquo;. This counteracts the &lsquo;thinning out&rsquo; of glyphs, making text remain readable at smaller sizes.</p>
2416 <p>For the auto-hinter, stem-darkening is experimental currently and thus switched off by default (that is, <code>no-stem-darkening</code> is set to TRUE by default). Total consistency with the CFF driver is not achieved right now because the emboldening method differs and glyphs must be scaled down on the Y-axis to keep outline points inside their precomputed blue zones. The smaller the size (especially 9ppem and down), the higher the loss of emboldening versus the CFF driver.</p>
2417 <p>Note that stem darkening is never applied if <code><a href="ft2-glyph_retrieval.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code> is set.</p>
2418 <h4>note</h4>
2419
2420 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2421 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively). It can also be set per face using <code><a href="ft2-face_creation.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_stem_darkening">FT_PARAM_TAG_STEM_DARKENING</a></code>.</p>
2422 <h4>example</h4>
2423 <div class="highlight"><pre><span></span><code> FT_Library library;
2424 FT_Bool no_stem_darkening = TRUE;
2425
2426
2427 FT_Init_FreeType( &amp;library );
2428
2429 FT_Property_Set( library, &quot;cff&quot;,
2430 &quot;no-stem-darkening&quot;, &amp;no_stem_darkening );
2431 </code></pre></div>
2432 <h4>since</h4>
2433
2434 <p>2.4.12 (for &lsquo;cff&rsquo; module)</p>
2435 <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
2436 <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
2437 <hr>
2438
2439 <h2 id="darkening-parameters">darkening-parameters<a class="headerlink" href="#darkening-parameters" title="Permanent link">&para;</a></h2>
2440 <p>By default, the Adobe hinting engine, as used by the CFF, Type&nbsp;1, and CID font drivers, darkens stems as follows (if the <code>no-stem-darkening</code> property isn't set):
2441 <div class="highlight"><pre><span></span><code> stem width &lt;= 0.5px: darkening amount = 0.4px
2442 stem width = 1px: darkening amount = 0.275px
2443 stem width = 1.667px: darkening amount = 0.275px
2444 stem width &gt;= 2.333px: darkening amount = 0px
2445 </code></pre></div></p>
2446 <p>and piecewise linear in-between. At configuration time, these four control points can be set with the macro <code>CFF_CONFIG_OPTION_DARKENING_PARAMETERS</code>; the CFF, Type&nbsp;1, and CID drivers share these values. At runtime, the control points can be changed using the <code>darkening-parameters</code> property (see the example below that demonstrates this for the Type&nbsp;1 driver).</p>
2447 <p>The x&nbsp;values give the stem width, and the y&nbsp;values the darkening amount. The unit is 1000<sup>th</sup> of pixels. All coordinate values must be positive; the x&nbsp;values must be monotonically increasing; the y&nbsp;values must be monotonically decreasing and smaller than or equal to 500 (corresponding to half a pixel); the slope of each linear piece must be shallower than -1 (e.g., -.4).</p>
2448 <p>The auto-hinter provides this property, too, as an experimental feature. See <code><a href="ft2-properties.html#no-stem-darkening">no-stem-darkening</a></code> for more.</p>
2449 <h4>note</h4>
2450
2451 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2452 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable, using eight comma-separated integers without spaces. Here the above example, using <code>\</code> to break the line for readability.
2453 <div class="highlight"><pre><span></span><code> FREETYPE_PROPERTIES=\
2454 type1:darkening-parameters=500,300,1000,200,1500,100,2000,0
2455 </code></pre></div></p>
2456 <h4>example</h4>
2457 <div class="highlight"><pre><span></span><code> FT_Library library;
2458 FT_Int darken_params[8] = { 500, 300, // x1, y1
2459 1000, 200, // x2, y2
2460 1500, 100, // x3, y3
2461 2000, 0 }; // x4, y4
2462
2463
2464 FT_Init_FreeType( &amp;library );
2465
2466 FT_Property_Set( library, &quot;type1&quot;,
2467 &quot;darkening-parameters&quot;, darken_params );
2468 </code></pre></div>
2469 <h4>since</h4>
2470
2471 <p>2.5.1 (for &lsquo;cff&rsquo; module)</p>
2472 <p>2.6.2 (for &lsquo;autofitter&rsquo; module)</p>
2473 <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
2474 <hr>
2475
2476 <h2 id="random-seed">random-seed<a class="headerlink" href="#random-seed" title="Permanent link">&para;</a></h2>
2477 <p>By default, the seed value for the CFF &lsquo;random&rsquo; operator and the similar &lsquo;0 28 callothersubr pop&rsquo; command for the Type&nbsp;1 and CID drivers is set to a random value. However, mainly for debugging purposes, it is often necessary to use a known value as a seed so that the pseudo-random number sequences generated by &lsquo;random&rsquo; are repeatable.</p>
2478 <p>The <code>random-seed</code> property does that. Its argument is a signed 32bit integer; if the value is zero or negative, the seed given by the <code>intitialRandomSeed</code> private DICT operator in a CFF file gets used (or a default value if there is no such operator). If the value is positive, use it instead of <code>initialRandomSeed</code>, which is consequently ignored.</p>
2479 <h4>note</h4>
2480
2481 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable. It can also be set per face using <code><a href="ft2-face_creation.html#ft_face_properties">FT_Face_Properties</a></code> with <code><a href="ft2-parameter_tags.html#ft_param_tag_random_seed">FT_PARAM_TAG_RANDOM_SEED</a></code>.</p>
2482 <h4>since</h4>
2483
2484 <p>2.8 (for &lsquo;cff&rsquo; module)</p>
2485 <p>2.9 (for &lsquo;type1&rsquo; and &lsquo;t1cid&rsquo; modules)</p>
2486 <hr>
2487
2488 <h2 id="no-long-family-names">no-long-family-names<a class="headerlink" href="#no-long-family-names" title="Permanent link">&para;</a></h2>
2489 <p>If <code>PCF_CONFIG_OPTION_LONG_FAMILY_NAMES</code> is active while compiling FreeType, the PCF driver constructs long family names.</p>
2490 <p>There are many PCF fonts just called &lsquo;Fixed&rsquo; which look completely different, and which have nothing to do with each other. When selecting &lsquo;Fixed&rsquo; in KDE or Gnome one gets results that appear rather random, the style changes often if one changes the size and one cannot select some fonts at all. The improve this situation, the PCF module prepends the foundry name (plus a space) to the family name. It also checks whether there are &lsquo;wide&rsquo; characters; all put together, family names like &lsquo;Sony Fixed&rsquo; or &lsquo;Misc Fixed Wide&rsquo; are constructed.</p>
2491 <p>If <code>no-long-family-names</code> is set, this feature gets switched off.</p>
2492 <h4>note</h4>
2493
2494 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2495 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values 1 and 0 for &lsquo;on&rsquo; and &lsquo;off&rsquo;, respectively).</p>
2496 <h4>example</h4>
2497 <div class="highlight"><pre><span></span><code> FT_Library library;
2498 FT_Bool no_long_family_names = TRUE;
2499
2500
2501 FT_Init_FreeType( &amp;library );
2502
2503 FT_Property_Set( library, &quot;pcf&quot;,
2504 &quot;no-long-family-names&quot;,
2505 &amp;no_long_family_names );
2506 </code></pre></div>
2507 <h4>since</h4>
2508
2509 <p>2.8</p>
2510 <hr>
2511
2512 <h2 id="tt_interpreter_version_xxx">TT_INTERPRETER_VERSION_XXX<a class="headerlink" href="#tt_interpreter_version_xxx" title="Permanent link">&para;</a></h2>
2513 <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
2514 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</a> 35
2515 #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</a> 38
2516 #<span class="keyword">define</span> <a href="ft2-properties.html#tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</a> 40
2517 </code></pre></div>
2518
2519 <p>A list of constants used for the <code><a href="ft2-properties.html#interpreter-version">interpreter-version</a></code> property to select the hinting engine for Truetype fonts.</p>
2520 <p>The numeric value in the constant names represents the version number as returned by the &lsquo;GETINFO&rsquo; bytecode instruction.</p>
2521 <h4>values</h4>
2522 <table class="fields">
2523 <tr><td class="val" id="tt_interpreter_version_35">TT_INTERPRETER_VERSION_35</td><td class="desc">
2524 <p>Version 35 corresponds to MS rasterizer v.1.7 as used e.g. in Windows 98; only grayscale and B/W rasterizing is supported.</p>
2525 </td></tr>
2526 <tr><td class="val" id="tt_interpreter_version_38">TT_INTERPRETER_VERSION_38</td><td class="desc">
2527 <p>Version 38 is the same Version 40. The original ‘Infinality’ code is no longer available.</p>
2528 </td></tr>
2529 <tr><td class="val" id="tt_interpreter_version_40">TT_INTERPRETER_VERSION_40</td><td class="desc">
2530 <p>Version 40 corresponds to MS rasterizer v.2.1; it is roughly equivalent to the hinting provided by DirectWrite ClearType (as can be found, for example, in Microsoft's Edge Browser on Windows 10). It is used in FreeType to select the ‘minimal’ subpixel hinting code, a stripped-down and higher performance version of the ‘Infinality’ code.</p>
2531 </td></tr>
2532 </table>
2533
2534 <h4>note</h4>
2535
2536 <p>This property controls the behaviour of the bytecode interpreter and thus how outlines get hinted. It does <strong>not</strong> control how glyph get rasterized! In particular, it does not control subpixel color filtering.</p>
2537 <p>If FreeType has not been compiled with the configuration option <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code>, selecting version&nbsp;38 or&nbsp;40 causes an <code>FT_Err_Unimplemented_Feature</code> error.</p>
2538 <p>Depending on the graphics framework, Microsoft uses different bytecode and rendering engines. As a consequence, the version numbers returned by a call to the &lsquo;GETINFO&rsquo; bytecode instruction are more convoluted than desired.</p>
2539 <p>Here are two tables that try to shed some light on the possible values for the MS rasterizer engine, together with the additional features introduced by it.
2540 <div class="highlight"><pre><span></span><code> GETINFO framework version feature
2541 -------------------------------------------------------------------
2542 3 GDI (Win 3.1), v1.0 16-bit, first version
2543 TrueImage
2544 33 GDI (Win NT 3.1), v1.5 32-bit
2545 HP Laserjet
2546 34 GDI (Win 95) v1.6 font smoothing,
2547 new SCANTYPE opcode
2548 35 GDI (Win 98/2000) v1.7 (UN)SCALED_COMPONENT_OFFSET
2549 bits in composite glyphs
2550 36 MGDI (Win CE 2) v1.6+ classic ClearType
2551 37 GDI (XP and later), v1.8 ClearType
2552 GDI+ old (before Vista)
2553 38 GDI+ old (Vista, Win 7), v1.9 subpixel ClearType,
2554 WPF Y-direction ClearType,
2555 additional error checking
2556 39 DWrite (before Win 8) v2.0 subpixel ClearType flags
2557 in GETINFO opcode,
2558 bug fixes
2559 40 GDI+ (after Win 7), v2.1 Y-direction ClearType flag
2560 DWrite (Win 8) in GETINFO opcode,
2561 Gray ClearType
2562 </code></pre></div></p>
2563 <p>The &lsquo;version&rsquo; field gives a rough orientation only, since some applications provided certain features much earlier (as an example, Microsoft Reader used subpixel and Y-direction ClearType already in Windows 2000). Similarly, updates to a given framework might include improved hinting support.
2564 <div class="highlight"><pre><span></span><code> version sampling rendering comment
2565 x y x y
2566 --------------------------------------------------------------
2567 v1.0 normal normal B/W B/W bi-level
2568 v1.6 high high gray gray grayscale
2569 v1.8 high normal color-filter B/W (GDI) ClearType
2570 v1.9 high high color-filter gray Color ClearType
2571 v2.1 high normal gray B/W Gray ClearType
2572 v2.1 high high gray gray Gray ClearType
2573 </code></pre></div></p>
2574 <p>Color and Gray ClearType are the two available variants of &lsquo;Y-direction ClearType&rsquo;, meaning grayscale rasterization along the Y-direction; the name used in the TrueType specification for this feature is &lsquo;symmetric smoothing&rsquo;. &lsquo;Classic ClearType&rsquo; is the original algorithm used before introducing a modified version in Win&nbsp;XP. Another name for v1.6's grayscale rendering is &lsquo;font smoothing&rsquo;, and &lsquo;Color ClearType&rsquo; is sometimes also called &lsquo;DWrite ClearType&rsquo;. To differentiate between today's Color ClearType and the earlier ClearType variant with B/W rendering along the vertical axis, the latter is sometimes called &lsquo;GDI ClearType&rsquo;.</p>
2575 <p>&lsquo;Normal&rsquo; and &lsquo;high&rsquo; sampling describe the (virtual) resolution to access the rasterized outline after the hinting process. &lsquo;Normal&rsquo; means 1 sample per grid line (i.e., B/W). In the current Microsoft implementation, &lsquo;high&rsquo; means an extra virtual resolution of 16x16 (or 16x1) grid lines per pixel for bytecode instructions like &lsquo;MIRP&rsquo;. After hinting, these 16 grid lines are mapped to 6x5 (or 6x1) grid lines for color filtering if Color ClearType is activated.</p>
2576 <p>Note that &lsquo;Gray ClearType&rsquo; is essentially the same as v1.6's grayscale rendering. However, the GETINFO instruction handles it differently: v1.6 returns bit&nbsp;12 (hinting for grayscale), while v2.1 returns bits&nbsp;13 (hinting for ClearType), 18 (symmetrical smoothing), and&nbsp;19 (Gray ClearType). Also, this mode respects bits 2 and&nbsp;3 for the version&nbsp;1 gasp table exclusively (like Color ClearType), while v1.6 only respects the values of version&nbsp;0 (bits 0 and&nbsp;1).</p>
2577 <p>Keep in mind that the features of the above interpreter versions might not map exactly to FreeType features or behavior because it is a fundamentally different library with different internals.</p>
2578 <hr>
2579
2580 <h2 id="interpreter-version">interpreter-version<a class="headerlink" href="#interpreter-version" title="Permanent link">&para;</a></h2>
2581 <p>Currently, three versions are available, two representing the bytecode interpreter with subpixel hinting support (old &lsquo;Infinality&rsquo; code and new stripped-down and higher performance &lsquo;minimal&rsquo; code) and one without, respectively. The default is subpixel support if <code>TT_CONFIG_OPTION_SUBPIXEL_HINTING</code> is defined, and no subpixel support otherwise (since it isn't available then).</p>
2582 <p>If subpixel hinting is on, many TrueType bytecode instructions behave differently compared to B/W or grayscale rendering (except if &lsquo;native ClearType&rsquo; is selected by the font). Microsoft's main idea is to render at a much increased horizontal resolution, then sampling down the created output to subpixel precision. However, many older fonts are not suited to this and must be specially taken care of by applying (hardcoded) tweaks in Microsoft's interpreter.</p>
2583 <p>Details on subpixel hinting and some of the necessary tweaks can be found in Greg Hitchcock's whitepaper at &lsquo;<a href="https://learn.microsoft.com/typography/cleartype/truetypecleartype">https://learn.microsoft.com/typography/cleartype/truetypecleartype</a>&rsquo;. Note that FreeType currently doesn't really &lsquo;subpixel hint&rsquo; (6x1, 6x2, or 6x5 supersampling) like discussed in the paper. Depending on the chosen interpreter, it simply ignores instructions on vertical stems to arrive at very similar results.</p>
2584 <h4>note</h4>
2585
2586 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2587 <p>This property can be set via the <code>FREETYPE_PROPERTIES</code> environment variable (using values &lsquo;35&rsquo;, &lsquo;38&rsquo;, or &lsquo;40&rsquo;).</p>
2588 <h4>example</h4>
2589
2590 <p>The following example code demonstrates how to deactivate subpixel hinting (omitting the error handling).
2591 <div class="highlight"><pre><span></span><code> FT_Library library;
2592 FT_Face face;
2593 FT_UInt interpreter_version = TT_INTERPRETER_VERSION_35;
2594
2595
2596 FT_Init_FreeType( &amp;library );
2597
2598 FT_Property_Set( library, &quot;truetype&quot;,
2599 &quot;interpreter-version&quot;,
2600 &amp;interpreter_version );
2601 </code></pre></div></p>
2602 <h4>since</h4>
2603
2604 <p>2.5</p>
2605 <hr>
2606
2607 <h2 id="spread">spread<a class="headerlink" href="#spread" title="Permanent link">&para;</a></h2>
2608 <p>This property of the &lsquo;sdf&rsquo; and &lsquo;bsdf&rsquo; renderers defines how the signed distance field (SDF) is represented in the output bitmap. The output values are calculated as follows, &lsquo;128 * ( SDF / spread + 1 )&rsquo;, with the result clamped to the 8-bit range [0..255]. Therefore, &lsquo;spread&rsquo; is also the maximum euclidean distance from the edge after which the values are clamped. The spread is specified in pixels with the default value of 8. For accurate SDF texture mapping (interpolation), the spread should be large enough to accommodate the target grid unit.</p>
2609 <h4>example</h4>
2610
2611 <p>The following example code demonstrates how to set the SDF spread (omitting the error handling).
2612 <div class="highlight"><pre><span></span><code> FT_Library library;
2613 FT_Int spread = 2;
2614
2615
2616 FT_Init_FreeType( &amp;library );
2617
2618 FT_Property_Set( library, &quot;sdf&quot;, &quot;spread&quot;, &amp;spread );
2619 </code></pre></div></p>
2620 <h4>note</h4>
2621
2622 <p>FreeType has two rasterizers for generating SDF, namely:</p>
2623 <ol>
2624 <li>
2625 <p><code>sdf</code> for generating SDF directly from glyph's outline, and</p>
2626 </li>
2627 <li>
2628 <p><code>bsdf</code> for generating SDF from rasterized bitmaps.</p>
2629 </li>
2630 </ol>
2631 <p>Depending on the glyph type (i.e., outline or bitmap), one of the two rasterizers is chosen at runtime and used for generating SDFs. To force the use of <code>bsdf</code> you should render the glyph with any of the FreeType's other rendering modes (e.g., <code>FT_RENDER_MODE_NORMAL</code>) and then re-render with <code>FT_RENDER_MODE_SDF</code>.</p>
2632 <p>There are some issues with stability and possible failures of the SDF renderers (specifically <code>sdf</code>).</p>
2633 <ol>
2634 <li>
2635 <p>The <code>sdf</code> rasterizer is sensitive to really small features (e.g., sharp turns that are less than 1&nbsp;pixel) and imperfections in the glyph's outline, causing artifacts in the final output.</p>
2636 </li>
2637 <li>
2638 <p>The <code>sdf</code> rasterizer has limited support for handling intersecting contours and <em>cannot</em> handle self-intersecting contours whatsoever. Self-intersection happens when a single connected contour intersects itself at some point; having these in your font definitely poses a problem to the rasterizer and cause artifacts, too.</p>
2639 </li>
2640 <li>
2641 <p>Generating SDF for really small glyphs may result in undesirable output; the pixel grid (which stores distance information) becomes too coarse.</p>
2642 </li>
2643 <li>
2644 <p>Since the output buffer is normalized, precision at smaller spreads is greater than precision at larger spread values because the output range of [0..255] gets mapped to a smaller SDF range. A spread of&nbsp;2 should be sufficient in most cases.</p>
2645 </li>
2646 </ol>
2647 <p>Points (1) and (2) can be avoided by using the <code>bsdf</code> rasterizer, which is more stable than the <code>sdf</code> rasterizer in general.</p>
2648 <h4>since</h4>
2649
2650 <p>2.11</p>
2651 <hr>
2652
2653 <h2 id="svg-hooks">svg-hooks<a class="headerlink" href="#svg-hooks" title="Permanent link">&para;</a></h2>
2654 <p>Set up the interface between FreeType and an extern SVG rendering library like &lsquo;librsvg&rsquo;. All details on the function hooks can be found in section &lsquo;<a href="ft2-svg_fonts.html#svg_fonts">OpenType SVG Fonts</a>&rsquo;.</p>
2655 <h4>example</h4>
2656
2657 <p>The following example code expects that the four hook functions <code>svg_*</code> are defined elsewhere. Error handling is omitted, too.
2658 <div class="highlight"><pre><span></span><code> FT_Library library;
2659 SVG_RendererHooks hooks = {
2660 (SVG_Lib_Init_Func)svg_init,
2661 (SVG_Lib_Free_Func)svg_free,
2662 (SVG_Lib_Render_Func)svg_render,
2663 (SVG_Lib_Preset_Slot_Func)svg_preset_slot };
2664
2665
2666 FT_Init_FreeType( &amp;library );
2667
2668 FT_Property_Set( library, &quot;ot-svg&quot;,
2669 &quot;svg-hooks&quot;, &amp;hooks );
2670 </code></pre></div></p>
2671 <h4>since</h4>
2672
2673 <p>2.12</p>
2674 <hr>
2675
2676 <h2 id="glyph-to-script-map">glyph-to-script-map<a class="headerlink" href="#glyph-to-script-map" title="Permanent link">&para;</a></h2>
2677 <p><strong>Experimental only</strong></p>
2678 <p>The auto-hinter provides various script modules to hint glyphs. Examples of supported scripts are Latin or CJK. Before a glyph is auto-hinted, the Unicode character map of the font gets examined, and the script is then determined based on Unicode character ranges, see below.</p>
2679 <p>OpenType fonts, however, often provide much more glyphs than character codes (small caps, superscripts, ligatures, swashes, etc.), to be controlled by so-called &lsquo;features&rsquo;. Handling OpenType features can be quite complicated and thus needs a separate library on top of FreeType.</p>
2680 <p>The mapping between glyph indices and scripts (in the auto-hinter sense, see the <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX</a></code> values) is stored as an array with <code>num_glyphs</code> elements, as found in the font's <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> structure. The <code>glyph-to-script-map</code> property returns a pointer to this array, which can be modified as needed. Note that the modification should happen before the first glyph gets processed by the auto-hinter so that the global analysis of the font shapes actually uses the modified mapping.</p>
2681 <h4>example</h4>
2682
2683 <p>The following example code demonstrates how to access it (omitting the error handling).
2684 <div class="highlight"><pre><span></span><code> FT_Library library;
2685 FT_Face face;
2686 FT_Prop_GlyphToScriptMap prop;
2687
2688
2689 FT_Init_FreeType( &amp;library );
2690 FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face );
2691
2692 prop.face = face;
2693
2694 FT_Property_Get( library, &quot;autofitter&quot;,
2695 &quot;glyph-to-script-map&quot;, &amp;prop );
2696
2697 // adjust `prop.map&#39; as needed right here
2698
2699 FT_Load_Glyph( face, ..., FT_LOAD_FORCE_AUTOHINT );
2700 </code></pre></div></p>
2701 <h4>since</h4>
2702
2703 <p>2.4.11</p>
2704 <hr>
2705
2706 <h2 id="ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_XXX<a class="headerlink" href="#ft_autohinter_script_xxx" title="Permanent link">&para;</a></h2>
2707 <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
2708 <div class = "codehilite"><pre><code>#<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</a> 0
2709 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</a> 1
2710 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</a> 2
2711 #<span class="keyword">define</span> <a href="ft2-properties.html#ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</a> 3
2712 </code></pre></div>
2713
2714 <p><strong>Experimental only</strong></p>
2715 <p>A list of constants used for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property to specify the script submodule the auto-hinter should use for hinting a particular glyph.</p>
2716 <h4>values</h4>
2717 <table class="fields long">
2718 <tr><td class="val" id="ft_autohinter_script_none">FT_AUTOHINTER_SCRIPT_NONE</td><td class="desc">
2719 <p>Don't auto-hint this glyph.</p>
2720 </td></tr>
2721 <tr><td class="val" id="ft_autohinter_script_latin">FT_AUTOHINTER_SCRIPT_LATIN</td><td class="desc">
2722 <p>Apply the latin auto-hinter. For the auto-hinter, ‘latin’ is a very broad term, including Cyrillic and Greek also since characters from those scripts share the same design constraints.</p>
2723 <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
2724 <pre><code> U+0020 - U+007F // Basic Latin (no control characters)
2725 U+00A0 - U+00FF // Latin-1 Supplement (no control characters)
2726 U+0100 - U+017F // Latin Extended-A
2727 U+0180 - U+024F // Latin Extended-B
2728 U+0250 - U+02AF // IPA Extensions
2729 U+02B0 - U+02FF // Spacing Modifier Letters
2730 U+0300 - U+036F // Combining Diacritical Marks
2731 U+0370 - U+03FF // Greek and Coptic
2732 U+0400 - U+04FF // Cyrillic
2733 U+0500 - U+052F // Cyrillic Supplement
2734 U+1D00 - U+1D7F // Phonetic Extensions
2735 U+1D80 - U+1DBF // Phonetic Extensions Supplement
2736 U+1DC0 - U+1DFF // Combining Diacritical Marks Supplement
2737 U+1E00 - U+1EFF // Latin Extended Additional
2738 U+1F00 - U+1FFF // Greek Extended
2739 U+2000 - U+206F // General Punctuation
2740 U+2070 - U+209F // Superscripts and Subscripts
2741 U+20A0 - U+20CF // Currency Symbols
2742 U+2150 - U+218F // Number Forms
2743 U+2460 - U+24FF // Enclosed Alphanumerics
2744 U+2C60 - U+2C7F // Latin Extended-C
2745 U+2DE0 - U+2DFF // Cyrillic Extended-A
2746 U+2E00 - U+2E7F // Supplemental Punctuation
2747 U+A640 - U+A69F // Cyrillic Extended-B
2748 U+A720 - U+A7FF // Latin Extended-D
2749 U+FB00 - U+FB06 // Alphab. Present. Forms (Latin Ligatures)
2750 U+1D400 - U+1D7FF // Mathematical Alphanumeric Symbols
2751 U+1F100 - U+1F1FF // Enclosed Alphanumeric Supplement
2752 </code></pre>
2753 </td></tr>
2754 <tr><td class="val" id="ft_autohinter_script_cjk">FT_AUTOHINTER_SCRIPT_CJK</td><td class="desc">
2755 <p>Apply the CJK auto-hinter, covering Chinese, Japanese, Korean, old Vietnamese, and some other scripts.</p>
2756 <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
2757 <pre><code> U+1100 - U+11FF // Hangul Jamo
2758 U+2E80 - U+2EFF // CJK Radicals Supplement
2759 U+2F00 - U+2FDF // Kangxi Radicals
2760 U+2FF0 - U+2FFF // Ideographic Description Characters
2761 U+3000 - U+303F // CJK Symbols and Punctuation
2762 U+3040 - U+309F // Hiragana
2763 U+30A0 - U+30FF // Katakana
2764 U+3100 - U+312F // Bopomofo
2765 U+3130 - U+318F // Hangul Compatibility Jamo
2766 U+3190 - U+319F // Kanbun
2767 U+31A0 - U+31BF // Bopomofo Extended
2768 U+31C0 - U+31EF // CJK Strokes
2769 U+31F0 - U+31FF // Katakana Phonetic Extensions
2770 U+3200 - U+32FF // Enclosed CJK Letters and Months
2771 U+3300 - U+33FF // CJK Compatibility
2772 U+3400 - U+4DBF // CJK Unified Ideographs Extension A
2773 U+4DC0 - U+4DFF // Yijing Hexagram Symbols
2774 U+4E00 - U+9FFF // CJK Unified Ideographs
2775 U+A960 - U+A97F // Hangul Jamo Extended-A
2776 U+AC00 - U+D7AF // Hangul Syllables
2777 U+D7B0 - U+D7FF // Hangul Jamo Extended-B
2778 U+F900 - U+FAFF // CJK Compatibility Ideographs
2779 U+FE10 - U+FE1F // Vertical forms
2780 U+FE30 - U+FE4F // CJK Compatibility Forms
2781 U+FF00 - U+FFEF // Halfwidth and Fullwidth Forms
2782 U+1B000 - U+1B0FF // Kana Supplement
2783 U+1D300 - U+1D35F // Tai Xuan Hing Symbols
2784 U+1F200 - U+1F2FF // Enclosed Ideographic Supplement
2785 U+20000 - U+2A6DF // CJK Unified Ideographs Extension B
2786 U+2A700 - U+2B73F // CJK Unified Ideographs Extension C
2787 U+2B740 - U+2B81F // CJK Unified Ideographs Extension D
2788 U+2F800 - U+2FA1F // CJK Compatibility Ideographs Supplement
2789 </code></pre>
2790 </td></tr>
2791 <tr><td class="val" id="ft_autohinter_script_indic">FT_AUTOHINTER_SCRIPT_INDIC</td><td class="desc">
2792 <p>Apply the indic auto-hinter, covering all major scripts from the Indian sub-continent and some other related scripts like Thai, Lao, or Tibetan.</p>
2793 <p>By default, characters from the following Unicode ranges are assigned to this submodule.</p>
2794 <pre><code> U+0900 - U+0DFF // Indic Range
2795 U+0F00 - U+0FFF // Tibetan
2796 U+1900 - U+194F // Limbu
2797 U+1B80 - U+1BBF // Sundanese
2798 U+A800 - U+A82F // Syloti Nagri
2799 U+ABC0 - U+ABFF // Meetei Mayek
2800 U+11800 - U+118DF // Sharada
2801 </code></pre>
2802 <p>Note that currently Indic support is rudimentary only, missing blue zone support.</p>
2803 </td></tr>
2804 </table>
2805
2806 <h4>since</h4>
2807
2808 <p>2.4.11</p>
2809 <hr>
2810
2811 <h2 id="ft_prop_glyphtoscriptmap">FT_Prop_GlyphToScriptMap<a class="headerlink" href="#ft_prop_glyphtoscriptmap" title="Permanent link">&para;</a></h2>
2812 <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
2813 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_GlyphToScriptMap_
2814 {
2815 <a href="ft2-face_creation.html#ft_face">FT_Face</a> face;
2816 <a href="ft2-basic_types.html#ft_ushort">FT_UShort</a>* map;
2817
2818 } <b>FT_Prop_GlyphToScriptMap</b>;
2819 </code></pre></div>
2820
2821 <p><strong>Experimental only</strong></p>
2822 <p>The data exchange structure for the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property.</p>
2823 <h4>since</h4>
2824
2825 <p>2.4.11</p>
2826 <hr>
2827
2828 <h2 id="fallback-script">fallback-script<a class="headerlink" href="#fallback-script" title="Permanent link">&para;</a></h2>
2829 <p><strong>Experimental only</strong></p>
2830 <p>If no auto-hinter script module can be assigned to a glyph, a fallback script gets assigned to it (see also the <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code> property). By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_CJK</a></code>. Using the <code>fallback-script</code> property, this fallback value can be changed.</p>
2831 <h4>note</h4>
2832
2833 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2834 <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the fallback script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the fallback script will affect this face.</p>
2835 <h4>example</h4>
2836 <div class="highlight"><pre><span></span><code> FT_Library library;
2837 FT_UInt fallback_script = FT_AUTOHINTER_SCRIPT_NONE;
2838
2839
2840 FT_Init_FreeType( &amp;library );
2841
2842 FT_Property_Set( library, &quot;autofitter&quot;,
2843 &quot;fallback-script&quot;, &amp;fallback_script );
2844 </code></pre></div>
2845 <h4>since</h4>
2846
2847 <p>2.4.11</p>
2848 <hr>
2849
2850 <h2 id="default-script">default-script<a class="headerlink" href="#default-script" title="Permanent link">&para;</a></h2>
2851 <p><strong>Experimental only</strong></p>
2852 <p>If FreeType gets compiled with <code>FT_CONFIG_OPTION_USE_HARFBUZZ</code> to make the HarfBuzz library access OpenType features for getting better glyph coverages, this property sets the (auto-fitter) script to be used for the default (OpenType) script data of a font's GSUB table. Features for the default script are intended for all scripts not explicitly handled in GSUB; an example is a &lsquo;dlig&rsquo; feature, containing the combination of the characters &lsquo;T&rsquo;, &lsquo;E&rsquo;, and &lsquo;L&rsquo; to form a &lsquo;TEL&rsquo; ligature.</p>
2853 <p>By default, this is <code><a href="ft2-properties.html#ft_autohinter_script_xxx">FT_AUTOHINTER_SCRIPT_LATIN</a></code>. Using the <code>default-script</code> property, this default value can be changed.</p>
2854 <h4>note</h4>
2855
2856 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2857 <p>It's important to use the right timing for changing this value: The creation of the glyph-to-script map that eventually uses the default script value gets triggered either by setting or reading a face-specific property like <code><a href="ft2-properties.html#glyph-to-script-map">glyph-to-script-map</a></code>, or by auto-hinting any glyph from that face. In particular, if you have already created an <code><a href="ft2-face_creation.html#ft_face">FT_Face</a></code> structure but not loaded any glyph (using the auto-hinter), a change of the default script will affect this face.</p>
2858 <h4>example</h4>
2859 <div class="highlight"><pre><span></span><code> FT_Library library;
2860 FT_UInt default_script = FT_AUTOHINTER_SCRIPT_NONE;
2861
2862
2863 FT_Init_FreeType( &amp;library );
2864
2865 FT_Property_Set( library, &quot;autofitter&quot;,
2866 &quot;default-script&quot;, &amp;default_script );
2867 </code></pre></div>
2868 <h4>since</h4>
2869
2870 <p>2.5.3</p>
2871 <hr>
2872
2873 <h2 id="increase-x-height">increase-x-height<a class="headerlink" href="#increase-x-height" title="Permanent link">&para;</a></h2>
2874 <p>For ppem values in the range 6&nbsp;&lt;= ppem &lt;= <code>increase-x-height</code>, round up the font's x&nbsp;height much more often than normally. If the value is set to&nbsp;0, which is the default, this feature is switched off. Use this property to improve the legibility of small font sizes if necessary.</p>
2875 <h4>note</h4>
2876
2877 <p>This property can be used with <code><a href="ft2-module_management.html#ft_property_get">FT_Property_Get</a></code> also.</p>
2878 <p>Set this value right after calling <code><a href="ft2-sizing_and_scaling.html#ft_set_char_size">FT_Set_Char_Size</a></code>, but before loading any glyph (using the auto-hinter).</p>
2879 <h4>example</h4>
2880 <div class="highlight"><pre><span></span><code> FT_Library library;
2881 FT_Face face;
2882 FT_Prop_IncreaseXHeight prop;
2883
2884
2885 FT_Init_FreeType( &amp;library );
2886 FT_New_Face( library, &quot;foo.ttf&quot;, 0, &amp;face );
2887 FT_Set_Char_Size( face, 10 * 64, 0, 72, 0 );
2888
2889 prop.face = face;
2890 prop.limit = 14;
2891
2892 FT_Property_Set( library, &quot;autofitter&quot;,
2893 &quot;increase-x-height&quot;, &amp;prop );
2894 </code></pre></div>
2895 <h4>since</h4>
2896
2897 <p>2.4.11</p>
2898 <hr>
2899
2900 <h2 id="ft_prop_increasexheight">FT_Prop_IncreaseXHeight<a class="headerlink" href="#ft_prop_increasexheight" title="Permanent link">&para;</a></h2>
2901 <p>Defined in FT_DRIVER_H (freetype/ftdriver.h).</p>
2902 <div class = "codehilite"><pre><code> <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Prop_IncreaseXHeight_
2903 {
2904 <a href="ft2-face_creation.html#ft_face">FT_Face</a> face;
2905 <a href="ft2-basic_types.html#ft_uint">FT_UInt</a> limit;
2906
2907 } <b>FT_Prop_IncreaseXHeight</b>;
2908 </code></pre></div>
2909
2910 <p>The data exchange structure for the <code><a href="ft2-properties.html#increase-x-height">increase-x-height</a></code> property.</p>
2911 <hr>
2912
2913 <h2 id="warping">warping<a class="headerlink" href="#warping" title="Permanent link">&para;</a></h2>
2914 <p><strong>Obsolete</strong></p>
2915 <p>This property was always experimental and probably never worked correctly. It was entirely removed from the FreeType&nbsp;2 sources. This entry is only here for historical reference.</p>
2916 <p>Warping only worked in &lsquo;normal&rsquo; auto-hinting mode replacing it. The idea of the code was to slightly scale and shift a glyph along the non-hinted dimension (which is usually the horizontal axis) so that as much of its segments were aligned (more or less) to the grid. To find out a glyph's optimal scaling and shifting value, various parameter combinations were tried and scored.</p>
2917 <h4>since</h4>
2918
2919 <p>2.6</p>
2920 <hr>
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934 </article>
2935 </div>
2936
2937
2938 <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
2939 </div>
2940
2941 </main>
2942
2943 <footer class="md-footer">
2944
2945 <div class="md-footer-meta md-typeset">
2946 <div class="md-footer-meta__inner md-grid">
2947 <div class="md-copyright">
2948
2949 <div class="md-copyright__highlight">
2950 Copyright 2026 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
2951 </div>
2952
2953
2954 Made with
2955 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
2956 Material for MkDocs
2957 </a>
2958
2959 </div>
2960
2961 </div>
2962 </div>
2963 </footer>
2964
2965 </div>
2966 <div class="md-dialog" data-md-component="dialog">
2967 <div class="md-dialog__inner md-typeset"></div>
2968 </div>
2969
2970
2971 <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>
2972
2973
2974 <script src="assets/javascripts/bundle.c8b220af.min.js"></script>
2975
2976 <script src="javascripts/extra.js"></script>
2977
2978
2979 </body>
2980 </html>