Imported Upstream version 2.13.2
[platform/upstream/freetype2.git] / docs / reference / ft2-tt_driver.html
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.13.2">
10       
11       
12       
13         <meta name="author" content="FreeType Contributors">
14       
15       
16       <link rel="icon" href="images/favico.ico">
17       <meta name="generator" content="mkdocs-1.4.3, mkdocs-material-7.1.9">
18     
19     
20       
21         <title>The TrueType driver - FreeType-2.13.2 API Reference</title>
22       
23     
24     
25       <link rel="stylesheet" href="assets/stylesheets/main.ca7ac06f.min.css">
26       
27         
28         <link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css">
29         
30           
31           
32           <meta name="theme-color" content="#4cae4f">
33         
34       
35     
36     
37     
38       
39         
40         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
41         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700%7CRoboto+Mono&display=fallback">
42         <style>:root{--md-text-font-family:"Noto Serif";--md-code-font-family:"Roboto Mono"}</style>
43       
44     
45     
46     
47       <link rel="stylesheet" href="stylesheets/extra.css">
48     
49     
50       
51
52
53     
54     
55   </head>
56   
57   
58     
59     
60     
61     
62     
63     <body dir="ltr" data-md-color-scheme="" data-md-color-primary="green" data-md-color-accent="green">
64   
65     
66     <script>function __prefix(e){return new URL(".",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
67     
68     <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
69     <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
70     <label class="md-overlay" for="__drawer"></label>
71     <div data-md-component="skip">
72       
73         
74         <a href="#the-truetype-driver" class="md-skip">
75           Skip to content
76         </a>
77       
78     </div>
79     <div data-md-component="announce">
80       
81     </div>
82     
83       <header class="md-header" data-md-component="header">
84   <nav class="md-header__inner md-grid" aria-label="Header">
85     <a href="index.html" title="FreeType-2.13.2 API Reference" class="md-header__button md-logo" aria-label="FreeType-2.13.2 API Reference" data-md-component="logo">
86       
87   <img src="images/favico.ico" alt="logo">
88
89     </a>
90     <label class="md-header__button md-icon" for="__drawer">
91       <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
92     </label>
93     <div class="md-header__title" data-md-component="header-title">
94       <div class="md-header__ellipsis">
95         <div class="md-header__topic">
96           <span class="md-ellipsis">
97             FreeType-2.13.2 API Reference
98           </span>
99         </div>
100         <div class="md-header__topic" data-md-component="header-topic">
101           <span class="md-ellipsis">
102             
103               The TrueType driver
104             
105           </span>
106         </div>
107       </div>
108     </div>
109     
110     
111     
112       <label class="md-header__button md-icon" for="__search">
113         <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.516 6.516 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 5z"/></svg>
114       </label>
115       
116 <div class="md-search" data-md-component="search" role="dialog">
117   <label class="md-search__overlay" for="__search"></label>
118   <div class="md-search__inner" role="search">
119     <form class="md-search__form" name="search">
120       <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" data-md-state="active" required>
121       <label class="md-search__icon md-icon" for="__search">
122         <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.516 6.516 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 5z"/></svg>
123         <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 11h12z"/></svg>
124       </label>
125       <button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
126         <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 12 19 6.41z"/></svg>
127       </button>
128     </form>
129     <div class="md-search__output">
130       <div class="md-search__scrollwrap" data-md-scrollfix>
131         <div class="md-search-result" data-md-component="search-result">
132           <div class="md-search-result__meta">
133             Initializing search
134           </div>
135           <ol class="md-search-result__list"></ol>
136         </div>
137       </div>
138     </div>
139   </div>
140 </div>
141     
142     
143   </nav>
144 </header>
145     
146     <div class="md-container" data-md-component="container">
147       
148       
149         
150       
151       <main class="md-main" data-md-component="main">
152         <div class="md-main__inner md-grid">
153           
154             
155               
156               <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
157                 <div class="md-sidebar__scrollwrap">
158                   <div class="md-sidebar__inner">
159                     
160
161
162 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
163   <label class="md-nav__title" for="__drawer">
164     <a href="index.html" title="FreeType-2.13.2 API Reference" class="md-nav__button md-logo" aria-label="FreeType-2.13.2 API Reference" data-md-component="logo">
165       
166   <img src="images/favico.ico" alt="logo">
167
168     </a>
169     FreeType-2.13.2 API Reference
170   </label>
171   
172   <ul class="md-nav__list" data-md-scrollfix>
173     
174       
175       
176       
177
178   
179   
180   
181     <li class="md-nav__item">
182       <a href="index.html" class="md-nav__link">
183         TOC
184       </a>
185     </li>
186   
187
188     
189       
190       
191       
192
193   
194   
195   
196     <li class="md-nav__item">
197       <a href="ft2-index.html" class="md-nav__link">
198         Index
199       </a>
200     </li>
201   
202
203     
204       
205       
206       
207
208   
209   
210   
211     
212     <li class="md-nav__item md-nav__item--nested">
213       
214       
215         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
216       
217       <label class="md-nav__link" for="__nav_3">
218         General Remarks
219         <span class="md-nav__icon md-icon"></span>
220       </label>
221       <nav class="md-nav" aria-label="General Remarks" data-md-level="1">
222         <label class="md-nav__title" for="__nav_3">
223           <span class="md-nav__icon md-icon"></span>
224           General Remarks
225         </label>
226         <ul class="md-nav__list" data-md-scrollfix>
227           
228             
229   
230   
231   
232     <li class="md-nav__item">
233       <a href="ft2-preamble.html" class="md-nav__link">
234         Preamble
235       </a>
236     </li>
237   
238
239           
240             
241   
242   
243   
244     <li class="md-nav__item">
245       <a href="ft2-header_inclusion.html" class="md-nav__link">
246         FreeType's header inclusion scheme
247       </a>
248     </li>
249   
250
251           
252             
253   
254   
255   
256     <li class="md-nav__item">
257       <a href="ft2-user_allocation.html" class="md-nav__link">
258         User allocation
259       </a>
260     </li>
261   
262
263           
264         </ul>
265       </nav>
266     </li>
267   
268
269     
270       
271       
272       
273
274   
275   
276   
277     
278     <li class="md-nav__item md-nav__item--nested">
279       
280       
281         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
282       
283       <label class="md-nav__link" for="__nav_4">
284         Core API
285         <span class="md-nav__icon md-icon"></span>
286       </label>
287       <nav class="md-nav" aria-label="Core API" data-md-level="1">
288         <label class="md-nav__title" for="__nav_4">
289           <span class="md-nav__icon md-icon"></span>
290           Core API
291         </label>
292         <ul class="md-nav__list" data-md-scrollfix>
293           
294             
295   
296   
297   
298     <li class="md-nav__item">
299       <a href="ft2-basic_types.html" class="md-nav__link">
300         Basic Data Types
301       </a>
302     </li>
303   
304
305           
306             
307   
308   
309   
310     <li class="md-nav__item">
311       <a href="ft2-library_setup.html" class="md-nav__link">
312         Library Setup
313       </a>
314     </li>
315   
316
317           
318             
319   
320   
321   
322     <li class="md-nav__item">
323       <a href="ft2-face_creation.html" class="md-nav__link">
324         Face Creation
325       </a>
326     </li>
327   
328
329           
330             
331   
332   
333   
334     <li class="md-nav__item">
335       <a href="ft2-font_testing_macros.html" class="md-nav__link">
336         Font Testing Macros
337       </a>
338     </li>
339   
340
341           
342             
343   
344   
345   
346     <li class="md-nav__item">
347       <a href="ft2-sizing_and_scaling.html" class="md-nav__link">
348         Sizing and Scaling
349       </a>
350     </li>
351   
352
353           
354             
355   
356   
357   
358     <li class="md-nav__item">
359       <a href="ft2-glyph_retrieval.html" class="md-nav__link">
360         Glyph Retrieval
361       </a>
362     </li>
363   
364
365           
366             
367   
368   
369   
370     <li class="md-nav__item">
371       <a href="ft2-character_mapping.html" class="md-nav__link">
372         Character Mapping
373       </a>
374     </li>
375   
376
377           
378             
379   
380   
381   
382     <li class="md-nav__item">
383       <a href="ft2-information_retrieval.html" class="md-nav__link">
384         Information Retrieval
385       </a>
386     </li>
387   
388
389           
390             
391   
392   
393   
394     <li class="md-nav__item">
395       <a href="ft2-other_api_data.html" class="md-nav__link">
396         Other API Data
397       </a>
398     </li>
399   
400
401           
402         </ul>
403       </nav>
404     </li>
405   
406
407     
408       
409       
410       
411
412   
413   
414   
415     
416     <li class="md-nav__item md-nav__item--nested">
417       
418       
419         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
420       
421       <label class="md-nav__link" for="__nav_5">
422         Extended API
423         <span class="md-nav__icon md-icon"></span>
424       </label>
425       <nav class="md-nav" aria-label="Extended API" data-md-level="1">
426         <label class="md-nav__title" for="__nav_5">
427           <span class="md-nav__icon md-icon"></span>
428           Extended API
429         </label>
430         <ul class="md-nav__list" data-md-scrollfix>
431           
432             
433   
434   
435   
436     <li class="md-nav__item">
437       <a href="ft2-glyph_variants.html" class="md-nav__link">
438         Unicode Variation Sequences
439       </a>
440     </li>
441   
442
443           
444             
445   
446   
447   
448     <li class="md-nav__item">
449       <a href="ft2-color_management.html" class="md-nav__link">
450         Glyph Color Management
451       </a>
452     </li>
453   
454
455           
456             
457   
458   
459   
460     <li class="md-nav__item">
461       <a href="ft2-layer_management.html" class="md-nav__link">
462         Glyph Layer Management
463       </a>
464     </li>
465   
466
467           
468             
469   
470   
471   
472     <li class="md-nav__item">
473       <a href="ft2-glyph_management.html" class="md-nav__link">
474         Glyph Management
475       </a>
476     </li>
477   
478
479           
480             
481   
482   
483   
484     <li class="md-nav__item">
485       <a href="ft2-mac_specific.html" class="md-nav__link">
486         Mac Specific Interface
487       </a>
488     </li>
489   
490
491           
492             
493   
494   
495   
496     <li class="md-nav__item">
497       <a href="ft2-sizes_management.html" class="md-nav__link">
498         Size Management
499       </a>
500     </li>
501   
502
503           
504             
505   
506   
507   
508     <li class="md-nav__item">
509       <a href="ft2-header_file_macros.html" class="md-nav__link">
510         Header File Macros
511       </a>
512     </li>
513   
514
515           
516         </ul>
517       </nav>
518     </li>
519   
520
521     
522       
523       
524       
525
526   
527   
528   
529     
530     <li class="md-nav__item md-nav__item--nested">
531       
532       
533         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_6" type="checkbox" id="__nav_6" >
534       
535       <label class="md-nav__link" for="__nav_6">
536         Format-Specific API
537         <span class="md-nav__icon md-icon"></span>
538       </label>
539       <nav class="md-nav" aria-label="Format-Specific API" data-md-level="1">
540         <label class="md-nav__title" for="__nav_6">
541           <span class="md-nav__icon md-icon"></span>
542           Format-Specific API
543         </label>
544         <ul class="md-nav__list" data-md-scrollfix>
545           
546             
547   
548   
549   
550     <li class="md-nav__item">
551       <a href="ft2-multiple_masters.html" class="md-nav__link">
552         Multiple Masters
553       </a>
554     </li>
555   
556
557           
558             
559   
560   
561   
562     <li class="md-nav__item">
563       <a href="ft2-truetype_tables.html" class="md-nav__link">
564         TrueType Tables
565       </a>
566     </li>
567   
568
569           
570             
571   
572   
573   
574     <li class="md-nav__item">
575       <a href="ft2-type1_tables.html" class="md-nav__link">
576         Type 1 Tables
577       </a>
578     </li>
579   
580
581           
582             
583   
584   
585   
586     <li class="md-nav__item">
587       <a href="ft2-sfnt_names.html" class="md-nav__link">
588         SFNT Names
589       </a>
590     </li>
591   
592
593           
594             
595   
596   
597   
598     <li class="md-nav__item">
599       <a href="ft2-bdf_fonts.html" class="md-nav__link">
600         BDF and PCF Files
601       </a>
602     </li>
603   
604
605           
606             
607   
608   
609   
610     <li class="md-nav__item">
611       <a href="ft2-cid_fonts.html" class="md-nav__link">
612         CID Fonts
613       </a>
614     </li>
615   
616
617           
618             
619   
620   
621   
622     <li class="md-nav__item">
623       <a href="ft2-pfr_fonts.html" class="md-nav__link">
624         PFR Fonts
625       </a>
626     </li>
627   
628
629           
630             
631   
632   
633   
634     <li class="md-nav__item">
635       <a href="ft2-winfnt_fonts.html" class="md-nav__link">
636         Window FNT Files
637       </a>
638     </li>
639   
640
641           
642             
643   
644   
645   
646     <li class="md-nav__item">
647       <a href="ft2-svg_fonts.html" class="md-nav__link">
648         OpenType SVG Fonts
649       </a>
650     </li>
651   
652
653           
654             
655   
656   
657   
658     <li class="md-nav__item">
659       <a href="ft2-font_formats.html" class="md-nav__link">
660         Font Formats
661       </a>
662     </li>
663   
664
665           
666             
667   
668   
669   
670     <li class="md-nav__item">
671       <a href="ft2-gasp_table.html" class="md-nav__link">
672         Gasp Table
673       </a>
674     </li>
675   
676
677           
678         </ul>
679       </nav>
680     </li>
681   
682
683     
684       
685       
686       
687
688   
689   
690     
691   
692   
693     
694     <li class="md-nav__item md-nav__item--active md-nav__item--nested">
695       
696       
697         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_7" type="checkbox" id="__nav_7" checked>
698       
699       <label class="md-nav__link" for="__nav_7">
700         Controlling FreeType Modules
701         <span class="md-nav__icon md-icon"></span>
702       </label>
703       <nav class="md-nav" aria-label="Controlling FreeType Modules" data-md-level="1">
704         <label class="md-nav__title" for="__nav_7">
705           <span class="md-nav__icon md-icon"></span>
706           Controlling FreeType Modules
707         </label>
708         <ul class="md-nav__list" data-md-scrollfix>
709           
710             
711   
712   
713   
714     <li class="md-nav__item">
715       <a href="ft2-auto_hinter.html" class="md-nav__link">
716         The auto-hinter
717       </a>
718     </li>
719   
720
721           
722             
723   
724   
725   
726     <li class="md-nav__item">
727       <a href="ft2-cff_driver.html" class="md-nav__link">
728         The CFF driver
729       </a>
730     </li>
731   
732
733           
734             
735   
736   
737   
738     <li class="md-nav__item">
739       <a href="ft2-t1_cid_driver.html" class="md-nav__link">
740         The Type 1 and CID drivers
741       </a>
742     </li>
743   
744
745           
746             
747   
748   
749     
750   
751   
752     <li class="md-nav__item md-nav__item--active">
753       
754       <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
755       
756       
757         
758       
759       
760         <label class="md-nav__link md-nav__link--active" for="__toc">
761           The TrueType driver
762           <span class="md-nav__icon md-icon"></span>
763         </label>
764       
765       <a href="ft2-tt_driver.html" class="md-nav__link md-nav__link--active">
766         The TrueType driver
767       </a>
768       
769         
770 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
771   
772   
773   
774     
775   
776   
777     <label class="md-nav__title" for="__toc">
778       <span class="md-nav__icon md-icon"></span>
779       Table of contents
780     </label>
781     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
782       
783         <li class="md-nav__item">
784   <a href="#synopsis" class="md-nav__link">
785     Synopsis
786   </a>
787   
788 </li>
789       
790     </ul>
791   
792 </nav>
793       
794     </li>
795   
796
797           
798             
799   
800   
801   
802     <li class="md-nav__item">
803       <a href="ft2-pcf_driver.html" class="md-nav__link">
804         The PCF driver
805       </a>
806     </li>
807   
808
809           
810             
811   
812   
813   
814     <li class="md-nav__item">
815       <a href="ft2-ot_svg_driver.html" class="md-nav__link">
816         The SVG driver
817       </a>
818     </li>
819   
820
821           
822             
823   
824   
825   
826     <li class="md-nav__item">
827       <a href="ft2-properties.html" class="md-nav__link">
828         Driver properties
829       </a>
830     </li>
831   
832
833           
834             
835   
836   
837   
838     <li class="md-nav__item">
839       <a href="ft2-parameter_tags.html" class="md-nav__link">
840         Parameter Tags
841       </a>
842     </li>
843   
844
845           
846             
847   
848   
849   
850     <li class="md-nav__item">
851       <a href="ft2-lcd_rendering.html" class="md-nav__link">
852         Subpixel Rendering
853       </a>
854     </li>
855   
856
857           
858         </ul>
859       </nav>
860     </li>
861   
862
863     
864       
865       
866       
867
868   
869   
870   
871     
872     <li class="md-nav__item md-nav__item--nested">
873       
874       
875         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8" type="checkbox" id="__nav_8" >
876       
877       <label class="md-nav__link" for="__nav_8">
878         Cache Sub-System
879         <span class="md-nav__icon md-icon"></span>
880       </label>
881       <nav class="md-nav" aria-label="Cache Sub-System" data-md-level="1">
882         <label class="md-nav__title" for="__nav_8">
883           <span class="md-nav__icon md-icon"></span>
884           Cache Sub-System
885         </label>
886         <ul class="md-nav__list" data-md-scrollfix>
887           
888             
889   
890   
891   
892     <li class="md-nav__item">
893       <a href="ft2-cache_subsystem.html" class="md-nav__link">
894         Cache Sub-System
895       </a>
896     </li>
897   
898
899           
900         </ul>
901       </nav>
902     </li>
903   
904
905     
906       
907       
908       
909
910   
911   
912   
913     
914     <li class="md-nav__item md-nav__item--nested">
915       
916       
917         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_9" type="checkbox" id="__nav_9" >
918       
919       <label class="md-nav__link" for="__nav_9">
920         Support API
921         <span class="md-nav__icon md-icon"></span>
922       </label>
923       <nav class="md-nav" aria-label="Support API" data-md-level="1">
924         <label class="md-nav__title" for="__nav_9">
925           <span class="md-nav__icon md-icon"></span>
926           Support API
927         </label>
928         <ul class="md-nav__list" data-md-scrollfix>
929           
930             
931   
932   
933   
934     <li class="md-nav__item">
935       <a href="ft2-computations.html" class="md-nav__link">
936         Computations
937       </a>
938     </li>
939   
940
941           
942             
943   
944   
945   
946     <li class="md-nav__item">
947       <a href="ft2-list_processing.html" class="md-nav__link">
948         List Processing
949       </a>
950     </li>
951   
952
953           
954             
955   
956   
957   
958     <li class="md-nav__item">
959       <a href="ft2-outline_processing.html" class="md-nav__link">
960         Outline Processing
961       </a>
962     </li>
963   
964
965           
966             
967   
968   
969   
970     <li class="md-nav__item">
971       <a href="ft2-quick_advance.html" class="md-nav__link">
972         Quick retrieval of advance values
973       </a>
974     </li>
975   
976
977           
978             
979   
980   
981   
982     <li class="md-nav__item">
983       <a href="ft2-bitmap_handling.html" class="md-nav__link">
984         Bitmap Handling
985       </a>
986     </li>
987   
988
989           
990             
991   
992   
993   
994     <li class="md-nav__item">
995       <a href="ft2-raster.html" class="md-nav__link">
996         Scanline Converter
997       </a>
998     </li>
999   
1000
1001           
1002             
1003   
1004   
1005   
1006     <li class="md-nav__item">
1007       <a href="ft2-glyph_stroker.html" class="md-nav__link">
1008         Glyph Stroker
1009       </a>
1010     </li>
1011   
1012
1013           
1014             
1015   
1016   
1017   
1018     <li class="md-nav__item">
1019       <a href="ft2-system_interface.html" class="md-nav__link">
1020         System Interface
1021       </a>
1022     </li>
1023   
1024
1025           
1026             
1027   
1028   
1029   
1030     <li class="md-nav__item">
1031       <a href="ft2-module_management.html" class="md-nav__link">
1032         Module Management
1033       </a>
1034     </li>
1035   
1036
1037           
1038             
1039   
1040   
1041   
1042     <li class="md-nav__item">
1043       <a href="ft2-gzip.html" class="md-nav__link">
1044         GZIP Streams
1045       </a>
1046     </li>
1047   
1048
1049           
1050             
1051   
1052   
1053   
1054     <li class="md-nav__item">
1055       <a href="ft2-lzw.html" class="md-nav__link">
1056         LZW Streams
1057       </a>
1058     </li>
1059   
1060
1061           
1062             
1063   
1064   
1065   
1066     <li class="md-nav__item">
1067       <a href="ft2-bzip2.html" class="md-nav__link">
1068         BZIP2 Streams
1069       </a>
1070     </li>
1071   
1072
1073           
1074             
1075   
1076   
1077   
1078     <li class="md-nav__item">
1079       <a href="ft2-debugging_apis.html" class="md-nav__link">
1080         External Debugging APIs
1081       </a>
1082     </li>
1083   
1084
1085           
1086         </ul>
1087       </nav>
1088     </li>
1089   
1090
1091     
1092       
1093       
1094       
1095
1096   
1097   
1098   
1099     
1100     <li class="md-nav__item md-nav__item--nested">
1101       
1102       
1103         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_10" type="checkbox" id="__nav_10" >
1104       
1105       <label class="md-nav__link" for="__nav_10">
1106         Error Codes
1107         <span class="md-nav__icon md-icon"></span>
1108       </label>
1109       <nav class="md-nav" aria-label="Error Codes" data-md-level="1">
1110         <label class="md-nav__title" for="__nav_10">
1111           <span class="md-nav__icon md-icon"></span>
1112           Error Codes
1113         </label>
1114         <ul class="md-nav__list" data-md-scrollfix>
1115           
1116             
1117   
1118   
1119   
1120     <li class="md-nav__item">
1121       <a href="ft2-error_enumerations.html" class="md-nav__link">
1122         Error Enumerations
1123       </a>
1124     </li>
1125   
1126
1127           
1128             
1129   
1130   
1131   
1132     <li class="md-nav__item">
1133       <a href="ft2-error_code_values.html" class="md-nav__link">
1134         Error Code Values
1135       </a>
1136     </li>
1137   
1138
1139           
1140         </ul>
1141       </nav>
1142     </li>
1143   
1144
1145     
1146       
1147       
1148       
1149
1150   
1151   
1152   
1153     
1154     <li class="md-nav__item md-nav__item--nested">
1155       
1156       
1157         <input class="md-nav__toggle md-toggle" data-md-toggle="__nav_11" type="checkbox" id="__nav_11" >
1158       
1159       <label class="md-nav__link" for="__nav_11">
1160         Miscellaneous
1161         <span class="md-nav__icon md-icon"></span>
1162       </label>
1163       <nav class="md-nav" aria-label="Miscellaneous" data-md-level="1">
1164         <label class="md-nav__title" for="__nav_11">
1165           <span class="md-nav__icon md-icon"></span>
1166           Miscellaneous
1167         </label>
1168         <ul class="md-nav__list" data-md-scrollfix>
1169           
1170             
1171   
1172   
1173   
1174     <li class="md-nav__item">
1175       <a href="ft2-gx_validation.html" class="md-nav__link">
1176         TrueTypeGX/AAT Validation
1177       </a>
1178     </li>
1179   
1180
1181           
1182             
1183   
1184   
1185   
1186     <li class="md-nav__item">
1187       <a href="ft2-incremental.html" class="md-nav__link">
1188         Incremental Loading
1189       </a>
1190     </li>
1191   
1192
1193           
1194             
1195   
1196   
1197   
1198     <li class="md-nav__item">
1199       <a href="ft2-truetype_engine.html" class="md-nav__link">
1200         The TrueType Engine
1201       </a>
1202     </li>
1203   
1204
1205           
1206             
1207   
1208   
1209   
1210     <li class="md-nav__item">
1211       <a href="ft2-ot_validation.html" class="md-nav__link">
1212         OpenType Validation
1213       </a>
1214     </li>
1215   
1216
1217           
1218         </ul>
1219       </nav>
1220     </li>
1221   
1222
1223     
1224   </ul>
1225 </nav>
1226                   </div>
1227                 </div>
1228               </div>
1229             
1230             
1231               
1232               <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1233                 <div class="md-sidebar__scrollwrap">
1234                   <div class="md-sidebar__inner">
1235                     
1236 <nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1237   
1238   
1239   
1240     
1241   
1242   
1243     <label class="md-nav__title" for="__toc">
1244       <span class="md-nav__icon md-icon"></span>
1245       Table of contents
1246     </label>
1247     <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1248       
1249         <li class="md-nav__item">
1250   <a href="#synopsis" class="md-nav__link">
1251     Synopsis
1252   </a>
1253   
1254 </li>
1255       
1256     </ul>
1257   
1258 </nav>
1259                   </div>
1260                 </div>
1261               </div>
1262             
1263           
1264           <div class="md-content" data-md-component="content">
1265             <article class="md-content__inner md-typeset">
1266               
1267                 
1268                 
1269                 <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; The TrueType driver</p>
1270 <hr />
1271 <h1 id="the-truetype-driver">The TrueType driver<a class="headerlink" href="#the-truetype-driver" title="Permanent link">&para;</a></h1>
1272 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
1273 <p>While FreeType's TrueType driver doesn't expose API functions by itself, it is possible to control its behaviour with <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>.</p>
1274 <p>The TrueType driver's module name is &lsquo;truetype&rsquo;; a single property <code><a href="ft2-properties.html#interpreter-version">interpreter-version</a></code> is available, as documented in the &lsquo;<a href="ft2-properties.html#properties">Driver properties</a>&rsquo; section.</p>
1275 <p>To help understand the differences between interpreter versions, we introduce a list of definitions, kindly provided by Greg Hitchcock.</p>
1276 <p><em>Bi-Level Rendering</em></p>
1277 <p>Monochromatic rendering, exclusively used in the early days of TrueType by both Apple and Microsoft. Microsoft's GDI interface supported hinting of the right-side bearing point, such that the advance width could be non-linear. Most often this was done to achieve some level of glyph symmetry. To enable reasonable performance (e.g., not having to run hinting on all glyphs just to get the widths) there was a bit in the head table indicating if the side bearing was hinted, and additional tables, &lsquo;hdmx&rsquo; and &lsquo;LTSH&rsquo;, to cache hinting widths across multiple sizes and device aspect ratios.</p>
1278 <p><em>Font Smoothing</em></p>
1279 <p>Microsoft's GDI implementation of anti-aliasing. Not traditional anti-aliasing as the outlines were hinted before the sampling. The widths matched the bi-level rendering.</p>
1280 <p><em>ClearType Rendering</em></p>
1281 <p>Technique that uses physical subpixels to improve rendering on LCD (and other) displays. Because of the higher resolution, many methods of improving symmetry in glyphs through hinting the right-side bearing were no longer necessary. This lead to what GDI calls &lsquo;natural widths&rsquo; ClearType, see <a href="http://rastertragedy.com/RTRCh4.htm#Sec21">http://rastertragedy.com/RTRCh4.htm#Sec21</a>. Since hinting has extra resolution, most non-linearity went away, but it is still possible for hints to change the advance widths in this mode.</p>
1282 <p><em>ClearType Compatible Widths</em></p>
1283 <p>One of the earliest challenges with ClearType was allowing the implementation in GDI to be selected without requiring all UI and documents to reflow. To address this, a compatible method of rendering ClearType was added where the font hints are executed once to determine the width in bi-level rendering, and then re-run in ClearType, with the difference in widths being absorbed in the font hints for ClearType (mostly in the white space of hints); see <a href="http://rastertragedy.com/RTRCh4.htm#Sec20">http://rastertragedy.com/RTRCh4.htm#Sec20</a>. Somewhat by definition, compatible width ClearType allows for non-linear widths, but only when the bi-level version has non-linear widths.</p>
1284 <p><em>ClearType Subpixel Positioning</em></p>
1285 <p>One of the nice benefits of ClearType is the ability to more crisply display fractional widths; unfortunately, the GDI model of integer bitmaps did not support this. However, the WPF and Direct Write frameworks do support fractional widths. DWrite calls this &lsquo;natural mode&rsquo;, not to be confused with GDI's &lsquo;natural widths&rsquo;. Subpixel positioning, in the current implementation of Direct Write, unfortunately does not support hinted advance widths, see <a href="http://rastertragedy.com/RTRCh4.htm#Sec22">http://rastertragedy.com/RTRCh4.htm#Sec22</a>. Note that the TrueType interpreter fully allows the advance width to be adjusted in this mode, just the DWrite client will ignore those changes.</p>
1286 <p><em>ClearType Backward Compatibility</em></p>
1287 <p>This is a set of exceptions made in the TrueType interpreter to minimize hinting techniques that were problematic with the extra resolution of ClearType; see <a href="http://rastertragedy.com/RTRCh4.htm#Sec1">http://rastertragedy.com/RTRCh4.htm#Sec1</a> and <a href="https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx">https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx</a>. This technique is not to be confused with ClearType compatible widths. ClearType backward compatibility has no direct impact on changing advance widths, but there might be an indirect impact on disabling some deltas. This could be worked around in backward compatibility mode.</p>
1288 <p><em>Native ClearType Mode</em></p>
1289 <p>(Not to be confused with &lsquo;natural widths&rsquo;.) This mode removes all the exceptions in the TrueType interpreter when running with ClearType. Any issues on widths would still apply, though.</p>
1290                 
1291               
1292               
1293                 
1294
1295
1296               
1297             </article>
1298           </div>
1299         </div>
1300         
1301       </main>
1302       
1303         
1304 <footer class="md-footer">
1305   
1306     <nav class="md-footer__inner md-grid" aria-label="Footer">
1307       
1308         
1309         <a href="ft2-t1_cid_driver.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: The Type 1 and CID drivers" rel="prev">
1310           <div class="md-footer__button md-icon">
1311             <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 11h12z"/></svg>
1312           </div>
1313           <div class="md-footer__title">
1314             <div class="md-ellipsis">
1315               <span class="md-footer__direction">
1316                 Previous
1317               </span>
1318               The Type 1 and CID drivers
1319             </div>
1320           </div>
1321         </a>
1322       
1323       
1324         
1325         <a href="ft2-pcf_driver.html" class="md-footer__link md-footer__link--next" aria-label="Next: The PCF driver" rel="next">
1326           <div class="md-footer__title">
1327             <div class="md-ellipsis">
1328               <span class="md-footer__direction">
1329                 Next
1330               </span>
1331               The PCF driver
1332             </div>
1333           </div>
1334           <div class="md-footer__button md-icon">
1335             <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
1336           </div>
1337         </a>
1338       
1339     </nav>
1340   
1341   <div class="md-footer-meta md-typeset">
1342     <div class="md-footer-meta__inner md-grid">
1343       <div class="md-footer-copyright">
1344         
1345           <div class="md-footer-copyright__highlight">
1346             Copyright 2023 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
1347           </div>
1348         
1349         Made with
1350         <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
1351           Material for MkDocs
1352         </a>
1353         
1354       </div>
1355       
1356     </div>
1357   </div>
1358 </footer>
1359       
1360     </div>
1361     <div class="md-dialog" data-md-component="dialog">
1362       <div class="md-dialog__inner md-typeset"></div>
1363     </div>
1364     <script id="__config" type="application/json">{"base": ".", "features": [], "search": "assets/javascripts/workers/search.477d984a.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "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.title": "Select version"}, "version": null}</script>
1365     
1366     
1367       <script src="assets/javascripts/bundle.82b56eb2.min.js"></script>
1368       
1369         <script src="javascripts/extra.js"></script>
1370       
1371     
1372   </body>
1373 </html>