1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FreeType-2.6.1 API Reference</title>
<style type="text/css">
a:link { color: #0000EF; }
a:visited { color: #51188E; }
a:hover { color: #FF0000; }
body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
color: #000000;
background: #FFFFFF;
width: 87%;
margin: auto; }
div.section { width: 75%;
margin: auto; }
div.section hr { margin: 4ex 0 1ex 0; }
div.section h4 { background-color: #EEEEFF;
font-size: medium;
font-style: oblique;
font-weight: bold;
margin: 3ex 0 1.5ex 9%;
padding: 0.3ex 0 0.3ex 1%; }
div.section p { margin: 1.5ex 0 1.5ex 10%; }
div.section pre { margin: 3ex 0 3ex 9%;
background-color: #D6E8FF;
padding: 2ex 0 2ex 1%; }
div.section table.fields { width: 90%;
margin: 1.5ex 0 1.5ex 10%; }
div.section table.toc { width: 95%;
margin: 1.5ex 0 1.5ex 5%; }
div.timestamp { text-align: center;
font-size: 69%;
margin: 1.5ex 0 1.5ex 0; }
h1 { text-align: center; }
h3 { font-size: medium;
margin: 4ex 0 1.5ex 0; }
p { text-align: justify; }
pre.colored { color: blue; }
span.keyword { font-family: monospace;
text-align: left;
white-space: pre;
color: darkblue; }
table.fields td.val { font-weight: bold;
text-align: right;
width: 30%;
vertical-align: baseline;
padding: 1ex 1em 1ex 0; }
table.fields td.desc { vertical-align: baseline;
padding: 1ex 0 1ex 1em; }
table.fields td.desc p:first-child { margin: 0; }
table.fields td.desc p { margin: 1.5ex 0 0 0; }
table.index { margin: 6ex auto 6ex auto;
border: 0;
border-collapse: separate;
border-spacing: 1em 0.3ex; }
table.index tr { padding: 0; }
table.index td { padding: 0; }
table.index-toc-link { width: 100%;
border: 0;
border-spacing: 0;
margin: 1ex 0 1ex 0; }
table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: left; }
table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: center; }
table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: right; }
table.synopsis { margin: 6ex auto 6ex auto;
border: 0;
border-collapse: separate;
border-spacing: 2em 0.6ex; }
table.synopsis tr { padding: 0; }
table.synopsis td { padding: 0; }
table.toc td.link { width: 30%;
text-align: right;
vertical-align: baseline;
padding: 1ex 1em 1ex 0; }
table.toc td.desc { vertical-align: baseline;
padding: 1ex 0 1ex 1em;
text-align: left; }
table.toc td.desc p:first-child { margin: 0;
text-align: left; }
table.toc td.desc p { margin: 1.5ex 0 0 0;
text-align: left; }
</style>
</head>
<body>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table>
<h1>FreeType-2.6.1 API Reference</h1>
<h1>Outline Processing</h1>
<h2>Synopsis</h2>
<table class="synopsis">
<tr><td><a href="#FT_Outline">FT_Outline</a></td><td><a href="#FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</a></td></tr>
<tr><td><a href="#FT_Outline_New">FT_Outline_New</a></td><td><a href="#FT_Outline_Render">FT_Outline_Render</a></td></tr>
<tr><td><a href="#FT_Outline_Done">FT_Outline_Done</a></td><td><a href="#FT_Outline_Decompose">FT_Outline_Decompose</a></td></tr>
<tr><td><a href="#FT_Outline_Copy">FT_Outline_Copy</a></td><td><a href="#FT_Outline_Funcs">FT_Outline_Funcs</a></td></tr>
<tr><td><a href="#FT_Outline_Translate">FT_Outline_Translate</a></td><td><a href="#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Transform">FT_Outline_Transform</a></td><td><a href="#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Embolden">FT_Outline_Embolden</a></td><td><a href="#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</a></td><td><a href="#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a></td></tr>
<tr><td><a href="#FT_Outline_Reverse">FT_Outline_Reverse</a></td><td> </td></tr>
<tr><td><a href="#FT_Outline_Check">FT_Outline_Check</a></td><td><a href="#FT_Orientation">FT_Orientation</a></td></tr>
<tr><td> </td><td><a href="#FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</a></td></tr>
<tr><td><a href="#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a></td><td> </td></tr>
<tr><td><a href="#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a></td><td><a href="#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a></td></tr>
<tr><td> </td><td></td></tr>
</table>
<p>This section contains routines used to create and destroy scalable glyph images known as ‘outlines’. These can also be measured, transformed, and converted into bitmaps and pixmaps.</p>
<div class="section">
<h3 id="FT_Outline">FT_Outline</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_
{
<span class="keyword">short</span> n_contours; /* number of contours in glyph */
<span class="keyword">short</span> n_points; /* number of points in the glyph */
<a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* points; /* the outline's points */
<span class="keyword">char</span>* tags; /* the points flags */
<span class="keyword">short</span>* contours; /* the contour end points */
<span class="keyword">int</span> flags; /* outline masks */
} <b>FT_Outline</b>;
</pre>
<p>This structure is used to describe an outline to the scan-line converter.</p>
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="n_contours">n_contours</td><td class="desc">
<p>The number of contours in the outline.</p>
</td></tr>
<tr><td class="val" id="n_points">n_points</td><td class="desc">
<p>The number of points in the outline.</p>
</td></tr>
<tr><td class="val" id="points">points</td><td class="desc">
<p>A pointer to an array of ‘n_points’ <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a> elements, giving the outline's point coordinates.</p>
</td></tr>
<tr><td class="val" id="tags">tags</td><td class="desc">
<p>A pointer to an array of ‘n_points’ chars, giving each outline point's type.</p>
<p>If bit 0 is unset, the point is ‘off’ the curve, i.e., a Bézier control point, while it is ‘on’ if set.</p>
<p>Bit 1 is meaningful for ‘off’ points only. If set, it indicates a third-order Bézier arc control point; and a second-order control point if unset.</p>
<p>If bit 2 is set, bits 5-7 contain the drop-out mode (as defined in the OpenType specification; the value is the same as the argument to the SCANMODE instruction).</p>
<p>Bits 3 and 4 are reserved for internal purposes.</p>
</td></tr>
<tr><td class="val" id="contours">contours</td><td class="desc">
<p>An array of ‘n_contours’ shorts, giving the end point of each contour within the outline. For example, the first contour is defined by the points ‘0’ to ‘contours[0]’, the second one is defined by the points ‘contours[0]+1’ to ‘contours[1]’, etc.</p>
</td></tr>
<tr><td class="val" id="flags">flags</td><td class="desc">
<p>A set of bit flags used to characterize the outline and give hints to the scan-converter and hinter on how to convert/grid-fit it. See <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_XXX</a>.</p>
</td></tr>
</table>
<h4>note</h4>
<p>The B/W rasterizer only checks bit 2 in the ‘tags’ array for the first point of each contour. The drop-out mode as given with <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> in ‘flags’ is then overridden.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_New">FT_Outline_New</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_New</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> numContours,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *anoutline );
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
FT_Outline_New_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<a href="ft2-basic_types.html#FT_UInt">FT_UInt</a> numPoints,
<a href="ft2-basic_types.html#FT_Int">FT_Int</a> numContours,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *anoutline );
</pre>
<p>Create a new outline of a given size.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to the library object from where the outline is allocated. Note however that the new outline will <b>not</b> necessarily be <b>freed</b>, when destroying the library, by <a href="ft2-base_interface.html#FT_Done_FreeType">FT_Done_FreeType</a>.</p>
</td></tr>
<tr><td class="val" id="numPoints">numPoints</td><td class="desc">
<p>The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).</p>
</td></tr>
<tr><td class="val" id="numContours">numContours</td><td class="desc">
<p>The maximum number of contours within the outline. This value must be in the range 0 to ‘numPoints’.</p>
</td></tr>
</table>
<h4>output</h4>
<table class="fields">
<tr><td class="val" id="anoutline">anoutline</td><td class="desc">
<p>A handle to the new outline.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>The reason why this function takes a ‘library’ parameter is simply to use the library's memory allocator.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Done">FT_Outline_Done</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Done</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
FT_Outline_Done_Internal( <a href="ft2-system_interface.html#FT_Memory">FT_Memory</a> memory,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre>
<p>Destroy an outline created with <a href="ft2-outline_processing.html#FT_Outline_New">FT_Outline_New</a>.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle of the library object used to allocate the outline.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the outline object to be discarded.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>If the outline's ‘owner’ field is not set, only the outline descriptor will be released.</p>
<p>The reason why this function takes an ‘library’ parameter is simply to use ft_mem_free().</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Copy">FT_Outline_Copy</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Copy</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* source,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a> *target );
</pre>
<p>Copy an outline into another one. Both objects must have the same sizes (number of points & number of contours) when this function is called.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="source">source</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>
<h4>output</h4>
<table class="fields">
<tr><td class="val" id="target">target</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Translate">FT_Outline_Translate</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Translate</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xOffset,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> yOffset );
</pre>
<p>Apply a simple translation to the points of an outline.</p>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="xOffset">xOffset</td><td class="desc">
<p>The horizontal offset.</p>
</td></tr>
<tr><td class="val" id="yOffset">yOffset</td><td class="desc">
<p>The vertical offset.</p>
</td></tr>
</table>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Transform">FT_Outline_Transform</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Transform</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Matrix">FT_Matrix</a>* matrix );
</pre>
<p>Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.</p>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="matrix">matrix</td><td class="desc">
<p>A pointer to the transformation matrix.</p>
</td></tr>
</table>
<h4>note</h4>
<p>You can use <a href="ft2-outline_processing.html#FT_Outline_Translate">FT_Outline_Translate</a> if you need to translate the outline's points.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Embolden">FT_Outline_Embolden</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Embolden</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> strength );
</pre>
<p>Embolden an outline. The new outline will be at most 4 times ‘strength’ pixels wider and higher. You may think of the left and bottom borders as unchanged.</p>
<p>Negative ‘strength’ values to reduce the outline thickness are possible also.</p>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the target outline.</p>
</td></tr>
</table>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="strength">strength</td><td class="desc">
<p>How strong the glyph is emboldened. Expressed in 26.6 pixel format.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>The used algorithm to increase or decrease the thickness of the glyph doesn't change the number of points; this means that certain situations like acute angles or intersections are sometimes handled incorrectly.</p>
<p>If you need ‘better’ metrics values you should call <a href="ft2-outline_processing.html#FT_Outline_Get_CBox">FT_Outline_Get_CBox</a> or <a href="ft2-outline_processing.html#FT_Outline_Get_BBox">FT_Outline_Get_BBox</a>.</p>
<p>Example call:</p>
<pre class="colored">
FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
FT_Outline_Embolden( &face->glyph->outline, strength );
</pre>
<p>To get meaningful results, font scaling values must be set with functions like <a href="ft2-base_interface.html#FT_Set_Char_Size">FT_Set_Char_Size</a> before calling FT_Render_Glyph.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_EmboldenXY">FT_Outline_EmboldenXY</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_EmboldenXY</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> xstrength,
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> ystrength );
</pre>
<p>Embolden an outline. The new outline will be ‘xstrength’ pixels wider and ‘ystrength’ pixels higher. Otherwise, it is similar to <a href="ft2-outline_processing.html#FT_Outline_Embolden">FT_Outline_Embolden</a>, which uses the same strength in both directions.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Reverse">FT_Outline_Reverse</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Reverse</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre>
<p>Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.</p>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the target outline descriptor.</p>
</td></tr>
</table>
<h4>note</h4>
<p>This function toggles the bit flag <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_REVERSE_FILL</a> in the outline's ‘flags’ field.</p>
<p>It shouldn't be used by a normal client application, unless it knows what it is doing.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Check">FT_Outline_Check</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Check</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre>
<p>Check the contents of an outline descriptor.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to a source outline.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Get_CBox">FT_Outline_Get_CBox</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <span class="keyword">void</span> )
<b>FT_Outline_Get_CBox</b>( <span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *acbox );
</pre>
<p>Return an outline's ‘control box’. The control box encloses all the outline's points, including Bézier 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 Bézier outside arcs).</p>
<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 ‘ftbbox’ component, which is dedicated to this single task.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
<h4>output</h4>
<table class="fields">
<tr><td class="val" id="acbox">acbox</td><td class="desc">
<p>The outline's control box.</p>
</td></tr>
</table>
<h4>note</h4>
<p>See <a href="ft2-glyph_management.html#FT_Glyph_Get_CBox">FT_Glyph_Get_CBox</a> for a discussion of tricky fonts.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Get_BBox">FT_Outline_Get_BBox</h3>
<p>Defined in FT_BBOX_H (freetype/ftbbox.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Get_BBox</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-basic_types.html#FT_BBox">FT_BBox</a> *abbox );
</pre>
<p>Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm that returns <i>very</i> quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline.</p>
</td></tr>
</table>
<h4>output</h4>
<table class="fields">
<tr><td class="val" id="abbox">abbox</td><td class="desc">
<p>The outline's exact bounding box.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>If the font is tricky and the glyph has been loaded with <a href="ft2-base_interface.html#FT_LOAD_XXX">FT_LOAD_NO_SCALE</a>, the resulting BBox is meaningless. To get reasonable values for the BBox 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 BBox, which can be eventually converted back to font units.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Get_Bitmap">FT_Outline_Get_Bitmap</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Get_Bitmap</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Bitmap">FT_Bitmap</a> *abitmap );
</pre>
<p>Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="abitmap">abitmap</td><td class="desc">
<p>A pointer to the target bitmap descriptor.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>This function does NOT CREATE the bitmap, it only renders an outline image within the one you pass to it! Consequently, the various fields in ‘abitmap’ should be set accordingly.</p>
<p>It will use the raster corresponding to the default glyph format.</p>
<p>The value of the ‘num_grays’ field in ‘abitmap’ is ignored. If you select the gray-level rasterizer, and you want less than 256 gray levels, you have to use <a href="ft2-outline_processing.html#FT_Outline_Render">FT_Outline_Render</a> directly.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Render">FT_Outline_Render</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Render</b>( <a href="ft2-base_interface.html#FT_Library">FT_Library</a> library,
<a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a>* params );
</pre>
<p>Render an outline within a bitmap using the current scan-convert. This function uses an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure as an argument, allowing advanced features like direct composition, translucency, etc.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="library">library</td><td class="desc">
<p>A handle to a FreeType library object.</p>
</td></tr>
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source outline descriptor.</p>
</td></tr>
</table>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="params">params</td><td class="desc">
<p>A pointer to an <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure used to describe the rendering operation.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>You should know what you are doing and how <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> works to use this function.</p>
<p>The field ‘params.source’ will be set to ‘outline’ before the scan converter is called, which means that the value you give to it is actually ignored.</p>
<p>The gray-level rasterizer always uses 256 gray levels. If you want less gray levels, you have to provide your own span callback. See the <a href="ft2-raster.html#FT_RASTER_FLAG_XXX">FT_RASTER_FLAG_DIRECT</a> value of the ‘flags’ field in the <a href="ft2-raster.html#FT_Raster_Params">FT_Raster_Params</a> structure for more details.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Decompose">FT_Outline_Decompose</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-basic_types.html#FT_Error">FT_Error</a> )
<b>FT_Outline_Decompose</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline,
<span class="keyword">const</span> <a href="ft2-outline_processing.html#FT_Outline_Funcs">FT_Outline_Funcs</a>* func_interface,
<span class="keyword">void</span>* user );
</pre>
<p>Walk over an outline's structure to decompose it into individual segments and Bézier arcs. This function also emits ‘move to’ operations to indicate the start of new contours in the outline.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A pointer to the source target.</p>
</td></tr>
<tr><td class="val" id="func_interface">func_interface</td><td class="desc">
<p>A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.</p>
</td></tr>
</table>
<h4>inout</h4>
<table class="fields">
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer that is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.</p>
</td></tr>
</table>
<h4>return</h4>
<p>FreeType error code. 0 means success.</p>
<h4>note</h4>
<p>A contour that contains a single point only is represented by a ‘move to’ operation followed by ‘line to’ to the same point. In most cases, it is best to filter this out before using the outline for stroking purposes (otherwise it would result in a visible dot when round caps are used).</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Funcs">FT_Outline_Funcs</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">struct</span> FT_Outline_Funcs_
{
<a href="ft2-outline_processing.html#FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</a> move_to;
<a href="ft2-outline_processing.html#FT_Outline_LineToFunc">FT_Outline_LineToFunc</a> line_to;
<a href="ft2-outline_processing.html#FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</a> conic_to;
<a href="ft2-outline_processing.html#FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</a> cubic_to;
<span class="keyword">int</span> shift;
<a href="ft2-basic_types.html#FT_Pos">FT_Pos</a> delta;
} <b>FT_Outline_Funcs</b>;
</pre>
<p>A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.</p>
<h4>fields</h4>
<table class="fields">
<tr><td class="val" id="move_to">move_to</td><td class="desc">
<p>The ‘move to’ emitter.</p>
</td></tr>
<tr><td class="val" id="line_to">line_to</td><td class="desc">
<p>The segment emitter.</p>
</td></tr>
<tr><td class="val" id="conic_to">conic_to</td><td class="desc">
<p>The second-order Bézier arc emitter.</p>
</td></tr>
<tr><td class="val" id="cubic_to">cubic_to</td><td class="desc">
<p>The third-order Bézier arc emitter.</p>
</td></tr>
<tr><td class="val" id="shift">shift</td><td class="desc">
<p>The shift that is applied to coordinates before they are sent to the emitter.</p>
</td></tr>
<tr><td class="val" id="delta">delta</td><td class="desc">
<p>The delta that is applied to coordinates before they are sent to the emitter, but after the shift.</p>
</td></tr>
</table>
<h4>note</h4>
<p>The point coordinates sent to the emitters are the transformed version of the original coordinates (this is important for high accuracy during scan-conversion). The transformation is simple:</p>
<pre class="colored">
x' = (x << shift) - delta
y' = (x << shift) - delta
</pre>
<p>Set the values of ‘shift’ and ‘delta’ to 0 to get the original point coordinates.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_MoveToFunc">FT_Outline_MoveToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Outline_MoveToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
<span class="keyword">void</span>* user );
#define FT_Outline_MoveTo_Func <b>FT_Outline_MoveToFunc</b>
</pre>
<p>A function pointer type used to describe the signature of a ‘move to’ function during outline walking/decomposition.</p>
<p>A ‘move to’ is emitted to start a new contour in an outline.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target point of the ‘move to’.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
<h4>return</h4>
<p>Error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_LineToFunc">FT_Outline_LineToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Outline_LineToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
<span class="keyword">void</span>* user );
#define FT_Outline_LineTo_Func <b>FT_Outline_LineToFunc</b>
</pre>
<p>A function pointer type used to describe the signature of a ‘line to’ function during outline walking/decomposition.</p>
<p>A ‘line to’ is emitted to indicate a segment in the outline.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target point of the ‘line to’.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
<h4>return</h4>
<p>Error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_ConicToFunc">FT_Outline_ConicToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Outline_ConicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
<span class="keyword">void</span>* user );
#define FT_Outline_ConicTo_Func <b>FT_Outline_ConicToFunc</b>
</pre>
<p>A function pointer type used to describe the signature of a ‘conic to’ function during outline walking or decomposition.</p>
<p>A ‘conic to’ is emitted to indicate a second-order Bézier arc in the outline.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="control">control</td><td class="desc">
<p>An intermediate control point between the last position and the new target in ‘to’.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target end point of the conic arc.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
<h4>return</h4>
<p>Error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_CubicToFunc">FT_Outline_CubicToFunc</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">int</span>
(*<b>FT_Outline_CubicToFunc</b>)( <span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control1,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* control2,
<span class="keyword">const</span> <a href="ft2-basic_types.html#FT_Vector">FT_Vector</a>* to,
<span class="keyword">void</span>* user );
#define FT_Outline_CubicTo_Func <b>FT_Outline_CubicToFunc</b>
</pre>
<p>A function pointer type used to describe the signature of a ‘cubic to’ function during outline walking or decomposition.</p>
<p>A ‘cubic to’ is emitted to indicate a third-order Bézier arc.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="control1">control1</td><td class="desc">
<p>A pointer to the first Bézier control point.</p>
</td></tr>
<tr><td class="val" id="control2">control2</td><td class="desc">
<p>A pointer to the second Bézier control point.</p>
</td></tr>
<tr><td class="val" id="to">to</td><td class="desc">
<p>A pointer to the target end point.</p>
</td></tr>
<tr><td class="val" id="user">user</td><td class="desc">
<p>A typeless pointer, which is passed from the caller of the decomposition function.</p>
</td></tr>
</table>
<h4>return</h4>
<p>Error code. 0 means success.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Orientation">FT_Orientation</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
<span class="keyword">typedef</span> <span class="keyword">enum</span> FT_Orientation_
{
<a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a> = 0,
<a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a> = 1,
<a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</a> = <a href="ft2-outline_processing.html#FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</a>,
<a href="ft2-outline_processing.html#FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</a> = <a href="ft2-outline_processing.html#FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</a>,
<a href="ft2-outline_processing.html#FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</a>
} <b>FT_Orientation</b>;
</pre>
<p>A list of values used to describe an outline's contour orientation.</p>
<p>The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_ORIENTATION_TRUETYPE">FT_ORIENTATION_TRUETYPE</td><td class="desc">
<p>According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_POSTSCRIPT">FT_ORIENTATION_POSTSCRIPT</td><td class="desc">
<p>According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_FILL_RIGHT">FT_ORIENTATION_FILL_RIGHT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a>, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_FILL_LEFT">FT_ORIENTATION_FILL_LEFT</td><td class="desc">
<p>This is identical to <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a>, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.</p>
</td></tr>
<tr><td class="val" id="FT_ORIENTATION_NONE">FT_ORIENTATION_NONE</td><td class="desc">
<p>The orientation cannot be determined. That is, different parts of the glyph have different orientation.</p>
</td></tr>
</table>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_Outline_Get_Orientation">FT_Outline_Get_Orientation</h3>
<p>Defined in FT_OUTLINE_H (freetype/ftoutln.h).</p>
<pre>
FT_EXPORT( <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a> )
<b>FT_Outline_Get_Orientation</b>( <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>* outline );
</pre>
<p>This function analyzes a glyph outline and tries to compute its fill orientation (see <a href="ft2-outline_processing.html#FT_Orientation">FT_Orientation</a>). This is done by integrating the total area covered by the outline. The positive integral corresponds to the clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_POSTSCRIPT</a> is returned. The negative integral corresponds to the counter-clockwise orientation and <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> is returned.</p>
<p>Note that this will return <a href="ft2-outline_processing.html#FT_Orientation">FT_ORIENTATION_TRUETYPE</a> for empty outlines.</p>
<h4>input</h4>
<table class="fields">
<tr><td class="val" id="outline">outline</td><td class="desc">
<p>A handle to the source outline.</p>
</td></tr>
</table>
<h4>return</h4>
<p>The orientation.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
<div class="section">
<h3 id="FT_OUTLINE_XXX">FT_OUTLINE_XXX</h3>
<p>Defined in FT_IMAGE_H (freetype/ftimage.h).</p>
<pre>
#define <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a> 0x0
#define <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a> 0x1
#define <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a> 0x2
#define <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a> 0x4
#define <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a> 0x8
#define <a href="ft2-outline_processing.html#FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</a> 0x10
#define <a href="ft2-outline_processing.html#FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</a> 0x20
#define <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a> 0x100
#define <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a> 0x200
/* these constants are deprecated; use the corresponding */
/* `<b>FT_OUTLINE_XXX</b>' values instead */
#define ft_outline_none <a href="ft2-outline_processing.html#FT_OUTLINE_NONE">FT_OUTLINE_NONE</a>
#define ft_outline_owner <a href="ft2-outline_processing.html#FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</a>
#define ft_outline_even_odd_fill <a href="ft2-outline_processing.html#FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</a>
#define ft_outline_reverse_fill <a href="ft2-outline_processing.html#FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</a>
#define ft_outline_ignore_dropouts <a href="ft2-outline_processing.html#FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</a>
#define ft_outline_high_precision <a href="ft2-outline_processing.html#FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</a>
#define ft_outline_single_pass <a href="ft2-outline_processing.html#FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</a>
</pre>
<p>A list of bit-field constants use for the flags in an outline's ‘flags’ field.</p>
<h4>values</h4>
<table class="fields">
<tr><td class="val" id="FT_OUTLINE_NONE">FT_OUTLINE_NONE</td><td class="desc">
<p>Value 0 is reserved.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_OWNER">FT_OUTLINE_OWNER</td><td class="desc">
<p>If set, this flag indicates that the outline's field arrays (i.e., ‘points’, ‘flags’, and ‘contours’) are ‘owned’ by the outline object, and should thus be freed when it is destroyed.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_EVEN_ODD_FILL">FT_OUTLINE_EVEN_ODD_FILL</td><td class="desc">
<p>By default, outlines are filled using the non-zero winding rule. If set to 1, the outline will be filled using the even-odd fill rule (only works with the smooth rasterizer).</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_REVERSE_FILL">FT_OUTLINE_REVERSE_FILL</td><td class="desc">
<p>By default, outside contours of an outline are oriented in clock-wise direction, as defined in the TrueType specification. This flag is set if the outline uses the opposite direction (typically for Type 1 fonts). This flag is ignored by the scan converter.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_IGNORE_DROPOUTS">FT_OUTLINE_IGNORE_DROPOUTS</td><td class="desc">
<p>By default, the scan converter will try to detect drop-outs in an outline and correct the glyph bitmap to ensure consistent shape continuity. If set, this flag hints the scan-line converter to ignore such cases. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_SMART_DROPOUTS">FT_OUTLINE_SMART_DROPOUTS</td><td class="desc">
<p>Select smart dropout control. If unset, use simple dropout control. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_INCLUDE_STUBS">FT_OUTLINE_INCLUDE_STUBS</td><td class="desc">
<p>If set, turn pixels on for ‘stubs’, otherwise exclude them. Ignored if <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a> is set. See below for more information.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_HIGH_PRECISION">FT_OUTLINE_HIGH_PRECISION</td><td class="desc">
<p>This flag indicates that the scan-line converter should try to convert this outline to bitmaps with the highest possible quality. It is typically set for small character sizes. Note that this is only a hint that might be completely ignored by a given scan-converter.</p>
</td></tr>
<tr><td class="val" id="FT_OUTLINE_SINGLE_PASS">FT_OUTLINE_SINGLE_PASS</td><td class="desc">
<p>This flag is set to force a given scan-converter to only use a single pass over the outline to render a bitmap glyph image. Normally, it is set for very large character sizes. It is only a hint that might be completely ignored by a given scan-converter.</p>
</td></tr>
</table>
<h4>note</h4>
<p>The flags <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_IGNORE_DROPOUTS</a>, <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_SMART_DROPOUTS</a>, and <a href="ft2-outline_processing.html#FT_OUTLINE_XXX">FT_OUTLINE_INCLUDE_STUBS</a> are ignored by the smooth rasterizer.</p>
<p>There exists a second mechanism to pass the drop-out mode to the B/W rasterizer; see the ‘tags’ field in <a href="ft2-outline_processing.html#FT_Outline">FT_Outline</a>.</p>
<p>Please refer to the description of the ‘SCANTYPE’ instruction in the OpenType specification (in file ‘ttinst1.doc’) how simple drop-outs, smart drop-outs, and stubs are defined.</p>
<hr>
<table class="index-toc-link"><tr><td class="left">[<a href="ft2-index.html">Index</a>]</td><td class="middle">[<a href="#">Top</a>]</td><td class="right">[<a href="ft2-toc.html">TOC</a>]</td></tr></table></div>
</body>
</html>
|