4349 |
Serge |
1 |
|
|
|
2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
FreeType-2.5.0 API Reference |
|
|
7 |
|
|
|
8 |
body { font-family: Verdana, Geneva, Arial, Helvetica, serif; |
|
|
9 |
color: #000000; |
|
|
10 |
background: #FFFFFF; } |
|
|
11 |
|
|
|
12 |
p { text-align: justify; } |
|
|
13 |
h1 { text-align: center; } |
|
|
14 |
li { text-align: justify; } |
|
|
15 |
td { padding: 0 0.5em 0 0.5em; } |
|
|
16 |
td.left { padding: 0 0.5em 0 0.5em; |
|
|
17 |
text-align: left; } |
|
|
18 |
|
|
|
19 |
a:link { color: #0000EF; } |
|
|
20 |
a:visited { color: #51188E; } |
|
|
21 |
a:hover { color: #FF0000; } |
|
|
22 |
|
|
|
23 |
span.keyword { font-family: monospace; |
|
|
24 |
text-align: left; |
|
|
25 |
white-space: pre; |
|
|
26 |
color: darkblue; } |
|
|
27 |
|
|
|
28 |
pre.colored { color: blue; } |
|
|
29 |
|
|
|
30 |
ul.empty { list-style-type: none; } |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
38 |
FreeType-2.5.0 API Reference
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
Outline Processing |
|
|
42 |
|
|
|
43 |
Synopsis
|
|
|
44 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
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.
|
|
|
61 |
|
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
66 |
|
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
typedef struct FT_Outline_ |
|
|
70 |
{ |
|
|
71 |
short n_contours; /* number of contours in glyph */ |
|
|
72 |
short n_points; /* number of points in the glyph */ |
|
|
73 |
|
|
|
74 |
FT_Vector* points; /* the outline's points */ |
|
|
75 |
char* tags; /* the points flags */ |
|
|
76 |
short* contours; /* the contour end points */ |
|
|
77 |
|
|
|
78 |
int flags; /* outline masks */ |
|
|
79 |
|
|
|
80 |
} FT_Outline; |
|
|
81 |
|
|
|
82 |
/* Following limits must be consistent with */ |
|
|
83 |
/* FT_Outline.{n_contours,n_points} */ |
|
|
84 |
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX |
|
|
85 |
#define FT_OUTLINE_POINTS_MAX SHRT_MAX |
|
|
86 |
|
|
|
87 |
|
|
|
|
88 |
|
|
|
89 |
This structure is used to describe an outline to the scan-line converter.
|
|
|
90 |
|
|
|
|
91 |
fields | |
|
|
92 |
|
|
|
93 |
|
|
94 |
n_contours | |
|
|
95 |
The number of contours in the outline.
|
|
|
96 |
|
|
|
|
97 |
n_points | |
|
|
98 |
The number of points in the outline.
|
|
|
99 |
|
|
|
|
100 |
points | |
|
|
101 |
A pointer to an array of ‘n_points’ FT_Vector elements, giving the outline's point coordinates.
|
|
|
102 |
|
|
|
|
103 |
tags | |
|
|
104 |
A pointer to an array of ‘n_points’ chars, giving each outline point's type.
|
|
|
105 |
If bit 0 is unset, the point is ‘off’ the curve, i.e., a Bézier control point, while it is ‘on’ if set.
|
|
|
106 |
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.
|
|
|
107 |
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).
|
|
|
108 |
Bits 3 and 4 are reserved for internal purposes.
|
|
|
109 |
|
|
|
|
110 |
contours | |
|
|
111 |
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.
|
|
|
112 |
|
|
|
|
113 |
flags | |
|
|
114 |
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 FT_OUTLINE_FLAGS.
|
|
|
115 |
|
|
|
|
116 |
| |
|
|
117 |
|
|
|
|
118 |
|
|
|
121 |
|
|
|
|
122 |
|
|
|
123 |
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
131 |
|
|
|
|
132 |
|
|
|
146 |
|
|
|
147 |
A list of bit-field constants use for the flags in an outline's ‘flags’ field.
|
|
|
148 |
|
|
|
|
149 |
values | |
|
|
150 |
|
|
|
151 |
|
|
152 |
FT_OUTLINE_NONE | |
|
|
153 |
Value 0 is reserved.
|
|
|
154 |
|
|
|
|
155 |
FT_OUTLINE_OWNER | |
|
|
156 |
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.
|
|
|
157 |
|
|
|
|
158 |
FT_OUTLINE_EVEN_ODD_FILL |
|
|
|
159 |
| |
|
|
160 |
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).
|
|
|
161 |
|
|
|
|
162 |
FT_OUTLINE_REVERSE_FILL |
|
|
|
163 |
| |
|
|
164 |
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.
|
|
|
165 |
|
|
|
|
166 |
FT_OUTLINE_IGNORE_DROPOUTS |
|
|
|
167 |
| |
|
|
168 |
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.
|
|
|
169 |
|
|
|
|
170 |
FT_OUTLINE_SMART_DROPOUTS |
|
|
|
171 |
| |
|
|
172 |
Select smart dropout control. If unset, use simple dropout control. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
|
|
|
173 |
|
|
|
|
174 |
FT_OUTLINE_INCLUDE_STUBS |
|
|
|
175 |
| |
|
|
176 |
If set, turn pixels on for ‘stubs’, otherwise exclude them. Ignored if FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more information.
|
|
|
177 |
|
|
|
|
178 |
FT_OUTLINE_HIGH_PRECISION |
|
|
|
179 |
| |
|
|
180 |
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.
|
|
|
181 |
|
|
|
|
182 |
FT_OUTLINE_SINGLE_PASS | |
|
|
183 |
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.
|
|
|
184 |
|
|
|
|
185 |
| |
|
|
186 |
|
|
|
|
187 |
|
|
|
192 |
|
|
|
|
193 |
|
|
|
194 |
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
|
|
|
201 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
202 |
|
|
|
|
203 |
|
|
|
219 |
|
|
|
220 |
Create a new outline of a given size.
|
|
|
221 |
|
|
|
|
222 |
input | |
|
|
223 |
|
|
|
224 |
|
|
225 |
library | |
|
|
226 |
A handle to the library object from where the outline is allocated. Note however that the new outline will not necessarily be freed, when destroying the library, by FT_Done_FreeType.
|
|
|
227 |
|
|
|
|
228 |
numPoints | |
|
|
229 |
The maximum number of points within the outline. Must be smaller than or equal to 0xFFFF (65535).
|
|
|
230 |
|
|
|
|
231 |
numContours | |
|
|
232 |
The maximum number of contours within the outline. This value must be in the range 0 to ‘numPoints’.
|
|
|
233 |
|
|
|
|
234 |
| |
|
|
235 |
|
|
|
|
236 |
|
|
|
244 |
return | |
|
|
245 |
FreeType error code. 0 means success.
|
|
|
246 |
|
|
|
|
247 |
note | |
|
|
248 |
The reason why this function takes a ‘library’ parameter is simply to use the library's memory allocator.
|
|
|
249 |
|
|
|
|
250 |
|
|
|
|
251 |
|
|
|
252 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
260 |
|
|
|
|
261 |
|
|
|
273 |
|
|
|
276 |
input | |
|
|
277 |
|
|
|
278 |
|
|
279 |
library | |
|
|
280 |
A handle of the library object used to allocate the outline.
|
|
|
281 |
|
|
|
|
282 |
outline | |
|
|
283 |
A pointer to the outline object to be discarded.
|
|
|
284 |
|
|
|
|
285 |
| |
|
|
286 |
|
|
|
|
287 |
return | |
|
|
288 |
FreeType error code. 0 means success.
|
|
|
289 |
|
|
|
|
290 |
note | |
|
|
291 |
If the outline's ‘owner’ field is not set, only the outline descriptor will be released.
|
|
|
292 |
The reason why this function takes an ‘library’ parameter is simply to use ft_mem_free().
|
|
|
293 |
|
|
|
|
294 |
|
|
|
|
295 |
|
|
|
296 |
|
|
|
299 |
|
|
|
300 |
|
|
|
301 |
|
|
|
302 |
|
|
|
303 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
304 |
|
|
|
|
305 |
|
|
|
312 |
|
|
|
313 |
Copy an outline into another one. Both objects must have the same sizes (number of points & number of contours) when this function is called.
|
|
|
314 |
|
|
|
|
315 |
|
|
|
323 |
|
|
|
331 |
return | |
|
|
332 |
FreeType error code. 0 means success.
|
|
|
333 |
|
|
|
|
334 |
|
|
|
|
335 |
|
|
|
336 |
|
|
|
339 |
|
|
|
340 |
|
|
|
376 |
|
|
|
377 |
|
|
|
380 |
|
|
|
381 |
|
|
|
382 |
|
|
|
383 |
|
|
|
384 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
385 |
|
|
|
|
386 |
|
|
|
393 |
|
|
|
394 |
Apply a simple 2x2 matrix to all of an outline's points. Useful for applying rotations, slanting, flipping, etc.
|
|
|
395 |
|
|
|
|
396 |
|
|
|
404 |
|
|
|
412 |
|
|
|
415 |
|
|
|
|
416 |
|
|
|
417 |
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
|
|
|
423 |
|
|
|
424 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
425 |
|
|
|
|
426 |
|
|
|
433 |
|
|
|
434 |
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.
|
|
|
435 |
Negative ‘strength’ values to reduce the outline thickness are possible also.
|
|
|
436 |
|
|
|
|
437 |
|
|
|
445 |
input | |
|
|
446 |
|
|
|
447 |
|
|
448 |
strength | |
|
|
449 |
How strong the glyph is emboldened. Expressed in 26.6 pixel format.
|
|
|
450 |
|
|
|
|
451 |
| |
|
|
452 |
|
|
|
|
453 |
return | |
|
|
454 |
FreeType error code. 0 means success.
|
|
|
455 |
|
|
|
|
456 |
note | |
|
|
457 |
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.
|
|
|
458 |
If you need ‘better’ metrics values you should call FT_Outline_Get_CBox or FT_Outline_Get_BBox.
|
|
|
459 |
Example call:
|
|
|
460 |
|
|
|
461 |
FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); |
|
|
462 |
if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) |
|
|
463 |
FT_Outline_Embolden( &face->slot->outline, strength ); |
|
|
464 |
|
|
|
465 |
|
|
|
|
466 |
|
|
|
|
467 |
|
|
|
468 |
|
|
|
471 |
|
|
|
472 |
|
|
|
473 |
|
|
|
474 |
|
|
|
475 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
476 |
|
|
|
|
477 |
|
|
|
485 |
|
|
|
486 |
Embolden an outline. The new outline will be ‘xstrength’ pixels wider and ‘ystrength’ pixels higher. Otherwise, it is similar to FT_Outline_Embolden, which uses the same strength in both directions.
|
|
|
487 |
|
|
|
|
488 |
|
|
|
|
489 |
|
|
|
490 |
|
|
|
493 |
|
|
|
494 |
|
|
|
495 |
|
|
|
496 |
|
|
|
497 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
498 |
|
|
|
|
499 |
|
|
|
505 |
|
|
|
506 |
Reverse the drawing direction of an outline. This is used to ensure consistent fill conventions for mirrored glyphs.
|
|
|
507 |
|
|
|
|
508 |
|
|
|
516 |
note | |
|
|
517 |
This function toggles the bit flag FT_OUTLINE_REVERSE_FILL in the outline's ‘flags’ field.
|
|
|
518 |
It shouldn't be used by a normal client application, unless it knows what it is doing.
|
|
|
519 |
|
|
|
|
520 |
|
|
|
|
521 |
|
|
|
522 |
|
|
|
525 |
|
|
|
526 |
|
|
|
552 |
|
|
|
553 |
|
|
|
556 |
|
|
|
557 |
|
|
|
558 |
|
|
|
559 |
|
|
|
560 |
Defined in FT_BBOX_H (freetype/ftbbox.h). |
|
|
561 |
|
|
|
|
562 |
|
|
|
569 |
|
|
|
570 |
Compute the exact bounding box of an outline. This is slower than computing the control box. However, it uses an advanced algorithm which returns very quickly when the two boxes coincide. Otherwise, the outline Bézier arcs are traversed to extract their extrema.
|
|
|
571 |
|
|
|
|
572 |
|
|
|
580 |
|
|
|
588 |
return | |
|
|
589 |
FreeType error code. 0 means success.
|
|
|
590 |
|
|
|
|
591 |
note | |
|
|
592 |
If the font is tricky and the glyph has been loaded with FT_LOAD_NO_SCALE, 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.
|
|
|
593 |
|
|
|
|
594 |
|
|
|
|
595 |
|
|
|
596 |
|
|
|
599 |
|
|
|
600 |
|
|
|
650 |
|
|
|
651 |
|
|
|
654 |
|
|
|
655 |
|
|
|
656 |
|
|
|
657 |
|
|
|
658 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
659 |
|
|
|
|
660 |
|
|
|
669 |
|
|
|
670 |
A function pointer type used to describe the signature of a ‘move to’ function during outline walking/decomposition.
|
|
|
671 |
A ‘move to’ is emitted to start a new contour in an outline.
|
|
|
672 |
|
|
|
|
673 |
input | |
|
|
674 |
|
|
|
675 |
|
|
676 |
to | |
|
|
677 |
A pointer to the target point of the ‘move to’.
|
|
|
678 |
|
|
|
|
679 |
user | |
|
|
680 |
A typeless pointer which is passed from the caller of the decomposition function.
|
|
|
681 |
|
|
|
|
682 |
| |
|
|
683 |
|
|
|
|
684 |
return | |
|
|
685 |
Error code. 0 means success.
|
|
|
686 |
|
|
|
|
687 |
|
|
|
|
688 |
|
|
|
689 |
|
|
|
692 |
|
|
|
693 |
|
|
|
694 |
|
|
|
695 |
|
|
|
696 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
697 |
|
|
|
|
698 |
|
|
|
707 |
|
|
|
708 |
A function pointer type used to describe the signature of a ‘line to’ function during outline walking/decomposition.
|
|
|
709 |
A ‘line to’ is emitted to indicate a segment in the outline.
|
|
|
710 |
|
|
|
|
711 |
input | |
|
|
712 |
|
|
|
713 |
|
|
714 |
to | |
|
|
715 |
A pointer to the target point of the ‘line to’.
|
|
|
716 |
|
|
|
|
717 |
user | |
|
|
718 |
A typeless pointer which is passed from the caller of the decomposition function.
|
|
|
719 |
|
|
|
|
720 |
| |
|
|
721 |
|
|
|
|
722 |
return | |
|
|
723 |
Error code. 0 means success.
|
|
|
724 |
|
|
|
|
725 |
|
|
|
|
726 |
|
|
|
727 |
|
|
|
730 |
|
|
|
731 |
|
|
|
732 |
|
|
|
733 |
|
|
|
734 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
735 |
|
|
|
|
736 |
|
|
|
746 |
|
|
|
747 |
A function pointer type used to describe the signature of a ‘conic to’ function during outline walking or decomposition.
|
|
|
748 |
A ‘conic to’ is emitted to indicate a second-order Bézier arc in the outline.
|
|
|
749 |
|
|
|
|
750 |
input | |
|
|
751 |
|
|
|
752 |
|
|
753 |
control | |
|
|
754 |
An intermediate control point between the last position and the new target in ‘to’.
|
|
|
755 |
|
|
|
|
756 |
to | |
|
|
757 |
A pointer to the target end point of the conic arc.
|
|
|
758 |
|
|
|
|
759 |
user | |
|
|
760 |
A typeless pointer which is passed from the caller of the decomposition function.
|
|
|
761 |
|
|
|
|
762 |
| |
|
|
763 |
|
|
|
|
764 |
return | |
|
|
765 |
Error code. 0 means success.
|
|
|
766 |
|
|
|
|
767 |
|
|
|
|
768 |
|
|
|
769 |
|
|
|
772 |
|
|
|
773 |
|
|
|
774 |
|
|
|
775 |
|
|
|
776 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
777 |
|
|
|
|
778 |
|
|
|
789 |
|
|
|
790 |
A function pointer type used to describe the signature of a ‘cubic to’ function during outline walking or decomposition.
|
|
|
791 |
A ‘cubic to’ is emitted to indicate a third-order Bézier arc.
|
|
|
792 |
|
|
|
|
793 |
input | |
|
|
794 |
|
|
|
795 |
|
|
796 |
control1 | |
|
|
797 |
A pointer to the first Bézier control point.
|
|
|
798 |
|
|
|
|
799 |
control2 | |
|
|
800 |
A pointer to the second Bézier control point.
|
|
|
801 |
|
|
|
|
802 |
to | |
|
|
803 |
A pointer to the target end point.
|
|
|
804 |
|
|
|
|
805 |
user | |
|
|
806 |
A typeless pointer which is passed from the caller of the decomposition function.
|
|
|
807 |
|
|
|
|
808 |
| |
|
|
809 |
|
|
|
|
810 |
return | |
|
|
811 |
Error code. 0 means success.
|
|
|
812 |
|
|
|
|
813 |
|
|
|
|
814 |
|
|
|
815 |
|
|
|
818 |
|
|
|
819 |
|
|
|
820 |
|
|
|
821 |
|
|
|
822 |
Defined in FT_IMAGE_H (freetype/ftimage.h). |
|
|
823 |
|
|
|
|
824 |
|
|
|
839 |
|
|
|
840 |
A structure to hold various function pointers used during outline decomposition in order to emit segments, conic, and cubic Béziers.
|
|
|
841 |
|
|
|
|
842 |
fields | |
|
|
843 |
|
|
|
844 |
|
|
845 |
move_to | |
|
|
846 |
The ‘move to’ emitter.
|
|
|
847 |
|
|
|
|
848 |
line_to | |
|
|
849 |
The segment emitter.
|
|
|
850 |
|
|
|
|
851 |
conic_to | |
|
|
852 |
The second-order Bézier arc emitter.
|
|
|
853 |
|
|
|
|
854 |
cubic_to | |
|
|
855 |
The third-order Bézier arc emitter.
|
|
|
856 |
|
|
|
|
857 |
shift | |
|
|
858 |
The shift that is applied to coordinates before they are sent to the emitter.
|
|
|
859 |
|
|
|
|
860 |
delta | |
|
|
861 |
The delta that is applied to coordinates before they are sent to the emitter, but after the shift.
|
|
|
862 |
|
|
|
|
863 |
| |
|
|
864 |
|
|
|
|
865 |
note | |
|
|
866 |
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:
|
|
|
867 |
|
|
|
868 |
x' = (x << shift) - delta |
|
|
869 |
y' = (x << shift) - delta |
|
|
870 |
|
|
|
871 |
Set the values of ‘shift’ and ‘delta’ to 0 to get the original point coordinates.
|
|
|
872 |
|
|
|
|
873 |
|
|
|
|
874 |
|
|
|
875 |
|
|
|
878 |
|
|
|
879 |
|
|
|
880 |
|
|
|
881 |
|
|
|
882 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
883 |
|
|
|
|
884 |
|
|
|
892 |
|
|
|
893 |
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.
|
|
|
894 |
|
|
|
|
895 |
input | |
|
|
896 |
|
|
|
897 |
|
|
898 |
outline | |
|
|
899 |
A pointer to the source target.
|
|
|
900 |
|
|
|
|
901 |
func_interface | |
|
|
902 |
A table of ‘emitters’, i.e., function pointers called during decomposition to indicate path operations.
|
|
|
903 |
|
|
|
|
904 |
| |
|
|
905 |
|
|
|
|
906 |
inout | |
|
|
907 |
|
|
|
908 |
|
|
909 |
user | |
|
|
910 |
A typeless pointer which is passed to each emitter during the decomposition. It can be used to store the state during the decomposition.
|
|
|
911 |
|
|
|
|
912 |
| |
|
|
913 |
|
|
|
|
914 |
return | |
|
|
915 |
FreeType error code. 0 means success.
|
|
|
916 |
|
|
|
|
917 |
|
|
|
|
918 |
|
|
|
919 |
|
|
|
922 |
|
|
|
923 |
|
|
|
924 |
|
|
|
925 |
|
|
|
926 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
927 |
|
|
|
|
928 |
|
|
|
935 |
|
|
|
936 |
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 which contains Bézier outside arcs).
|
|
|
937 |
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.
|
|
|
938 |
|
|
|
|
939 |
|
|
|
947 |
|
|
|
955 |
|
|
|
958 |
|
|
|
|
959 |
|
|
|
960 |
|
|
|
963 |
|
|
|
964 |
|
|
|
965 |
|
|
|
966 |
|
|
|
967 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
968 |
|
|
|
|
969 |
|
|
|
977 |
|
|
|
978 |
Render an outline within a bitmap. The outline's image is simply OR-ed to the target bitmap.
|
|
|
979 |
|
|
|
|
980 |
|
|
|
991 |
|
|
|
999 |
return | |
|
|
1000 |
FreeType error code. 0 means success.
|
|
|
1001 |
|
|
|
|
1002 |
note | |
|
|
1003 |
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.
|
|
|
1004 |
It will use the raster corresponding to the default glyph format.
|
|
|
1005 |
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 FT_Outline_Render directly.
|
|
|
1006 |
|
|
|
|
1007 |
|
|
|
|
1008 |
|
|
|
1009 |
|
|
|
1012 |
|
|
|
1013 |
|
|
|
1014 |
|
|
|
1015 |
|
|
|
1016 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
1017 |
|
|
|
|
1018 |
|
|
|
1026 |
|
|
|
1027 |
Render an outline within a bitmap using the current scan-convert. This function uses an FT_Raster_Params structure as an argument, allowing advanced features like direct composition, translucency, etc.
|
|
|
1028 |
|
|
|
|
1029 |
|
|
|
1040 |
|
|
|
1048 |
return | |
|
|
1049 |
FreeType error code. 0 means success.
|
|
|
1050 |
|
|
|
|
1051 |
note | |
|
|
1052 |
You should know what you are doing and how FT_Raster_Params works to use this function.
|
|
|
1053 |
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.
|
|
|
1054 |
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 FT_RASTER_FLAG_DIRECT value of the ‘flags’ field in the FT_Raster_Params structure for more details.
|
|
|
1055 |
|
|
|
|
1056 |
|
|
|
|
1057 |
|
|
|
1058 |
|
|
|
1061 |
|
|
|
1062 |
|
|
|
1063 |
|
|
|
1064 |
|
|
|
1065 |
Defined in FT_OUTLINE_H (freetype/ftoutln.h). |
|
|
1066 |
|
|
|
|
1067 |
|
|
|
1080 |
|
|
|
1081 |
A list of values used to describe an outline's contour orientation.
|
|
|
1082 |
The TrueType and PostScript specifications use different conventions to determine whether outline contours should be filled or unfilled.
|
|
|
1083 |
|
|
|
|
1084 |
values | |
|
|
1085 |
|
|
|
1086 |
|
|
1087 |
FT_ORIENTATION_TRUETYPE |
|
|
|
1088 |
| |
|
|
1089 |
According to the TrueType specification, clockwise contours must be filled, and counter-clockwise ones must be unfilled.
|
|
|
1090 |
|
|
|
|
1091 |
FT_ORIENTATION_POSTSCRIPT |
|
|
|
1092 |
| |
|
|
1093 |
According to the PostScript specification, counter-clockwise contours must be filled, and clockwise ones must be unfilled.
|
|
|
1094 |
|
|
|
|
1095 |
FT_ORIENTATION_FILL_RIGHT |
|
|
|
1096 |
| |
|
|
1097 |
This is identical to FT_ORIENTATION_TRUETYPE, but is used to remember that in TrueType, everything that is to the right of the drawing direction of a contour must be filled.
|
|
|
1098 |
|
|
|
|
1099 |
FT_ORIENTATION_FILL_LEFT |
|
|
|
1100 |
| |
|
|
1101 |
This is identical to FT_ORIENTATION_POSTSCRIPT, but is used to remember that in PostScript, everything that is to the left of the drawing direction of a contour must be filled.
|
|
|
1102 |
|
|
|
|
1103 |
FT_ORIENTATION_NONE | |
|
|
1104 |
The orientation cannot be determined. That is, different parts of the glyph have different orientation.
|
|
|
1105 |
|
|
|
|
1106 |
| |
|
|
1107 |
|
|
|
|
1108 |
|
|
|
|
1109 |
|
|
|
1110 |
|
|
|
1113 |
|
|
|
1114 |
|
|
|
1141 |
|
|
|
1142 |
|
|
|
1145 |
|
|
|
1146 |
|
|
|
1147 |
|
!DOCTYPE>