Imported Upstream version 2.10.1
[platform/upstream/freetype2.git] / docs / reference / site / ft2-glyph_management.html
1
2
3
4
5 <!doctype html>
6 <html lang="en" class="no-js">
7   <head>
8     
9       <meta charset="utf-8">
10       <meta name="viewport" content="width=device-width,initial-scale=1">
11       <meta http-equiv="x-ua-compatible" content="ie=edge">
12       
13         <meta name="description" content="API Reference Documentation for FreeType-2.10.1">
14       
15       
16       
17         <meta name="author" content="FreeType Contributors">
18       
19       
20         <meta name="lang:clipboard.copy" content="Copy to clipboard">
21       
22         <meta name="lang:clipboard.copied" content="Copied to clipboard">
23       
24         <meta name="lang:search.language" content="en">
25       
26         <meta name="lang:search.pipeline.stopwords" content="True">
27       
28         <meta name="lang:search.pipeline.trimmer" content="True">
29       
30         <meta name="lang:search.result.none" content="No matching documents">
31       
32         <meta name="lang:search.result.one" content="1 matching document">
33       
34         <meta name="lang:search.result.other" content="# matching documents">
35       
36         <meta name="lang:search.tokenizer" content="[\s\-]+">
37       
38       <link rel="shortcut icon" href="images/favico.ico">
39       <meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.0.2">
40     
41     
42       
43         <title>Glyph Management - FreeType-2.10.1 API Reference</title>
44       
45     
46     
47       <link rel="stylesheet" href="assets/stylesheets/application.982221ab.css">
48       
49         <link rel="stylesheet" href="assets/stylesheets/application-palette.224b79ff.css">
50       
51       
52         
53         
54         <meta name="theme-color" content="#4caf50">
55       
56     
57     
58       <script src="assets/javascripts/modernizr.1f0bcf2b.js"></script>
59     
60     
61       
62         <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
63         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif:300,400,400i,700|Roboto+Mono">
64         <style>body,input{font-family:"Noto Serif","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
65       
66     
67     <link rel="stylesheet" href="assets/fonts/material-icons.css">
68     
69     
70       <link rel="stylesheet" href="stylesheets/extra.css">
71     
72     
73       
74     
75     
76   </head>
77   
78     
79     
80     <body dir="ltr" data-md-color-primary="green" data-md-color-accent="green">
81   
82     <svg class="md-svg">
83       <defs>
84         
85         
86       </defs>
87     </svg>
88     <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
89     <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
90     <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
91     
92       <a href="#glyph-management" tabindex="1" class="md-skip">
93         Skip to content
94       </a>
95     
96     
97       <header class="md-header" data-md-component="header">
98   <nav class="md-header-nav md-grid">
99     <div class="md-flex">
100       <div class="md-flex__cell md-flex__cell--shrink">
101         <a href="index.html" title="FreeType-2.10.1 API Reference" class="md-header-nav__button md-logo">
102           
103             <img src="images/favico.ico" width="24" height="24">
104           
105         </a>
106       </div>
107       <div class="md-flex__cell md-flex__cell--shrink">
108         <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
109       </div>
110       <div class="md-flex__cell md-flex__cell--stretch">
111         <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
112           
113             <span class="md-header-nav__topic">
114               FreeType-2.10.1 API Reference
115             </span>
116             <span class="md-header-nav__topic">
117               Glyph Management
118             </span>
119           
120         </div>
121       </div>
122       <div class="md-flex__cell md-flex__cell--shrink">
123         
124           <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
125           
126 <div class="md-search" data-md-component="search" role="dialog">
127   <label class="md-search__overlay" for="__search"></label>
128   <div class="md-search__inner" role="search">
129     <form class="md-search__form" name="search">
130       <input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
131       <label class="md-icon md-search__icon" for="__search"></label>
132       <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
133         &#xE5CD;
134       </button>
135     </form>
136     <div class="md-search__output">
137       <div class="md-search__scrollwrap" data-md-scrollfix>
138         <div class="md-search-result" data-md-component="result">
139           <div class="md-search-result__meta">
140             Type to start searching
141           </div>
142           <ol class="md-search-result__list"></ol>
143         </div>
144       </div>
145     </div>
146   </div>
147 </div>
148         
149       </div>
150       
151     </div>
152   </nav>
153 </header>
154     
155     <div class="md-container">
156       
157         
158       
159       
160       <main class="md-main">
161         <div class="md-main__inner md-grid" data-md-component="container">
162           
163             
164               <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
165                 <div class="md-sidebar__scrollwrap">
166                   <div class="md-sidebar__inner">
167                     <nav class="md-nav md-nav--primary" data-md-level="0">
168   <label class="md-nav__title md-nav__title--site" for="__drawer">
169     <a href="index.html" title="FreeType-2.10.1 API Reference" class="md-nav__button md-logo">
170       
171         <img src="images/favico.ico" width="48" height="48">
172       
173     </a>
174     FreeType-2.10.1 API Reference
175   </label>
176   
177   <ul class="md-nav__list" data-md-scrollfix>
178     
179       
180       
181       
182
183
184   <li class="md-nav__item">
185     <a href="index.html" title="TOC" class="md-nav__link">
186       TOC
187     </a>
188   </li>
189
190     
191       
192       
193       
194
195
196   <li class="md-nav__item">
197     <a href="ft2-index.html" title="Index" class="md-nav__link">
198       Index
199     </a>
200   </li>
201
202     
203       
204       
205       
206
207
208   <li class="md-nav__item md-nav__item--nested">
209     
210       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
211     
212     <label class="md-nav__link" for="nav-3">
213       General Remarks
214     </label>
215     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
216       <label class="md-nav__title" for="nav-3">
217         General Remarks
218       </label>
219       <ul class="md-nav__list" data-md-scrollfix>
220         
221         
222           
223           
224           
225
226
227   <li class="md-nav__item">
228     <a href="ft2-header_inclusion.html" title="FreeType's header inclusion scheme" class="md-nav__link">
229       FreeType's header inclusion scheme
230     </a>
231   </li>
232
233         
234           
235           
236           
237
238
239   <li class="md-nav__item">
240     <a href="ft2-user_allocation.html" title="User allocation" class="md-nav__link">
241       User allocation
242     </a>
243   </li>
244
245         
246       </ul>
247     </nav>
248   </li>
249
250     
251       
252       
253       
254
255   
256
257
258   <li class="md-nav__item md-nav__item--active md-nav__item--nested">
259     
260       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
261     
262     <label class="md-nav__link" for="nav-4">
263       Core API
264     </label>
265     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
266       <label class="md-nav__title" for="nav-4">
267         Core API
268       </label>
269       <ul class="md-nav__list" data-md-scrollfix>
270         
271         
272           
273           
274           
275
276
277   <li class="md-nav__item">
278     <a href="ft2-version.html" title="FreeType Version" class="md-nav__link">
279       FreeType Version
280     </a>
281   </li>
282
283         
284           
285           
286           
287
288
289   <li class="md-nav__item">
290     <a href="ft2-basic_types.html" title="Basic Data Types" class="md-nav__link">
291       Basic Data Types
292     </a>
293   </li>
294
295         
296           
297           
298           
299
300
301   <li class="md-nav__item">
302     <a href="ft2-base_interface.html" title="Base Interface" class="md-nav__link">
303       Base Interface
304     </a>
305   </li>
306
307         
308           
309           
310           
311
312
313   <li class="md-nav__item">
314     <a href="ft2-glyph_variants.html" title="Unicode Variation Sequences" class="md-nav__link">
315       Unicode Variation Sequences
316     </a>
317   </li>
318
319         
320           
321           
322           
323
324
325   <li class="md-nav__item">
326     <a href="ft2-color_management.html" title="Glyph Color Management" class="md-nav__link">
327       Glyph Color Management
328     </a>
329   </li>
330
331         
332           
333           
334           
335
336
337   <li class="md-nav__item">
338     <a href="ft2-layer_management.html" title="Glyph Layer Management" class="md-nav__link">
339       Glyph Layer Management
340     </a>
341   </li>
342
343         
344           
345           
346           
347
348   
349
350
351   <li class="md-nav__item md-nav__item--active">
352     
353     <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
354     
355       
356     
357     
358       <label class="md-nav__link md-nav__link--active" for="__toc">
359         Glyph Management
360       </label>
361     
362     <a href="ft2-glyph_management.html" title="Glyph Management" class="md-nav__link md-nav__link--active">
363       Glyph Management
364     </a>
365     
366       
367 <nav class="md-nav md-nav--secondary">
368   
369   
370     
371   
372   
373     <label class="md-nav__title" for="__toc">Table of contents</label>
374     <ul class="md-nav__list" data-md-scrollfix>
375       
376         <li class="md-nav__item">
377   <a href="#synopsis" title="Synopsis" class="md-nav__link">
378     Synopsis
379   </a>
380   
381 </li>
382       
383         <li class="md-nav__item">
384   <a href="#ft_glyph" title="FT_Glyph" class="md-nav__link">
385     FT_Glyph
386   </a>
387   
388 </li>
389       
390         <li class="md-nav__item">
391   <a href="#ft_glyphrec" title="FT_GlyphRec" class="md-nav__link">
392     FT_GlyphRec
393   </a>
394   
395 </li>
396       
397         <li class="md-nav__item">
398   <a href="#ft_bitmapglyph" title="FT_BitmapGlyph" class="md-nav__link">
399     FT_BitmapGlyph
400   </a>
401   
402 </li>
403       
404         <li class="md-nav__item">
405   <a href="#ft_bitmapglyphrec" title="FT_BitmapGlyphRec" class="md-nav__link">
406     FT_BitmapGlyphRec
407   </a>
408   
409 </li>
410       
411         <li class="md-nav__item">
412   <a href="#ft_outlineglyph" title="FT_OutlineGlyph" class="md-nav__link">
413     FT_OutlineGlyph
414   </a>
415   
416 </li>
417       
418         <li class="md-nav__item">
419   <a href="#ft_outlineglyphrec" title="FT_OutlineGlyphRec" class="md-nav__link">
420     FT_OutlineGlyphRec
421   </a>
422   
423 </li>
424       
425         <li class="md-nav__item">
426   <a href="#ft_new_glyph" title="FT_New_Glyph" class="md-nav__link">
427     FT_New_Glyph
428   </a>
429   
430 </li>
431       
432         <li class="md-nav__item">
433   <a href="#ft_get_glyph" title="FT_Get_Glyph" class="md-nav__link">
434     FT_Get_Glyph
435   </a>
436   
437 </li>
438       
439         <li class="md-nav__item">
440   <a href="#ft_glyph_copy" title="FT_Glyph_Copy" class="md-nav__link">
441     FT_Glyph_Copy
442   </a>
443   
444 </li>
445       
446         <li class="md-nav__item">
447   <a href="#ft_glyph_transform" title="FT_Glyph_Transform" class="md-nav__link">
448     FT_Glyph_Transform
449   </a>
450   
451 </li>
452       
453         <li class="md-nav__item">
454   <a href="#ft_glyph_bbox_mode" title="FT_Glyph_BBox_Mode" class="md-nav__link">
455     FT_Glyph_BBox_Mode
456   </a>
457   
458 </li>
459       
460         <li class="md-nav__item">
461   <a href="#ft_glyph_get_cbox" title="FT_Glyph_Get_CBox" class="md-nav__link">
462     FT_Glyph_Get_CBox
463   </a>
464   
465 </li>
466       
467         <li class="md-nav__item">
468   <a href="#ft_glyph_to_bitmap" title="FT_Glyph_To_Bitmap" class="md-nav__link">
469     FT_Glyph_To_Bitmap
470   </a>
471   
472 </li>
473       
474         <li class="md-nav__item">
475   <a href="#ft_done_glyph" title="FT_Done_Glyph" class="md-nav__link">
476     FT_Done_Glyph
477   </a>
478   
479 </li>
480       
481       
482       
483       
484       
485     </ul>
486   
487 </nav>
488     
489   </li>
490
491         
492           
493           
494           
495
496
497   <li class="md-nav__item">
498     <a href="ft2-mac_specific.html" title="Mac Specific Interface" class="md-nav__link">
499       Mac Specific Interface
500     </a>
501   </li>
502
503         
504           
505           
506           
507
508
509   <li class="md-nav__item">
510     <a href="ft2-sizes_management.html" title="Size Management" class="md-nav__link">
511       Size Management
512     </a>
513   </li>
514
515         
516           
517           
518           
519
520
521   <li class="md-nav__item">
522     <a href="ft2-header_file_macros.html" title="Header File Macros" class="md-nav__link">
523       Header File Macros
524     </a>
525   </li>
526
527         
528       </ul>
529     </nav>
530   </li>
531
532     
533       
534       
535       
536
537
538   <li class="md-nav__item md-nav__item--nested">
539     
540       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
541     
542     <label class="md-nav__link" for="nav-5">
543       Format-Specific API
544     </label>
545     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
546       <label class="md-nav__title" for="nav-5">
547         Format-Specific API
548       </label>
549       <ul class="md-nav__list" data-md-scrollfix>
550         
551         
552           
553           
554           
555
556
557   <li class="md-nav__item">
558     <a href="ft2-multiple_masters.html" title="Multiple Masters" class="md-nav__link">
559       Multiple Masters
560     </a>
561   </li>
562
563         
564           
565           
566           
567
568
569   <li class="md-nav__item">
570     <a href="ft2-truetype_tables.html" title="TrueType Tables" class="md-nav__link">
571       TrueType Tables
572     </a>
573   </li>
574
575         
576           
577           
578           
579
580
581   <li class="md-nav__item">
582     <a href="ft2-type1_tables.html" title="Type 1 Tables" class="md-nav__link">
583       Type 1 Tables
584     </a>
585   </li>
586
587         
588           
589           
590           
591
592
593   <li class="md-nav__item">
594     <a href="ft2-sfnt_names.html" title="SFNT Names" class="md-nav__link">
595       SFNT Names
596     </a>
597   </li>
598
599         
600           
601           
602           
603
604
605   <li class="md-nav__item">
606     <a href="ft2-bdf_fonts.html" title="BDF and PCF Files" class="md-nav__link">
607       BDF and PCF Files
608     </a>
609   </li>
610
611         
612           
613           
614           
615
616
617   <li class="md-nav__item">
618     <a href="ft2-cid_fonts.html" title="CID Fonts" class="md-nav__link">
619       CID Fonts
620     </a>
621   </li>
622
623         
624           
625           
626           
627
628
629   <li class="md-nav__item">
630     <a href="ft2-pfr_fonts.html" title="PFR Fonts" class="md-nav__link">
631       PFR Fonts
632     </a>
633   </li>
634
635         
636           
637           
638           
639
640
641   <li class="md-nav__item">
642     <a href="ft2-winfnt_fonts.html" title="Window FNT Files" class="md-nav__link">
643       Window FNT Files
644     </a>
645   </li>
646
647         
648           
649           
650           
651
652
653   <li class="md-nav__item">
654     <a href="ft2-font_formats.html" title="Font Formats" class="md-nav__link">
655       Font Formats
656     </a>
657   </li>
658
659         
660           
661           
662           
663
664
665   <li class="md-nav__item">
666     <a href="ft2-gasp_table.html" title="Gasp Table" class="md-nav__link">
667       Gasp Table
668     </a>
669   </li>
670
671         
672       </ul>
673     </nav>
674   </li>
675
676     
677       
678       
679       
680
681
682   <li class="md-nav__item md-nav__item--nested">
683     
684       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
685     
686     <label class="md-nav__link" for="nav-6">
687       Controlling FreeType Modules
688     </label>
689     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
690       <label class="md-nav__title" for="nav-6">
691         Controlling FreeType Modules
692       </label>
693       <ul class="md-nav__list" data-md-scrollfix>
694         
695         
696           
697           
698           
699
700
701   <li class="md-nav__item">
702     <a href="ft2-auto_hinter.html" title="The auto-hinter" class="md-nav__link">
703       The auto-hinter
704     </a>
705   </li>
706
707         
708           
709           
710           
711
712
713   <li class="md-nav__item">
714     <a href="ft2-cff_driver.html" title="The CFF driver" class="md-nav__link">
715       The CFF driver
716     </a>
717   </li>
718
719         
720           
721           
722           
723
724
725   <li class="md-nav__item">
726     <a href="ft2-t1_cid_driver.html" title="The Type 1 and CID drivers" class="md-nav__link">
727       The Type 1 and CID drivers
728     </a>
729   </li>
730
731         
732           
733           
734           
735
736
737   <li class="md-nav__item">
738     <a href="ft2-tt_driver.html" title="The TrueType driver" class="md-nav__link">
739       The TrueType driver
740     </a>
741   </li>
742
743         
744           
745           
746           
747
748
749   <li class="md-nav__item">
750     <a href="ft2-pcf_driver.html" title="The PCF driver" class="md-nav__link">
751       The PCF driver
752     </a>
753   </li>
754
755         
756           
757           
758           
759
760
761   <li class="md-nav__item">
762     <a href="ft2-properties.html" title="Driver properties" class="md-nav__link">
763       Driver properties
764     </a>
765   </li>
766
767         
768           
769           
770           
771
772
773   <li class="md-nav__item">
774     <a href="ft2-parameter_tags.html" title="Parameter Tags" class="md-nav__link">
775       Parameter Tags
776     </a>
777   </li>
778
779         
780           
781           
782           
783
784
785   <li class="md-nav__item">
786     <a href="ft2-lcd_rendering.html" title="Subpixel Rendering" class="md-nav__link">
787       Subpixel Rendering
788     </a>
789   </li>
790
791         
792       </ul>
793     </nav>
794   </li>
795
796     
797       
798       
799       
800
801
802   <li class="md-nav__item md-nav__item--nested">
803     
804       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">
805     
806     <label class="md-nav__link" for="nav-7">
807       Cache Sub-System
808     </label>
809     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
810       <label class="md-nav__title" for="nav-7">
811         Cache Sub-System
812       </label>
813       <ul class="md-nav__list" data-md-scrollfix>
814         
815         
816           
817           
818           
819
820
821   <li class="md-nav__item">
822     <a href="ft2-cache_subsystem.html" title="Cache Sub-System" class="md-nav__link">
823       Cache Sub-System
824     </a>
825   </li>
826
827         
828       </ul>
829     </nav>
830   </li>
831
832     
833       
834       
835       
836
837
838   <li class="md-nav__item md-nav__item--nested">
839     
840       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">
841     
842     <label class="md-nav__link" for="nav-8">
843       Support API
844     </label>
845     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
846       <label class="md-nav__title" for="nav-8">
847         Support API
848       </label>
849       <ul class="md-nav__list" data-md-scrollfix>
850         
851         
852           
853           
854           
855
856
857   <li class="md-nav__item">
858     <a href="ft2-computations.html" title="Computations" class="md-nav__link">
859       Computations
860     </a>
861   </li>
862
863         
864           
865           
866           
867
868
869   <li class="md-nav__item">
870     <a href="ft2-list_processing.html" title="List Processing" class="md-nav__link">
871       List Processing
872     </a>
873   </li>
874
875         
876           
877           
878           
879
880
881   <li class="md-nav__item">
882     <a href="ft2-outline_processing.html" title="Outline Processing" class="md-nav__link">
883       Outline Processing
884     </a>
885   </li>
886
887         
888           
889           
890           
891
892
893   <li class="md-nav__item">
894     <a href="ft2-quick_advance.html" title="Quick retrieval of advance values" class="md-nav__link">
895       Quick retrieval of advance values
896     </a>
897   </li>
898
899         
900           
901           
902           
903
904
905   <li class="md-nav__item">
906     <a href="ft2-bitmap_handling.html" title="Bitmap Handling" class="md-nav__link">
907       Bitmap Handling
908     </a>
909   </li>
910
911         
912           
913           
914           
915
916
917   <li class="md-nav__item">
918     <a href="ft2-raster.html" title="Scanline Converter" class="md-nav__link">
919       Scanline Converter
920     </a>
921   </li>
922
923         
924           
925           
926           
927
928
929   <li class="md-nav__item">
930     <a href="ft2-glyph_stroker.html" title="Glyph Stroker" class="md-nav__link">
931       Glyph Stroker
932     </a>
933   </li>
934
935         
936           
937           
938           
939
940
941   <li class="md-nav__item">
942     <a href="ft2-system_interface.html" title="System Interface" class="md-nav__link">
943       System Interface
944     </a>
945   </li>
946
947         
948           
949           
950           
951
952
953   <li class="md-nav__item">
954     <a href="ft2-module_management.html" title="Module Management" class="md-nav__link">
955       Module Management
956     </a>
957   </li>
958
959         
960           
961           
962           
963
964
965   <li class="md-nav__item">
966     <a href="ft2-gzip.html" title="GZIP Streams" class="md-nav__link">
967       GZIP Streams
968     </a>
969   </li>
970
971         
972           
973           
974           
975
976
977   <li class="md-nav__item">
978     <a href="ft2-lzw.html" title="LZW Streams" class="md-nav__link">
979       LZW Streams
980     </a>
981   </li>
982
983         
984           
985           
986           
987
988
989   <li class="md-nav__item">
990     <a href="ft2-bzip2.html" title="BZIP2 Streams" class="md-nav__link">
991       BZIP2 Streams
992     </a>
993   </li>
994
995         
996       </ul>
997     </nav>
998   </li>
999
1000     
1001       
1002       
1003       
1004
1005
1006   <li class="md-nav__item md-nav__item--nested">
1007     
1008       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9">
1009     
1010     <label class="md-nav__link" for="nav-9">
1011       Error Codes
1012     </label>
1013     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1014       <label class="md-nav__title" for="nav-9">
1015         Error Codes
1016       </label>
1017       <ul class="md-nav__list" data-md-scrollfix>
1018         
1019         
1020           
1021           
1022           
1023
1024
1025   <li class="md-nav__item">
1026     <a href="ft2-error_enumerations.html" title="Error Enumerations" class="md-nav__link">
1027       Error Enumerations
1028     </a>
1029   </li>
1030
1031         
1032           
1033           
1034           
1035
1036
1037   <li class="md-nav__item">
1038     <a href="ft2-error_code_values.html" title="Error Code Values" class="md-nav__link">
1039       Error Code Values
1040     </a>
1041   </li>
1042
1043         
1044       </ul>
1045     </nav>
1046   </li>
1047
1048     
1049       
1050       
1051       
1052
1053
1054   <li class="md-nav__item md-nav__item--nested">
1055     
1056       <input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
1057     
1058     <label class="md-nav__link" for="nav-10">
1059       Miscellaneous
1060     </label>
1061     <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
1062       <label class="md-nav__title" for="nav-10">
1063         Miscellaneous
1064       </label>
1065       <ul class="md-nav__list" data-md-scrollfix>
1066         
1067         
1068           
1069           
1070           
1071
1072
1073   <li class="md-nav__item">
1074     <a href="ft2-ot_validation.html" title="OpenType Validation" class="md-nav__link">
1075       OpenType Validation
1076     </a>
1077   </li>
1078
1079         
1080           
1081           
1082           
1083
1084
1085   <li class="md-nav__item">
1086     <a href="ft2-incremental.html" title="Incremental Loading" class="md-nav__link">
1087       Incremental Loading
1088     </a>
1089   </li>
1090
1091         
1092           
1093           
1094           
1095
1096
1097   <li class="md-nav__item">
1098     <a href="ft2-truetype_engine.html" title="The TrueType Engine" class="md-nav__link">
1099       The TrueType Engine
1100     </a>
1101   </li>
1102
1103         
1104           
1105           
1106           
1107
1108
1109   <li class="md-nav__item">
1110     <a href="ft2-gx_validation.html" title="TrueTypeGX/AAT Validation" class="md-nav__link">
1111       TrueTypeGX/AAT Validation
1112     </a>
1113   </li>
1114
1115         
1116       </ul>
1117     </nav>
1118   </li>
1119
1120     
1121   </ul>
1122 </nav>
1123                   </div>
1124                 </div>
1125               </div>
1126             
1127             
1128               <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
1129                 <div class="md-sidebar__scrollwrap">
1130                   <div class="md-sidebar__inner">
1131                     
1132 <nav class="md-nav md-nav--secondary">
1133   
1134   
1135     
1136   
1137   
1138     <label class="md-nav__title" for="__toc">Table of contents</label>
1139     <ul class="md-nav__list" data-md-scrollfix>
1140       
1141         <li class="md-nav__item">
1142   <a href="#synopsis" title="Synopsis" class="md-nav__link">
1143     Synopsis
1144   </a>
1145   
1146 </li>
1147       
1148         <li class="md-nav__item">
1149   <a href="#ft_glyph" title="FT_Glyph" class="md-nav__link">
1150     FT_Glyph
1151   </a>
1152   
1153 </li>
1154       
1155         <li class="md-nav__item">
1156   <a href="#ft_glyphrec" title="FT_GlyphRec" class="md-nav__link">
1157     FT_GlyphRec
1158   </a>
1159   
1160 </li>
1161       
1162         <li class="md-nav__item">
1163   <a href="#ft_bitmapglyph" title="FT_BitmapGlyph" class="md-nav__link">
1164     FT_BitmapGlyph
1165   </a>
1166   
1167 </li>
1168       
1169         <li class="md-nav__item">
1170   <a href="#ft_bitmapglyphrec" title="FT_BitmapGlyphRec" class="md-nav__link">
1171     FT_BitmapGlyphRec
1172   </a>
1173   
1174 </li>
1175       
1176         <li class="md-nav__item">
1177   <a href="#ft_outlineglyph" title="FT_OutlineGlyph" class="md-nav__link">
1178     FT_OutlineGlyph
1179   </a>
1180   
1181 </li>
1182       
1183         <li class="md-nav__item">
1184   <a href="#ft_outlineglyphrec" title="FT_OutlineGlyphRec" class="md-nav__link">
1185     FT_OutlineGlyphRec
1186   </a>
1187   
1188 </li>
1189       
1190         <li class="md-nav__item">
1191   <a href="#ft_new_glyph" title="FT_New_Glyph" class="md-nav__link">
1192     FT_New_Glyph
1193   </a>
1194   
1195 </li>
1196       
1197         <li class="md-nav__item">
1198   <a href="#ft_get_glyph" title="FT_Get_Glyph" class="md-nav__link">
1199     FT_Get_Glyph
1200   </a>
1201   
1202 </li>
1203       
1204         <li class="md-nav__item">
1205   <a href="#ft_glyph_copy" title="FT_Glyph_Copy" class="md-nav__link">
1206     FT_Glyph_Copy
1207   </a>
1208   
1209 </li>
1210       
1211         <li class="md-nav__item">
1212   <a href="#ft_glyph_transform" title="FT_Glyph_Transform" class="md-nav__link">
1213     FT_Glyph_Transform
1214   </a>
1215   
1216 </li>
1217       
1218         <li class="md-nav__item">
1219   <a href="#ft_glyph_bbox_mode" title="FT_Glyph_BBox_Mode" class="md-nav__link">
1220     FT_Glyph_BBox_Mode
1221   </a>
1222   
1223 </li>
1224       
1225         <li class="md-nav__item">
1226   <a href="#ft_glyph_get_cbox" title="FT_Glyph_Get_CBox" class="md-nav__link">
1227     FT_Glyph_Get_CBox
1228   </a>
1229   
1230 </li>
1231       
1232         <li class="md-nav__item">
1233   <a href="#ft_glyph_to_bitmap" title="FT_Glyph_To_Bitmap" class="md-nav__link">
1234     FT_Glyph_To_Bitmap
1235   </a>
1236   
1237 </li>
1238       
1239         <li class="md-nav__item">
1240   <a href="#ft_done_glyph" title="FT_Done_Glyph" class="md-nav__link">
1241     FT_Done_Glyph
1242   </a>
1243   
1244 </li>
1245       
1246       
1247       
1248       
1249       
1250     </ul>
1251   
1252 </nav>
1253                   </div>
1254                 </div>
1255               </div>
1256             
1257           
1258           <div class="md-content">
1259             <article class="md-content__inner md-typeset">
1260               
1261                 
1262                 
1263                 <p><a href="https://www.freetype.org">FreeType</a> &raquo; <a href="../">Docs</a> &raquo; <a href="index.html#core-api">Core API</a> &raquo; Glyph Management</p>
1264 <hr />
1265 <h1 id="glyph-management">Glyph Management<a class="headerlink" href="#glyph-management" title="Permanent link">&para;</a></h1>
1266 <h2 id="synopsis">Synopsis<a class="headerlink" href="#synopsis" title="Permanent link">&para;</a></h2>
1267 <p>This section contains definitions used to manage glyph data through generic <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> objects. Each of them can contain a bitmap, a vector outline, or even images in other formats. These objects are detached from <code><a href="ft2-base_interface.html#ft_face">FT_Face</a></code>, contrary to <code><a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a></code>.</p>
1268 <h2 id="ft_glyph">FT_Glyph<a class="headerlink" href="#ft_glyph" title="Permanent link">&para;</a></h2>
1269 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1270 <div class = "codehilite">
1271 <pre>
1272   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_GlyphRec_*  <b>FT_Glyph</b>;
1273 </pre>
1274 </div>
1275
1276 <p>Handle to an object used to model generic glyph images. It is a pointer to the <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code> structure and can contain a glyph bitmap or pointer.</p>
1277 <h4>note</h4>
1278
1279 <p>Glyph objects are not owned by the library. You must thus release them manually (through <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>) <em>before</em> calling <code><a href="ft2-base_interface.html#ft_done_freetype">FT_Done_FreeType</a></code>.</p>
1280 <hr>
1281
1282 <h2 id="ft_glyphrec">FT_GlyphRec<a class="headerlink" href="#ft_glyphrec" title="Permanent link">&para;</a></h2>
1283 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1284 <div class = "codehilite">
1285 <pre>
1286   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_GlyphRec_
1287   {
1288     <a href="ft2-base_interface.html#ft_library">FT_Library</a>             library;
1289     <span class="keyword">const</span> FT_Glyph_Class*  clazz;
1290     <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a>        format;
1291     <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>              advance;
1292
1293   } <b>FT_GlyphRec</b>;
1294 </pre>
1295 </div>
1296
1297 <p>The root glyph structure contains a given glyph image plus its advance width in 16.16 fixed-point format.</p>
1298 <h4>fields</h4>
1299
1300 <table class="fields">
1301 <tr><td class="val" id="library">library</td><td class="desc">
1302 <p>A handle to the FreeType library object.</p>
1303 </td></tr>
1304 <tr><td class="val" id="clazz">clazz</td><td class="desc">
1305 <p>A pointer to the glyph's class. Private.</p>
1306 </td></tr>
1307 <tr><td class="val" id="format">format</td><td class="desc">
1308 <p>The format of the glyph's image.</p>
1309 </td></tr>
1310 <tr><td class="val" id="advance">advance</td><td class="desc">
1311 <p>A 16.16 vector that gives the glyph's advance width.</p>
1312 </td></tr>
1313 </table>
1314
1315 <hr>
1316
1317 <h2 id="ft_bitmapglyph">FT_BitmapGlyph<a class="headerlink" href="#ft_bitmapglyph" title="Permanent link">&para;</a></h2>
1318 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1319 <div class = "codehilite">
1320 <pre>
1321   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_BitmapGlyphRec_*  <b>FT_BitmapGlyph</b>;
1322 </pre>
1323 </div>
1324
1325 <p>A handle to an object used to model a bitmap glyph image. This is a sub-class of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>, and a pointer to <code><a href="ft2-glyph_management.html#ft_bitmapglyphrec">FT_BitmapGlyphRec</a></code>.</p>
1326 <hr>
1327
1328 <h2 id="ft_bitmapglyphrec">FT_BitmapGlyphRec<a class="headerlink" href="#ft_bitmapglyphrec" title="Permanent link">&para;</a></h2>
1329 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1330 <div class = "codehilite">
1331 <pre>
1332   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_BitmapGlyphRec_
1333   {
1334     <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a>  root;
1335     <a href="ft2-basic_types.html#ft_int">FT_Int</a>       left;
1336     <a href="ft2-basic_types.html#ft_int">FT_Int</a>       top;
1337     <a href="ft2-basic_types.html#ft_bitmap">FT_Bitmap</a>    bitmap;
1338
1339   } <b>FT_BitmapGlyphRec</b>;
1340 </pre>
1341 </div>
1342
1343 <p>A structure used for bitmap glyph images. This really is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code>.</p>
1344 <h4>fields</h4>
1345
1346 <table class="fields">
1347 <tr><td class="val" id="root">root</td><td class="desc">
1348 <p>The root <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> fields.</p>
1349 </td></tr>
1350 <tr><td class="val" id="left">left</td><td class="desc">
1351 <p>The left-side bearing, i.e., the horizontal distance from the current pen position to the left border of the glyph bitmap.</p>
1352 </td></tr>
1353 <tr><td class="val" id="top">top</td><td class="desc">
1354 <p>The top-side bearing, i.e., the vertical distance from the current pen position to the top border of the glyph bitmap. This distance is positive for upwards&nbsp;y!</p>
1355 </td></tr>
1356 <tr><td class="val" id="bitmap">bitmap</td><td class="desc">
1357 <p>A descriptor for the bitmap.</p>
1358 </td></tr>
1359 </table>
1360
1361 <h4>note</h4>
1362
1363 <p>You can typecast an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> to <code><a href="ft2-glyph_management.html#ft_bitmapglyph">FT_BitmapGlyph</a></code> if you have <code>glyph-&gt;format == FT_GLYPH_FORMAT_BITMAP</code>. This lets you access the bitmap's contents easily.</p>
1364 <p>The corresponding pixel buffer is always owned by <code><a href="ft2-glyph_management.html#ft_bitmapglyph">FT_BitmapGlyph</a></code> and is thus created and destroyed with it.</p>
1365 <hr>
1366
1367 <h2 id="ft_outlineglyph">FT_OutlineGlyph<a class="headerlink" href="#ft_outlineglyph" title="Permanent link">&para;</a></h2>
1368 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1369 <div class = "codehilite">
1370 <pre>
1371   <span class="keyword">typedef</span> <span class="keyword">struct</span> FT_OutlineGlyphRec_*  <b>FT_OutlineGlyph</b>;
1372 </pre>
1373 </div>
1374
1375 <p>A handle to an object used to model an outline glyph image. This is a sub-class of <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code>, and a pointer to <code><a href="ft2-glyph_management.html#ft_outlineglyphrec">FT_OutlineGlyphRec</a></code>.</p>
1376 <hr>
1377
1378 <h2 id="ft_outlineglyphrec">FT_OutlineGlyphRec<a class="headerlink" href="#ft_outlineglyphrec" title="Permanent link">&para;</a></h2>
1379 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1380 <div class = "codehilite">
1381 <pre>
1382   <span class="keyword">typedef</span> <span class="keyword">struct</span>  FT_OutlineGlyphRec_
1383   {
1384     <a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a>  root;
1385     <a href="ft2-outline_processing.html#ft_outline">FT_Outline</a>   outline;
1386
1387   } <b>FT_OutlineGlyphRec</b>;
1388 </pre>
1389 </div>
1390
1391 <p>A structure used for outline (vectorial) glyph images. This really is a &lsquo;sub-class&rsquo; of <code><a href="ft2-glyph_management.html#ft_glyphrec">FT_GlyphRec</a></code>.</p>
1392 <h4>fields</h4>
1393
1394 <table class="fields">
1395 <tr><td class="val" id="root">root</td><td class="desc">
1396 <p>The root <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> fields.</p>
1397 </td></tr>
1398 <tr><td class="val" id="outline">outline</td><td class="desc">
1399 <p>A descriptor for the outline.</p>
1400 </td></tr>
1401 </table>
1402
1403 <h4>note</h4>
1404
1405 <p>You can typecast an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> to <code><a href="ft2-glyph_management.html#ft_outlineglyph">FT_OutlineGlyph</a></code> if you have <code>glyph-&gt;format == FT_GLYPH_FORMAT_OUTLINE</code>. This lets you access the outline's content easily.</p>
1406 <p>As the outline is extracted from a glyph slot, its coordinates are expressed normally in 26.6 pixels, unless the flag <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code> was used in <code><a href="ft2-base_interface.html#ft_load_glyph">FT_Load_Glyph</a></code> or <code><a href="ft2-base_interface.html#ft_load_char">FT_Load_Char</a></code>.</p>
1407 <p>The outline's tables are always owned by the object and are destroyed with it.</p>
1408 <hr>
1409
1410 <h2 id="ft_new_glyph">FT_New_Glyph<a class="headerlink" href="#ft_new_glyph" title="Permanent link">&para;</a></h2>
1411 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1412 <div class = "codehilite">
1413 <pre>
1414   FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1415   <b>FT_New_Glyph</b>( <a href="ft2-base_interface.html#ft_library">FT_Library</a>       library,
1416                 <a href="ft2-basic_types.html#ft_glyph_format">FT_Glyph_Format</a>  format,
1417                 <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>         *aglyph );
1418 </pre>
1419 </div>
1420
1421 <p>A function used to create a new empty glyph image. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p>
1422 <h4>input</h4>
1423
1424 <table class="fields">
1425 <tr><td class="val" id="library">library</td><td class="desc">
1426 <p>A handle to the FreeType library object.</p>
1427 </td></tr>
1428 <tr><td class="val" id="format">format</td><td class="desc">
1429 <p>The format of the glyph's image.</p>
1430 </td></tr>
1431 </table>
1432
1433 <h4>output</h4>
1434
1435 <table class="fields">
1436 <tr><td class="val" id="aglyph">aglyph</td><td class="desc">
1437 <p>A handle to the glyph object.</p>
1438 </td></tr>
1439 </table>
1440
1441 <h4>return</h4>
1442
1443 <p>FreeType error code. 0&nbsp;means success.</p>
1444 <h4>since</h4>
1445
1446 <p>2.10</p>
1447 <hr>
1448
1449 <h2 id="ft_get_glyph">FT_Get_Glyph<a class="headerlink" href="#ft_get_glyph" title="Permanent link">&para;</a></h2>
1450 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1451 <div class = "codehilite">
1452 <pre>
1453   FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1454   <b>FT_Get_Glyph</b>( <a href="ft2-base_interface.html#ft_glyphslot">FT_GlyphSlot</a>  slot,
1455                 <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>     *aglyph );
1456 </pre>
1457 </div>
1458
1459 <p>A function used to extract a glyph image from a slot. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p>
1460 <h4>input</h4>
1461
1462 <table class="fields">
1463 <tr><td class="val" id="slot">slot</td><td class="desc">
1464 <p>A handle to the source glyph slot.</p>
1465 </td></tr>
1466 </table>
1467
1468 <h4>output</h4>
1469
1470 <table class="fields">
1471 <tr><td class="val" id="aglyph">aglyph</td><td class="desc">
1472 <p>A handle to the glyph object.</p>
1473 </td></tr>
1474 </table>
1475
1476 <h4>return</h4>
1477
1478 <p>FreeType error code. 0&nbsp;means success.</p>
1479 <h4>note</h4>
1480
1481 <p>Because <code>*aglyph-&gt;advance.x</code> and <code>*aglyph-&gt;advance.y</code> are 16.16 fixed-point numbers, <code>slot-&gt;advance.x</code> and <code>slot-&gt;advance.y</code> (which are in 26.6 fixed-point format) must be in the range ]-32768;32768[.</p>
1482 <hr>
1483
1484 <h2 id="ft_glyph_copy">FT_Glyph_Copy<a class="headerlink" href="#ft_glyph_copy" title="Permanent link">&para;</a></h2>
1485 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1486 <div class = "codehilite">
1487 <pre>
1488   FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1489   <b>FT_Glyph_Copy</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>   source,
1490                  <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>  *target );
1491 </pre>
1492 </div>
1493
1494 <p>A function used to copy a glyph image. Note that the created <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> object must be released with <code><a href="ft2-glyph_management.html#ft_done_glyph">FT_Done_Glyph</a></code>.</p>
1495 <h4>input</h4>
1496
1497 <table class="fields">
1498 <tr><td class="val" id="source">source</td><td class="desc">
1499 <p>A handle to the source glyph object.</p>
1500 </td></tr>
1501 </table>
1502
1503 <h4>output</h4>
1504
1505 <table class="fields">
1506 <tr><td class="val" id="target">target</td><td class="desc">
1507 <p>A handle to the target glyph object. 0&nbsp;in case of error.</p>
1508 </td></tr>
1509 </table>
1510
1511 <h4>return</h4>
1512
1513 <p>FreeType error code. 0&nbsp;means success.</p>
1514 <hr>
1515
1516 <h2 id="ft_glyph_transform">FT_Glyph_Transform<a class="headerlink" href="#ft_glyph_transform" title="Permanent link">&para;</a></h2>
1517 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1518 <div class = "codehilite">
1519 <pre>
1520   FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1521   <b>FT_Glyph_Transform</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>    glyph,
1522                       <a href="ft2-basic_types.html#ft_matrix">FT_Matrix</a>*  matrix,
1523                       <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>*  delta );
1524 </pre>
1525 </div>
1526
1527 <p>Transform a glyph image if its format is scalable.</p>
1528 <h4>inout</h4>
1529
1530 <table class="fields">
1531 <tr><td class="val" id="glyph">glyph</td><td class="desc">
1532 <p>A handle to the target glyph object.</p>
1533 </td></tr>
1534 </table>
1535
1536 <h4>input</h4>
1537
1538 <table class="fields">
1539 <tr><td class="val" id="matrix">matrix</td><td class="desc">
1540 <p>A pointer to a 2x2 matrix to apply.</p>
1541 </td></tr>
1542 <tr><td class="val" id="delta">delta</td><td class="desc">
1543 <p>A pointer to a 2d vector to apply. Coordinates are expressed in 1/64th of a pixel.</p>
1544 </td></tr>
1545 </table>
1546
1547 <h4>return</h4>
1548
1549 <p>FreeType error code (if not 0, the glyph format is not scalable).</p>
1550 <h4>note</h4>
1551
1552 <p>The 2x2 transformation matrix is also applied to the glyph's advance vector.</p>
1553 <hr>
1554
1555 <h2 id="ft_glyph_bbox_mode">FT_Glyph_BBox_Mode<a class="headerlink" href="#ft_glyph_bbox_mode" title="Permanent link">&para;</a></h2>
1556 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1557 <div class = "codehilite">
1558 <pre>
1559   <span class="keyword">typedef</span> <span class="keyword">enum</span>  FT_Glyph_BBox_Mode_
1560   {
1561     <a href="ft2-glyph_management.html#ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</a>  = 0,
1562     <a href="ft2-glyph_management.html#ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</a> = 0,
1563     <a href="ft2-glyph_management.html#ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</a>   = 1,
1564     <a href="ft2-glyph_management.html#ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</a>  = 2,
1565     <a href="ft2-glyph_management.html#ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</a>    = 3
1566
1567   } <b>FT_Glyph_BBox_Mode</b>;
1568
1569
1570   /* these constants are deprecated; use the corresponding */
1571   /* `<b>FT_Glyph_BBox_Mode</b>` values instead                   */
1572 #<span class="keyword">define</span> ft_glyph_bbox_unscaled   <a href="ft2-glyph_management.html#ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</a>
1573 #<span class="keyword">define</span> ft_glyph_bbox_subpixels  <a href="ft2-glyph_management.html#ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</a>
1574 #<span class="keyword">define</span> ft_glyph_bbox_gridfit    <a href="ft2-glyph_management.html#ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</a>
1575 #<span class="keyword">define</span> ft_glyph_bbox_truncate   <a href="ft2-glyph_management.html#ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</a>
1576 #<span class="keyword">define</span> ft_glyph_bbox_pixels     <a href="ft2-glyph_management.html#ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</a>
1577 </pre>
1578 </div>
1579
1580 <p>The mode how the values of <code><a href="ft2-glyph_management.html#ft_glyph_get_cbox">FT_Glyph_Get_CBox</a></code> are returned.</p>
1581 <h4>values</h4>
1582
1583 <table class="fields">
1584 <tr><td class="val" id="ft_glyph_bbox_unscaled">FT_GLYPH_BBOX_UNSCALED</td><td class="desc">
1585 <p>Return unscaled font units.</p>
1586 </td></tr>
1587 <tr><td class="val" id="ft_glyph_bbox_subpixels">FT_GLYPH_BBOX_SUBPIXELS</td><td class="desc">
1588 <p>Return unfitted 26.6 coordinates.</p>
1589 </td></tr>
1590 <tr><td class="val" id="ft_glyph_bbox_gridfit">FT_GLYPH_BBOX_GRIDFIT</td><td class="desc">
1591 <p>Return grid-fitted 26.6 coordinates.</p>
1592 </td></tr>
1593 <tr><td class="val" id="ft_glyph_bbox_truncate">FT_GLYPH_BBOX_TRUNCATE</td><td class="desc">
1594 <p>Return coordinates in integer pixels.</p>
1595 </td></tr>
1596 <tr><td class="val" id="ft_glyph_bbox_pixels">FT_GLYPH_BBOX_PIXELS</td><td class="desc">
1597 <p>Return grid-fitted pixel coordinates.</p>
1598 </td></tr>
1599 </table>
1600
1601 <hr>
1602
1603 <h2 id="ft_glyph_get_cbox">FT_Glyph_Get_CBox<a class="headerlink" href="#ft_glyph_get_cbox" title="Permanent link">&para;</a></h2>
1604 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1605 <div class = "codehilite">
1606 <pre>
1607   FT_EXPORT( <span class="keyword">void</span> )
1608   <b>FT_Glyph_Get_CBox</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>  glyph,
1609                      <a href="ft2-basic_types.html#ft_uint">FT_UInt</a>   bbox_mode,
1610                      <a href="ft2-basic_types.html#ft_bbox">FT_BBox</a>  *acbox );
1611 </pre>
1612 </div>
1613
1614 <p>Return a glyph's &lsquo;control box&rsquo;. The control box encloses all the outline's points, including Bezier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bezier outside arcs).</p>
1615 <p>Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the &lsquo;ftbbox&rsquo; component, which is dedicated to this single task.</p>
1616 <h4>input</h4>
1617
1618 <table class="fields">
1619 <tr><td class="val" id="glyph">glyph</td><td class="desc">
1620 <p>A handle to the source glyph object.</p>
1621 </td></tr>
1622 <tr><td class="val" id="mode">mode</td><td class="desc">
1623 <p>The mode that indicates how to interpret the returned bounding box values.</p>
1624 </td></tr>
1625 </table>
1626
1627 <h4>output</h4>
1628
1629 <table class="fields">
1630 <tr><td class="val" id="acbox">acbox</td><td class="desc">
1631 <p>The glyph coordinate bounding box. Coordinates are expressed in 1/64th of pixels if it is grid-fitted.</p>
1632 </td></tr>
1633 </table>
1634
1635 <h4>note</h4>
1636
1637 <p>Coordinates are relative to the glyph origin, using the y&nbsp;upwards convention.</p>
1638 <p>If the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, <code>bbox_mode</code> must be set to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_UNSCALED</a></code> to get unscaled font units in 26.6 pixel format. The value <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_SUBPIXELS</a></code> is another name for this constant.</p>
1639 <p>If the font is tricky and the glyph has been loaded with <code><a href="ft2-base_interface.html#ft_load_xxx">FT_LOAD_NO_SCALE</a></code>, the resulting CBox is meaningless. To get reasonable values for the CBox it is necessary to load the glyph at a large ppem value (so that the hinting instructions can properly shift and scale the subglyphs), then extracting the CBox, which can be eventually converted back to font units.</p>
1640 <p>Note that the maximum coordinates are exclusive, which means that one can compute the width and height of the glyph image (be it in integer or 26.6 pixels) as:
1641 <div class="codehilite"><pre><span></span>  width  = bbox.xMax - bbox.xMin;
1642   height = bbox.yMax - bbox.yMin;
1643 </pre></div></p>
1644 <p>Note also that for 26.6 coordinates, if <code>bbox_mode</code> is set to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_GRIDFIT</a></code>, the coordinates will also be grid-fitted, which corresponds to:
1645 <div class="codehilite"><pre><span></span>  bbox.xMin = FLOOR(bbox.xMin);
1646   bbox.yMin = FLOOR(bbox.yMin);
1647   bbox.xMax = CEILING(bbox.xMax);
1648   bbox.yMax = CEILING(bbox.yMax);
1649 </pre></div></p>
1650 <p>To get the bbox in pixel coordinates, set <code>bbox_mode</code> to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_TRUNCATE</a></code>.</p>
1651 <p>To get the bbox in grid-fitted pixel coordinates, set <code>bbox_mode</code> to <code><a href="ft2-glyph_management.html#ft_glyph_bbox_mode">FT_GLYPH_BBOX_PIXELS</a></code>.</p>
1652 <hr>
1653
1654 <h2 id="ft_glyph_to_bitmap">FT_Glyph_To_Bitmap<a class="headerlink" href="#ft_glyph_to_bitmap" title="Permanent link">&para;</a></h2>
1655 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1656 <div class = "codehilite">
1657 <pre>
1658   FT_EXPORT( <a href="ft2-basic_types.html#ft_error">FT_Error</a> )
1659   <b>FT_Glyph_To_Bitmap</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>*       the_glyph,
1660                       <a href="ft2-base_interface.html#ft_render_mode">FT_Render_Mode</a>  render_mode,
1661                       <a href="ft2-basic_types.html#ft_vector">FT_Vector</a>*      origin,
1662                       <a href="ft2-basic_types.html#ft_bool">FT_Bool</a>         destroy );
1663 </pre>
1664 </div>
1665
1666 <p>Convert a given glyph object to a bitmap glyph object.</p>
1667 <h4>inout</h4>
1668
1669 <table class="fields">
1670 <tr><td class="val" id="the_glyph">the_glyph</td><td class="desc">
1671 <p>A pointer to a handle to the target glyph.</p>
1672 </td></tr>
1673 </table>
1674
1675 <h4>input</h4>
1676
1677 <table class="fields">
1678 <tr><td class="val" id="render_mode">render_mode</td><td class="desc">
1679 <p>An enumeration that describes how the data is rendered.</p>
1680 </td></tr>
1681 <tr><td class="val" id="origin">origin</td><td class="desc">
1682 <p>A pointer to a vector used to translate the glyph image before rendering. Can be&nbsp;0 (if no translation). The origin is expressed in 26.6 pixels.</p>
1683 </td></tr>
1684 <tr><td class="val" id="destroy">destroy</td><td class="desc">
1685 <p>A boolean that indicates that the original glyph image should be destroyed by this function. It is never destroyed in case of error.</p>
1686 </td></tr>
1687 </table>
1688
1689 <h4>return</h4>
1690
1691 <p>FreeType error code. 0&nbsp;means success.</p>
1692 <h4>note</h4>
1693
1694 <p>This function does nothing if the glyph format isn't scalable.</p>
1695 <p>The glyph image is translated with the <code>origin</code> vector before rendering.</p>
1696 <p>The first parameter is a pointer to an <code><a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a></code> handle, that will be <em>replaced</em> by this function (with newly allocated data). Typically, you would use (omitting error handling):
1697 <div class="codehilite"><pre><span></span>  FT_Glyph        glyph;
1698   FT_BitmapGlyph  glyph_bitmap;
1699
1700
1701   // load glyph
1702   error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT );
1703
1704   // extract glyph image
1705   error = FT_Get_Glyph( face-&gt;glyph, &amp;glyph );
1706
1707   // convert to a bitmap (default render mode + destroying old)
1708   if ( glyph-&gt;format != FT_GLYPH_FORMAT_BITMAP )
1709   {
1710     error = FT_Glyph_To_Bitmap( &amp;glyph, FT_RENDER_MODE_NORMAL,
1711                                   0, 1 );
1712     if ( error ) // `glyph&#39; unchanged
1713       ...
1714   }
1715
1716   // access bitmap content by typecasting
1717   glyph_bitmap = (FT_BitmapGlyph)glyph;
1718
1719   // do funny stuff with it, like blitting/drawing
1720   ...
1721
1722   // discard glyph image (bitmap or not)
1723   FT_Done_Glyph( glyph );
1724 </pre></div></p>
1725 <p>Here is another example, again without error handling:
1726 <div class="codehilite"><pre><span></span>  FT_Glyph  glyphs[MAX_GLYPHS]
1727
1728
1729   ...
1730
1731   for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
1732     error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) ||
1733             FT_Get_Glyph ( face-&gt;glyph, &amp;glyphs[idx] );
1734
1735   ...
1736
1737   for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
1738   {
1739     FT_Glyph  bitmap = glyphs[idx];
1740
1741
1742     ...
1743
1744     // after this call, `bitmap&#39; no longer points into
1745     // the `glyphs&#39; array (and the old value isn&#39;t destroyed)
1746     FT_Glyph_To_Bitmap( &amp;bitmap, FT_RENDER_MODE_MONO, 0, 0 );
1747
1748     ...
1749
1750     FT_Done_Glyph( bitmap );
1751   }
1752
1753   ...
1754
1755   for ( idx = 0; i &lt; MAX_GLYPHS; i++ )
1756     FT_Done_Glyph( glyphs[idx] );
1757 </pre></div></p>
1758 <hr>
1759
1760 <h2 id="ft_done_glyph">FT_Done_Glyph<a class="headerlink" href="#ft_done_glyph" title="Permanent link">&para;</a></h2>
1761 <p>Defined in FT_GLYPH_H (freetype/ftglyph.h).</p>
1762 <div class = "codehilite">
1763 <pre>
1764   FT_EXPORT( <span class="keyword">void</span> )
1765   <b>FT_Done_Glyph</b>( <a href="ft2-glyph_management.html#ft_glyph">FT_Glyph</a>  glyph );
1766 </pre>
1767 </div>
1768
1769 <p>Destroy a given glyph.</p>
1770 <h4>input</h4>
1771
1772 <table class="fields">
1773 <tr><td class="val" id="glyph">glyph</td><td class="desc">
1774 <p>A handle to the target glyph object.</p>
1775 </td></tr>
1776 </table>
1777
1778 <hr>
1779                 
1780                   
1781                 
1782               
1783               
1784                 
1785
1786
1787               
1788             </article>
1789           </div>
1790         </div>
1791       </main>
1792       
1793         
1794 <footer class="md-footer">
1795   
1796     <div class="md-footer-nav">
1797       <nav class="md-footer-nav__inner md-grid">
1798         
1799           <a href="ft2-layer_management.html" title="Glyph Layer Management" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
1800             <div class="md-flex__cell md-flex__cell--shrink">
1801               <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
1802             </div>
1803             <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
1804               <span class="md-flex__ellipsis">
1805                 <span class="md-footer-nav__direction">
1806                   Previous
1807                 </span>
1808                 Glyph Layer Management
1809               </span>
1810             </div>
1811           </a>
1812         
1813         
1814           <a href="ft2-mac_specific.html" title="Mac Specific Interface" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
1815             <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
1816               <span class="md-flex__ellipsis">
1817                 <span class="md-footer-nav__direction">
1818                   Next
1819                 </span>
1820                 Mac Specific Interface
1821               </span>
1822             </div>
1823             <div class="md-flex__cell md-flex__cell--shrink">
1824               <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
1825             </div>
1826           </a>
1827         
1828       </nav>
1829     </div>
1830   
1831   <div class="md-footer-meta md-typeset">
1832     <div class="md-footer-meta__inner md-grid">
1833       <div class="md-footer-copyright">
1834         
1835           <div class="md-footer-copyright__highlight">
1836             Copyright 2019 <a href = "https://www.freetype.org/license.html">The FreeType Project</a>.
1837           </div>
1838         
1839         powered by
1840         <a href="https://www.mkdocs.org">MkDocs</a>
1841         and
1842         <a href="https://squidfunk.github.io/mkdocs-material/">
1843           Material for MkDocs</a>
1844       </div>
1845       
1846     </div>
1847   </div>
1848 </footer>
1849       
1850     </div>
1851     
1852       <script src="assets/javascripts/application.d9aa80ab.js"></script>
1853       
1854       <script>app.initialize({version:"1.0.4",url:{base:"."}})</script>
1855       
1856         <script src="javascripts/extra.js"></script>
1857       
1858     
1859   </body>
1860 </html>