typedef struct FT_Outline_
short n_contours; /* number of contours in glyph */
short n_points; /* number of points in the glyph */
FT_Vector* points; /* the outline's points */
char* tags; /* the points flags */
short* contours; /* the contour end points */
int flags; /* outline masks */
This structure is used to describe an outline to
the scan-line converter.
The number of contours in the outline.
The number of points in the outline.
A pointer to an array of `n_points' FT_Vector
elements, giving the outline's point coordinates.
A pointer to an array of `n_points' chars, giving
each outline point's type. If bit 0 is unset, the
point is `off' the curve, i.e. a Bezier control
point, while it is `on' when set.
Bit 1 is meaningful for `off' points only. If
set, it indicates a third-order Bezier arc
control point; and a second-order control point
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', the second one is
defined by the points `contours+1' to
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 simple type used to enumerates the flags in an
outline's `outline_flags' field.
If set, this flag indicates that the outline's
field arrays (i.e. `points', `flags' &
`contours') are `owned' by the outline object,
and should thus be freed when it is destroyed.
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 raster).
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. However, it is
very important for the auto-hinter.
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.
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.
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
Returns an outline's `control box'. 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 which contains Bezier outside
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
Computes 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 Bezier arcs are
walked over to extract their extrema.
Renders an outline within a bitmap using the
current scan-convert. This functions uses an
FT_Raster_Params structure as an argument,
allowing advanced features like direct
composition, translucency, etc.
A handle to a FreeType library object.
A pointer to the source outline descriptor.
A pointer to a FT_Raster_Params structure used to
describe the rendering operation.
FreeType error code. 0 means success.
You should know what you are doing and how
FT_Raster_Params works to use this function.
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
Walks over an outline's structure to decompose it
into individual segments and Bezier arcs. This
function is also able to emit `move to' and
`close to' operations to indicate the start and
end of new contours in the outline.
A pointer to the source target.
A table of `emitters', i.e,. function pointers
called during decomposition to indicate path
A typeless pointer which is passed to each
emitter during the decomposition. It can be used
to store the state during the decomposition.