Index

CDTEngineV8

GlyphGetOutline

CharGetOutline

This function retrieves the outline description of a single glyph represented by a Unicode character code (or font dependent glyph index). The glyph's outline curve points are retrieved in font units.

Parameters

ParameterDescription

font_index

Font index of the font or font instance in the Font Catalog.

char_code

Unicode character code of the glyph for which the outline curve will be retrieved.

glyph_index

Font dependent index of the glyph for which the outline curve will be retrieved.

max_points

Specifies the size of the 3-dimensional array into which the function copies the glyph's outline description.

i_arr, x_arr, y_arr

A 3-dimensional array into which the function copies the glyph's outline description.

reserved

Reserved for future use. Must be set to 0.

Return Value

If successful, the function returns the actual number of points needed for the outline description. Otherwise, the return value is -1.

If the 3-dimensional array is not large enough to accept all the outline points (i.e. max_points is less than the return value, the function copies only the first max_points elements into the 3-dimensional array (i.e. the array will be truncated). In this case, your application can increase the size of the 3-dimensional array and call this function again with the updated value for max_points.

Note: Recommended value for max_points is 500.

Comments

The i_arr array contains instructions that describe the corresponding pair of coordinates in the x_arr and y_arr arrays. Possible values for i_arr are:

The following table describes how the 3-dimensional array should be interpreted. Please note that Quadratic B-Spline curves require two consecutive rows in the 3-dimensional array while Bézier curves require three consecutive rows.

i_arr x_arr y_arr
New Contour

16

X1 in font units

Y1 in font units

Line

20

X1 in font units

Y1 in font units

Quadratic B-Spline Curve

25

X1 in font units

Y1 in font units

n

X2 in font units

Y2 in font units

Bézier Curve

24

X1 in font units

Y1 in font units

n

X2 in font units

Y2 in font units

0

X3 in font units

Y3 in font units

Note: n = recommended number of curve segments



 

Index