1#![allow(non_camel_case_types)]
2#![allow(non_snake_case)]
3#![allow(non_upper_case_globals)]
4#![deny(missing_copy_implementations)]
5#![no_std]
6
7use cty::{
8 c_char,
9 c_void,
10 c_int,
11 c_short,
12 c_ushort,
13 c_long,
14 c_uchar,
15 c_uint,
16 c_ulong,
17};
18
19type size_t = usize;
20type ptrdiff_t = isize;
21
22pub type FT_Byte = c_uchar;
24pub type FT_Bytes = *const FT_Byte;
25pub type FT_Char = c_char;
26pub type FT_Int = c_int;
27pub type FT_UInt = c_uint;
28pub type FT_Int16 = c_short;
29pub type FT_UInt16 = c_ushort;
30pub type FT_Int32 = i32;
31pub type FT_UInt32 = u32;
32pub type FT_Int64 = i64;
33pub type FT_UInt64 = u64;
34pub type FT_Short = c_short;
35pub type FT_UShort = c_ushort;
36pub type FT_Long = c_long;
37pub type FT_ULong = c_ulong;
38pub type FT_Bool = c_uchar;
39pub type FT_Offset = size_t;
40pub type FT_PtrDist = ptrdiff_t;
41pub type FT_String = c_char;
42pub type FT_Tag = FT_UInt32;
43pub type FT_Error = c_int;
44pub type FT_Fixed = c_long;
45pub type FT_Pointer = *mut c_void;
46pub type FT_Pos = c_long;
47pub type FT_FWord = c_short;
48pub type FT_UFWord = c_ushort;
49pub type FT_F2Dot14 = c_short;
50pub type FT_F26Dot6 = c_long;
51pub type FT_Generic_Finalizer = extern fn(*mut c_void);
52pub type FT_StreamDesc = *mut c_void;
53pub type FT_Stream_IoFunc = extern fn(FT_Stream, c_ulong, *mut c_uchar, c_ulong) -> c_ulong;
54pub type FT_Stream_CloseFunc = extern fn(FT_Stream);
55pub type FT_Alloc_Func = extern fn(FT_Memory, c_long) -> *mut c_void;
56pub type FT_Free_Func = extern fn(FT_Memory, *mut c_void);
57pub type FT_Realloc_Func = extern fn(FT_Memory, c_long, c_long, *mut c_void) -> *mut c_void;
58pub type FT_Outline_MoveToFunc = extern fn(to: *const FT_Vector, user: *mut c_void) -> c_int;
59pub type FT_Outline_LineToFunc = extern fn(to: *const FT_Vector, user: *mut c_void) -> c_int;
60pub type FT_Outline_ConicToFunc = extern fn(control: *const FT_Vector, to: *const FT_Vector, user: *mut c_void) -> c_int;
61pub type FT_Outline_CubicToFunc = extern fn(control1: *const FT_Vector, control2: *const FT_Vector, to: *const FT_Vector, user: *mut c_void) -> c_int;
62pub type FT_SpanFunc = extern fn(y: c_int, count: c_int, spans: *const FT_Span, user: *mut c_void);
63pub type FT_Raster_BitTest_Func = extern fn(y: c_int, x: c_int, user: *mut c_void) -> c_int;
64pub type FT_Raster_BitSet_Func = extern fn(y: c_int, x: c_int, user: *mut c_void);
65
66
67pub trait FTErrorMethods {
68 fn succeeded(&self) -> bool;
69}
70
71impl FTErrorMethods for FT_Error {
72 fn succeeded(&self) -> bool { *self == 0 }
73}
74
75
76#[repr(C)]
78#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)]
79pub struct FT_Vector {
80 pub x: FT_Pos,
81 pub y: FT_Pos,
82}
83
84#[repr(C)]
85#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)]
86pub struct FT_BBox {
87 pub xMin: FT_Pos,
88 pub yMin: FT_Pos,
89 pub xMax: FT_Pos,
90 pub yMax: FT_Pos,
91}
92
93#[repr(C)]
94#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
95pub struct FT_Matrix {
96 pub xx: FT_Fixed,
97 pub xy: FT_Fixed,
98 pub yx: FT_Fixed,
99 pub yy: FT_Fixed,
100}
101
102#[repr(C)]
103#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
104pub struct FT_UnitVector {
105 pub x: FT_F2Dot14,
106 pub y: FT_F2Dot14,
107}
108
109#[repr(C)]
110#[derive(Debug, Hash, PartialEq, Eq)]
111#[allow(missing_copy_implementations)]
112pub struct FT_Bitmap {
113 pub rows: c_int,
114 pub width: c_int,
115 pub pitch: c_int,
116 pub buffer: *mut c_uchar,
117 pub num_grays: c_short,
118 pub pixel_mode: c_char,
119 pub palette_mode: c_char,
120 pub palette: *mut c_void,
121}
122
123#[repr(C)]
124#[derive(Debug, Hash, PartialEq, Eq)]
125#[allow(missing_copy_implementations)]
126pub struct FT_Data {
127 pub pointer: *const FT_Byte,
128 pub length: FT_Int,
129}
130
131#[repr(C)]
132#[derive(Debug, Hash, PartialEq, Eq)]
133#[allow(missing_copy_implementations)]
134pub struct FT_Generic {
135 pub data: *mut c_void,
136 pub finalizer: FT_Generic_Finalizer,
137}
138
139#[repr(C)]
140#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
141pub struct FT_Size_Metrics {
142 pub x_ppem: FT_UShort,
143 pub y_ppem: FT_UShort,
144
145 pub x_scale: FT_Fixed,
146 pub y_scale: FT_Fixed,
147
148 pub ascender: FT_Pos,
149 pub descender: FT_Pos,
150 pub height: FT_Pos,
151 pub max_advance: FT_Pos
152}
153
154#[repr(C)]
155#[derive(Debug, Hash, PartialEq, Eq)]
156#[allow(missing_copy_implementations)]
157pub struct FT_Outline {
158 pub n_contours: c_short,
159 pub n_points: c_short,
160
161 pub points: *mut FT_Vector,
162 pub tags: *mut c_char,
163 pub contours: *mut c_short,
164
165 pub flags: c_int,
166}
167
168#[repr(C)]
169#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
170pub struct FT_Glyph_Metrics {
171 pub width: FT_Pos,
172 pub height: FT_Pos,
173
174 pub horiBearingX: FT_Pos,
175 pub horiBearingY: FT_Pos,
176 pub horiAdvance: FT_Pos,
177
178 pub vertBearingX: FT_Pos,
179 pub vertBearingY: FT_Pos,
180 pub vertAdvance: FT_Pos,
181}
182
183#[repr(C)]
184#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
185pub struct FT_Parameter {
186 pub tag: FT_ULong,
187 pub data: FT_Pointer,
188}
189
190#[repr(C)]
191#[derive(Debug, Hash, PartialEq, Eq)]
192#[allow(missing_copy_implementations)]
193pub struct FT_Open_Args {
194 pub flags: FT_UInt,
195 pub memory_base: *const FT_Byte,
196 pub memory_size: FT_Long,
197 pub pathname: *mut FT_String,
198 pub stream: FT_Stream,
199 pub driver: FT_Module,
200 pub num_params: FT_Int,
201 pub params: *mut FT_Parameter,
202}
203
204#[repr(C)]
205#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
206pub struct FT_Bitmap_Size {
207 pub height: FT_Short,
208 pub width: FT_Short,
209
210 pub size: FT_Pos,
211
212 pub x_ppem: FT_Pos,
213 pub y_ppem: FT_Pos
214}
215
216#[repr(C)]
217#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
218pub struct TT_OS2 {
219 pub version: FT_UShort,
220 pub xAvgCharWidth: FT_Short,
221 pub usWeightClass: FT_UShort,
222 pub usWidthClass: FT_UShort,
223 pub fsType: FT_Short,
224 pub ySubscriptXSize: FT_Short,
225 pub ySubscriptYSize: FT_Short,
226 pub ySubscriptXOffset: FT_Short,
227 pub ySubscriptYOffset: FT_Short,
228 pub ySuperscriptXSize: FT_Short,
229 pub ySuperscriptYSize: FT_Short,
230 pub ySuperscriptXOffset: FT_Short,
231 pub ySuperscriptYOffset: FT_Short,
232 pub yStrikeoutSize: FT_Short,
233 pub yStrikeoutPosition: FT_Short,
234 pub sFamilyClass: FT_Short,
235
236 pub panose: [FT_Byte; 10],
237
238 pub ulUnicodeRange1: FT_ULong, pub ulUnicodeRange2: FT_ULong, pub ulUnicodeRange3: FT_ULong, pub ulUnicodeRange4: FT_ULong, pub ulCodePageRange1: FT_ULong, pub ulCodePageRange2: FT_ULong, pub sxHeight: FT_Short,
251 pub sCapHeight: FT_Short,
252 pub usDefaultChar: FT_UShort,
253 pub usBreakChar: FT_UShort,
254 pub usMaxContext: FT_UShort,
255}
256
257#[repr(C)]
258#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
259pub struct FT_Span {
260 pub x: c_short,
261 pub len: c_ushort,
262 pub coverage: c_uchar,
263}
264
265
266pub type enum_FT_Sfnt_Tag_ = c_uint;
269pub const ft_sfnt_head: u32 = 0_u32;
270pub const ft_sfnt_maxp: u32 = 1_u32;
271pub const ft_sfnt_os2: u32 = 2_u32;
272pub const ft_sfnt_hhea: u32 = 3_u32;
273pub const ft_sfnt_vhea: u32 = 4_u32;
274pub const ft_sfnt_post: u32 = 5_u32;
275pub const ft_sfnt_pclt: u32 = 6_u32;
276pub const ft_sfnt_max: u32 = 7_u32;
277pub type FT_Sfnt_Tag = enum_FT_Sfnt_Tag_;
278
279pub type FT_Pixel_Mode = c_uint;
280pub const FT_PIXEL_MODE_NONE : FT_Pixel_Mode = 0;
281pub const FT_PIXEL_MODE_MONO : FT_Pixel_Mode = 1;
282pub const FT_PIXEL_MODE_GRAY : FT_Pixel_Mode = 2;
283pub const FT_PIXEL_MODE_GRAY2 : FT_Pixel_Mode = 3;
284pub const FT_PIXEL_MODE_GRAY4 : FT_Pixel_Mode = 4;
285pub const FT_PIXEL_MODE_LCD : FT_Pixel_Mode = 5;
286pub const FT_PIXEL_MODE_LCD_V : FT_Pixel_Mode = 6;
287pub const FT_PIXEL_MODE_BGRA : FT_Pixel_Mode = 7;
288pub const FT_PIXEL_MODE_MAX : FT_Pixel_Mode = 8;
289
290pub type FT_Glyph_Format = c_uint;
291pub const FT_GLYPH_FORMAT_NONE : FT_Glyph_Format = 0;
292pub const FT_GLYPH_FORMAT_COMPOSITE : FT_Glyph_Format = 1668246896;
293pub const FT_GLYPH_FORMAT_BITMAP : FT_Glyph_Format = 1651078259;
294pub const FT_GLYPH_FORMAT_OUTLINE : FT_Glyph_Format = 1869968492;
295pub const FT_GLYPH_FORMAT_PLOTTER : FT_Glyph_Format = 1886154612;
296
297pub type FT_Render_Mode = c_uint;
298pub const FT_RENDER_MODE_NORMAL : FT_Render_Mode = 0;
299pub const FT_RENDER_MODE_LIGHT : FT_Render_Mode = 1;
300pub const FT_RENDER_MODE_MONO : FT_Render_Mode = 2;
301pub const FT_RENDER_MODE_LCD : FT_Render_Mode = 3;
302pub const FT_RENDER_MODE_LCD_V : FT_Render_Mode = 4;
303pub const FT_RENDER_MODE_MAX : FT_Render_Mode = FT_RENDER_MODE_LCD_V + 1;
304
305pub type FT_LcdFilter = c_uint;
306pub const FT_LCD_FILTER_NONE : FT_LcdFilter = 0;
307pub const FT_LCD_FILTER_DEFAULT : FT_LcdFilter = 1;
308pub const FT_LCD_FILTER_LIGHT : FT_LcdFilter = 3;
309pub const FT_LCD_FILTER_LEGACY1 : FT_LcdFilter = 3;
310pub const FT_LCD_FILTER_LEGACY : FT_LcdFilter = 16;
311pub const FT_LCD_FILTER_MAX : FT_LcdFilter = 17;
312
313pub type FT_Encoding = c_uint;
314pub const FT_ENCODING_NONE : FT_Encoding = 0;
315pub const FT_ENCODING_MS_SYMBOL : FT_Encoding = 1937337698;
316pub const FT_ENCODING_UNICODE : FT_Encoding = 1970170211;
317pub const FT_ENCODING_SJIS : FT_Encoding = 1936353651;
318pub const FT_ENCODING_GB2312 : FT_Encoding = 1734484000;
319pub const FT_ENCODING_BIG5 : FT_Encoding = 1651074869;
320pub const FT_ENCODING_WANSUNG : FT_Encoding = 2002873971;
321pub const FT_ENCODING_JOHAB : FT_Encoding = 1785686113;
322pub const FT_ENCODING_MS_SJIS : FT_Encoding = 1936353651;
323pub const FT_ENCODING_MS_GB2312 : FT_Encoding = 1734484000;
324pub const FT_ENCODING_MS_BIG5 : FT_Encoding = 1651074869;
325pub const FT_ENCODING_MS_WANSUNG : FT_Encoding = 2002873971;
326pub const FT_ENCODING_MS_JOHAB : FT_Encoding = 1785686113;
327pub const FT_ENCODING_ADOBE_STANDARD : FT_Encoding = 1094995778;
328pub const FT_ENCODING_ADOBE_EXPERT : FT_Encoding = 1094992453;
329pub const FT_ENCODING_ADOBE_CUSTOM : FT_Encoding = 1094992451;
330pub const FT_ENCODING_ADOBE_LATIN_1 : FT_Encoding = 1818326065;
331pub const FT_ENCODING_OLD_LATIN_2 : FT_Encoding = 1818326066;
332pub const FT_ENCODING_APPLE_ROMAN : FT_Encoding = 1634889070;
333
334pub type FT_Size_Request_Type = c_uint;
335pub const FT_SIZE_REQUEST_TYPE_NOMINAL : FT_Size_Request_Type = 0;
336pub const FT_SIZE_REQUEST_TYPE_REAL_DIM : FT_Size_Request_Type = 1;
337pub const FT_SIZE_REQUEST_TYPE_BBOX : FT_Size_Request_Type = 2;
338pub const FT_SIZE_REQUEST_TYPE_CELL : FT_Size_Request_Type = 3;
339pub const FT_SIZE_REQUEST_TYPE_SCALES : FT_Size_Request_Type = 4;
340pub const FT_SIZE_REQUEST_TYPE_MAX : FT_Size_Request_Type = 5;
341
342pub type FT_Kerning_Mode = c_uint;
343pub const FT_KERNING_DEFAULT : FT_Kerning_Mode = 0;
344pub const FT_KERNING_UNFITTED : FT_Kerning_Mode = 1;
345pub const FT_KERNING_UNSCALED : FT_Kerning_Mode = 2;
346
347pub type FT_Glyph_BBox_Mode = c_uint;
348pub const FT_GLYPH_BBOX_UNSCALED : FT_Glyph_BBox_Mode = 0;
349pub const FT_GLYPH_BBOX_SUBPIXELS : FT_Glyph_BBox_Mode = 0;
350pub const FT_GLYPH_BBOX_GRIDFIT : FT_Glyph_BBox_Mode = 1;
351pub const FT_GLYPH_BBOX_TRUNCATE : FT_Glyph_BBox_Mode = 2;
352pub const FT_GLYPH_BBOX_PIXELS : FT_Glyph_BBox_Mode = 3;
353
354pub type FT_Stroker_LineJoin = c_uint;
355pub const FT_STROKER_LINEJOIN_ROUND : FT_Stroker_LineJoin = 0;
356pub const FT_STROKER_LINEJOIN_BEVEL : FT_Stroker_LineJoin = 1;
357pub const FT_STROKER_LINEJOIN_MITER_VARIABLE : FT_Stroker_LineJoin = 2;
358pub const FT_STROKER_LINEJOIN_MITER : FT_Stroker_LineJoin = 2;
359pub const FT_STROKER_LINEJOIN_MITER_FIXED : FT_Stroker_LineJoin = 3;
360
361pub type FT_Stroker_LineCap = c_uint;
362pub const FT_STROKER_LINECAP_BUTT : FT_Stroker_LineCap = 0;
363pub const FT_STROKER_LINECAP_ROUND : FT_Stroker_LineCap = 1;
364pub const FT_STROKER_LINECAP_SQUARE : FT_Stroker_LineCap = 2;
365
366pub type FT_StrokerBorder = c_uint;
367pub const FT_STROKER_BORDER_LEFT : FT_StrokerBorder = 0;
368pub const FT_STROKER_BORDER_RIGHT : FT_StrokerBorder = 1;
369
370pub type FT_Orientation = c_uint;
371pub const FT_ORIENTATION_TRUETYPE : FT_Orientation = 0;
372pub const FT_ORIENTATION_POSTSCRIPT : FT_Orientation = 1;
373pub const FT_ORIENTATION_NONE : FT_Orientation = 2;
374pub const FT_ORIENTATION_FILL_RIGHT : FT_Orientation = FT_ORIENTATION_TRUETYPE;
375pub const FT_ORIENTATION_FILL_LEFT : FT_Orientation = FT_ORIENTATION_POSTSCRIPT;
376
377
378pub const FT_FACE_FLAG_SCALABLE : FT_Long = 1 << 0;
380pub const FT_FACE_FLAG_FIXED_SIZES : FT_Long = 1 << 1;
381pub const FT_FACE_FLAG_FIXED_WIDTH : FT_Long = 1 << 2;
382pub const FT_FACE_FLAG_SFNT : FT_Long = 1 << 3;
383pub const FT_FACE_FLAG_HORIZONTAL : FT_Long = 1 << 4;
384pub const FT_FACE_FLAG_VERTICAL : FT_Long = 1 << 5;
385pub const FT_FACE_FLAG_KERNING : FT_Long = 1 << 6;
386pub const FT_FACE_FLAG_FAST_GLYPHS : FT_Long = 1 << 7;
387pub const FT_FACE_FLAG_MULTIPLE_MASTERS : FT_Long = 1 << 8;
388pub const FT_FACE_FLAG_GLYPH_NAMES : FT_Long = 1 << 9;
389pub const FT_FACE_FLAG_EXTERNAL_STREAM : FT_Long = 1 << 10;
390pub const FT_FACE_FLAG_HINTER : FT_Long = 1 << 11;
391pub const FT_FACE_FLAG_CID_KEYED : FT_Long = 1 << 12;
392pub const FT_FACE_FLAG_TRICKY : FT_Long = 1 << 13;
393pub const FT_FACE_FLAG_COLOR : FT_Long = 1 << 14;
394
395pub const FT_STYLE_FLAG_ITALIC : FT_Long = 1 << 0;
396pub const FT_STYLE_FLAG_BOLD : FT_Long = 1 << 1;
397
398pub const FT_OPEN_MEMORY : FT_UInt = 0x1;
399pub const FT_OPEN_STREAM : FT_UInt = 0x2;
400pub const FT_OPEN_PATHNAME : FT_UInt = 0x4;
401pub const FT_OPEN_DRIVER : FT_UInt = 0x8;
402pub const FT_OPEN_PARAMS : FT_UInt = 0x10;
403
404pub const FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS : FT_UInt = 1;
405pub const FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES : FT_UInt = 2;
406pub const FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID : FT_UInt = 4;
407pub const FT_SUBGLYPH_FLAG_SCALE : FT_UInt = 8;
408pub const FT_SUBGLYPH_FLAG_XY_SCALE : FT_UInt = 0x40;
409pub const FT_SUBGLYPH_FLAG_2X2 : FT_UInt = 0x80;
410pub const FT_SUBGLYPH_FLAG_USE_MY_METRICS : FT_UInt = 0x200;
411
412pub const FT_LOAD_DEFAULT : FT_Int32 = 0x0;
413pub const FT_LOAD_NO_SCALE : FT_Int32 = 0x1 << 0;
414pub const FT_LOAD_NO_HINTING : FT_Int32 = 0x1 << 1;
415pub const FT_LOAD_RENDER : FT_Int32 = 0x1 << 2;
416pub const FT_LOAD_NO_BITMAP : FT_Int32 = 0x1 << 3;
417pub const FT_LOAD_VERTICAL_LAYOUT : FT_Int32 = 0x1 << 4;
418pub const FT_LOAD_FORCE_AUTOHINT : FT_Int32 = 0x1 << 5;
419pub const FT_LOAD_CROP_BITMAP : FT_Int32 = 0x1 << 6;
420pub const FT_LOAD_PEDANTIC : FT_Int32 = 0x1 << 7;
421pub const FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH : FT_Int32 = 0x1 << 9;
422pub const FT_LOAD_NO_RECURSE : FT_Int32 = 0x1 << 10;
423pub const FT_LOAD_IGNORE_TRANSFORM : FT_Int32 = 0x1 << 11;
424pub const FT_LOAD_MONOCHROME : FT_Int32 = 0x1 << 12;
425pub const FT_LOAD_LINEAR_DESIGN : FT_Int32 = 0x1 << 13;
426pub const FT_LOAD_NO_AUTOHINT : FT_Int32 = 0x1 << 15;
427pub const FT_LOAD_COLOR : FT_Int32 = 0x1 << 20;
429
430pub const FT_LOAD_TARGET_NORMAL : FT_Int32 = (FT_RENDER_MODE_NORMAL << 16) as FT_Int32;
431pub const FT_LOAD_TARGET_LIGHT : FT_Int32 = (FT_RENDER_MODE_LIGHT << 16) as FT_Int32;
432pub const FT_LOAD_TARGET_MONO : FT_Int32 = (FT_RENDER_MODE_MONO << 16) as FT_Int32;
433pub const FT_LOAD_TARGET_LCD : FT_Int32 = (FT_RENDER_MODE_LCD << 16) as FT_Int32;
434pub const FT_LOAD_TARGET_LCD_V : FT_Int32 = (FT_RENDER_MODE_LCD_V << 16) as FT_Int32;
435
436pub const FT_FSTYPE_INSTALLABLE_EMBEDDING : FT_UShort = 0x0000;
437pub const FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING : FT_UShort = 0x0002;
438pub const FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING : FT_UShort = 0x0004;
439pub const FT_FSTYPE_EDITABLE_EMBEDDING : FT_UShort = 0x0008;
440pub const FT_FSTYPE_NO_SUBSETTING : FT_UShort = 0x0100;
441pub const FT_FSTYPE_BITMAP_EMBEDDING_ONLY : FT_UShort = 0x0200;
442
443pub const FT_OUTLINE_NONE : c_int = 0x0;
444pub const FT_OUTLINE_OWNER : c_int = 0x1;
445pub const FT_OUTLINE_EVEN_ODD_FILL : c_int = 0x2;
446pub const FT_OUTLINE_REVERSE_FILL : c_int = 0x4;
447pub const FT_OUTLINE_IGNORE_DROPOUTS : c_int = 0x8;
448pub const FT_OUTLINE_SMART_DROPOUTS : c_int = 0x10;
449pub const FT_OUTLINE_INCLUDE_STUBS : c_int = 0x20;
450pub const FT_OUTLINE_HIGH_PRECISION : c_int = 0x100;
451pub const FT_OUTLINE_SINGLE_PASS : c_int = 0x200;
452
453pub const FT_Err_Ok : FT_Error = 0;
454pub const FT_Err_Cannot_Open_Resource : FT_Error = 1;
455pub const FT_Err_Unknown_File_Format : FT_Error = 2;
456pub const FT_Err_Invalid_File_Format : FT_Error = 3;
457pub const FT_Err_Invalid_Version : FT_Error = 4;
458pub const FT_Err_Lower_Module_Version : FT_Error = 5;
459pub const FT_Err_Invalid_Argument : FT_Error = 6;
460pub const FT_Err_Unimplemented_Feature : FT_Error = 7;
461pub const FT_Err_Invalid_Table : FT_Error = 8;
462pub const FT_Err_Invalid_Offset : FT_Error = 9;
463pub const FT_Err_Array_Too_Large : FT_Error = 10;
464pub const FT_Err_Missing_Module : FT_Error = 11;
465pub const FT_Err_Missing_Property : FT_Error = 12;
466pub const FT_Err_Invalid_Glyph_Index : FT_Error = 16;
467pub const FT_Err_Invalid_Character_Code : FT_Error = 17;
468pub const FT_Err_Invalid_Glyph_Format : FT_Error = 18;
469pub const FT_Err_Cannot_Render_Glyph : FT_Error = 19;
470pub const FT_Err_Invalid_Outline : FT_Error = 20;
471pub const FT_Err_Invalid_Composite : FT_Error = 21;
472pub const FT_Err_Too_Many_Hints : FT_Error = 22;
473pub const FT_Err_Invalid_Pixel_Size : FT_Error = 23;
474pub const FT_Err_Invalid_Handle : FT_Error = 32;
475pub const FT_Err_Invalid_Library_Handle : FT_Error = 33;
476pub const FT_Err_Invalid_Driver_Handle : FT_Error = 34;
477pub const FT_Err_Invalid_Face_Handle : FT_Error = 35;
478pub const FT_Err_Invalid_Size_Handle : FT_Error = 36;
479pub const FT_Err_Invalid_Slot_Handle : FT_Error = 37;
480pub const FT_Err_Invalid_CharMap_Handle : FT_Error = 38;
481pub const FT_Err_Invalid_Cache_Handle : FT_Error = 39;
482pub const FT_Err_Invalid_Stream_Handle : FT_Error = 40;
483pub const FT_Err_Too_Many_Drivers : FT_Error = 48;
484pub const FT_Err_Too_Many_Extensions : FT_Error = 49;
485pub const FT_Err_Out_Of_Memory : FT_Error = 64;
486pub const FT_Err_Unlisted_Object : FT_Error = 65;
487pub const FT_Err_Cannot_Open_Stream : FT_Error = 81;
488pub const FT_Err_Invalid_Stream_Seek : FT_Error = 82;
489pub const FT_Err_Invalid_Stream_Skip : FT_Error = 83;
490pub const FT_Err_Invalid_Stream_Read : FT_Error = 84;
491pub const FT_Err_Invalid_Stream_Operation : FT_Error = 85;
492pub const FT_Err_Invalid_Frame_Operation : FT_Error = 86;
493pub const FT_Err_Nested_Frame_Access : FT_Error = 87;
494pub const FT_Err_Invalid_Frame_Read : FT_Error = 88;
495pub const FT_Err_Raster_Uninitialized : FT_Error = 96;
496pub const FT_Err_Raster_Corrupted : FT_Error = 97;
497pub const FT_Err_Raster_Overflow : FT_Error = 98;
498pub const FT_Err_Raster_Negative_Height : FT_Error = 99;
499pub const FT_Err_Too_Many_Caches : FT_Error = 112;
500pub const FT_Err_Invalid_Opcode : FT_Error = 128;
501pub const FT_Err_Too_Few_Arguments : FT_Error = 129;
502pub const FT_Err_Stack_Overflow : FT_Error = 130;
503pub const FT_Err_Code_Overflow : FT_Error = 131;
504pub const FT_Err_Bad_Argument : FT_Error = 132;
505pub const FT_Err_Divide_By_Zero : FT_Error = 133;
506pub const FT_Err_Invalid_Reference : FT_Error = 134;
507pub const FT_Err_Debug_OpCode : FT_Error = 135;
508pub const FT_Err_ENDF_In_Exec_Stream : FT_Error = 136;
509pub const FT_Err_Nested_DEFS : FT_Error = 137;
510pub const FT_Err_Invalid_CodeRange : FT_Error = 138;
511pub const FT_Err_Execution_Too_Long : FT_Error = 139;
512pub const FT_Err_Too_Many_Function_Defs : FT_Error = 140;
513pub const FT_Err_Too_Many_Instruction_Defs : FT_Error = 141;
514pub const FT_Err_Table_Missing : FT_Error = 142;
515pub const FT_Err_Horiz_Header_Missing : FT_Error = 143;
516pub const FT_Err_Locations_Missing : FT_Error = 144;
517pub const FT_Err_Name_Table_Missing : FT_Error = 145;
518pub const FT_Err_CMap_Table_Missing : FT_Error = 146;
519pub const FT_Err_Hmtx_Table_Missing : FT_Error = 147;
520pub const FT_Err_Post_Table_Missing : FT_Error = 148;
521pub const FT_Err_Invalid_Horiz_Metrics : FT_Error = 149;
522pub const FT_Err_Invalid_CharMap_Format : FT_Error = 150;
523pub const FT_Err_Invalid_PPem : FT_Error = 151;
524pub const FT_Err_Invalid_Vert_Metrics : FT_Error = 152;
525pub const FT_Err_Could_Not_Find_Context : FT_Error = 153;
526pub const FT_Err_Invalid_Post_Table_Format : FT_Error = 154;
527pub const FT_Err_Invalid_Post_Table : FT_Error = 155;
528pub const FT_Err_Syntax_Error : FT_Error = 160;
529pub const FT_Err_Stack_Underflow : FT_Error = 161;
530pub const FT_Err_Ignore : FT_Error = 162;
531pub const FT_Err_No_Unicode_Glyph_Name : FT_Error = 163;
532pub const FT_Err_Missing_Startfont_Field : FT_Error = 176;
533pub const FT_Err_Missing_Font_Field : FT_Error = 177;
534pub const FT_Err_Missing_Size_Field : FT_Error = 178;
535pub const FT_Err_Missing_Fontboundingbox_Field : FT_Error = 179;
536pub const FT_Err_Missing_Chars_Field : FT_Error = 180;
537pub const FT_Err_Missing_Startchar_Field : FT_Error = 181;
538pub const FT_Err_Missing_Encoding_Field : FT_Error = 182;
539pub const FT_Err_Missing_Bbx_Field : FT_Error = 183;
540pub const FT_Err_Bbx_Too_Big : FT_Error = 184;
541pub const FT_Err_Corrupted_Font_Header : FT_Error = 185;
542pub const FT_Err_Corrupted_Font_Glyphs : FT_Error = 186;
543pub const FT_Err_Max : FT_Error = 187;
544
545pub type FT_Library = *mut FT_LibraryRec;
547pub type FT_Face = *mut FT_FaceRec;
548pub type FT_Size = *mut FT_SizeRec;
549pub type FT_GlyphSlot = *mut FT_GlyphSlotRec;
550pub type FT_CharMap = *mut FT_CharMapRec;
551pub type FT_Module = *mut FT_ModuleRec;
552pub type FT_Driver = *mut FT_DriverRec;
553pub type FT_Renderer = *mut FT_RendererRec;
554pub type FT_Size_Internal = *mut FT_Size_InternalRec;
555pub type FT_SubGlyph = *mut FT_SubGlyphRec;
556pub type FT_Slot_Internal = *mut FT_Slot_InternalRec;
557pub type FT_Size_Request = *mut FT_Size_RequestRec;
558pub type FT_Face_Internal = *mut FT_Face_InternalRec;
559pub type FT_Stream = *mut FT_StreamRec;
560pub type FT_Memory = *mut FT_MemoryRec;
561pub type FT_ListNode = *mut FT_ListNodeRec;
562pub type FT_Glyph = *mut FT_GlyphRec;
563pub type FT_BitmapGlyph = *mut FT_BitmapGlyphRec;
564pub type FT_OutlineGlyph = *mut FT_OutlineGlyphRec;
565pub type FT_Stroker = *mut FT_StrokerRec;
566pub type TT_OS2_Internal = *mut TT_OS2;
567
568pub type FT_LibraryRec = c_void;
570pub type FT_ModuleRec = c_void;
571pub type FT_DriverRec = c_void;
572pub type FT_RendererRec = c_void;
573pub type FT_Size_InternalRec = c_void;
574pub type FT_SubGlyphRec = c_void;
575pub type FT_Slot_InternalRec = c_void;
576pub type FT_Face_InternalRec = c_void;
577pub type FT_StrokerRec = c_void;
578
579#[repr(C)]
580#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
581pub struct FT_CharMapRec {
582 pub face: FT_Face,
583 pub encoding: FT_Encoding,
584 pub platform_id: FT_UShort,
585 pub encoding_id: FT_UShort,
586}
587
588#[repr(C)]
589#[derive(Debug, Hash, PartialEq, Eq)]
590#[allow(missing_copy_implementations)]
591pub struct FT_FaceRec {
592 pub num_faces: FT_Long,
593 pub face_index: FT_Long,
594
595 pub face_flags: FT_Long,
596 pub style_flags: FT_Long,
597
598 pub num_glyphs: FT_Long,
599
600 pub family_name: *mut FT_String,
601 pub style_name: *mut FT_String,
602
603 pub num_fixed_sizes: FT_Int,
604 pub available_sizes: *mut FT_Bitmap_Size,
605
606 pub num_charmaps: FT_Int,
607 pub charmaps: *mut FT_CharMap,
608
609 pub generic: FT_Generic,
610
611 pub bbox: FT_BBox,
612
613 pub units_per_EM: FT_UShort,
614 pub ascender: FT_Short,
615 pub descender: FT_Short,
616 pub height: FT_Short,
617
618 pub max_advance_width: FT_Short,
619 pub max_advance_height: FT_Short,
620
621 pub underline_position: FT_Short,
622 pub underline_thickness: FT_Short,
623
624 pub glyph: FT_GlyphSlot,
625 pub size: FT_Size,
626 pub charmap: FT_CharMap,
627
628 pub driver: FT_Driver,
630 pub memory: FT_Memory,
631 pub stream: FT_Stream,
632
633 pub sizes_list: FT_ListRec,
634
635 pub autohint: FT_Generic,
636 pub extensions: *mut c_void,
637
638 pub internal: FT_Face_Internal,
639 }
641
642#[repr(C)]
643#[derive(Debug, Hash, PartialEq, Eq)]
644#[allow(missing_copy_implementations)]
645pub struct FT_GlyphSlotRec {
646 pub library: FT_Library,
647 pub face: FT_Face,
648 pub next: FT_GlyphSlot,
649 pub reserved: FT_UInt,
650 pub generic: FT_Generic,
651
652 pub metrics: FT_Glyph_Metrics,
653 pub linearHoriAdvance: FT_Fixed,
654 pub linearVertAdvance: FT_Fixed,
655 pub advance: FT_Vector,
656
657 pub format: FT_Glyph_Format,
658
659 pub bitmap: FT_Bitmap,
660 pub bitmap_left: FT_Int,
661 pub bitmap_top: FT_Int,
662
663 pub outline: FT_Outline,
664
665 pub num_subglyphs: FT_UInt,
666 pub subglyphs: FT_SubGlyph,
667
668 pub control_data: *mut c_void,
669 pub control_len: c_long,
670
671 pub lsb_delta: FT_Pos,
672 pub rsb_delta: FT_Pos,
673
674 pub other: *mut c_void,
675
676 pub internal: FT_Slot_Internal,
677}
678
679#[repr(C)]
680#[derive(Debug, Hash, PartialEq, Eq)]
681pub struct FT_SizeRec {
682 pub face: FT_Face,
683 pub generic: FT_Generic,
684 pub metrics: FT_Size_Metrics,
685 pub internal: FT_Size_Internal,
686}
687
688#[repr(C)]
689#[derive(Debug, Hash, PartialEq, Eq)]
690#[allow(missing_copy_implementations)]
691pub struct FT_StreamRec {
692 pub base: *mut c_uchar,
693 pub size: c_ulong,
694 pub pos: c_ulong,
695
696 pub descriptor: FT_StreamDesc,
697 pub pathname: FT_StreamDesc,
698 pub read: FT_Stream_IoFunc,
699 pub close: FT_Stream_CloseFunc,
700
701 pub memory: FT_Memory,
702 pub cursor: *mut c_uchar,
703 pub limit: *mut c_uchar,
704}
705
706#[repr(C)]
707#[derive(Debug, Hash, PartialEq, Eq)]
708#[allow(missing_copy_implementations)]
709pub struct FT_MemoryRec {
710 pub user: *mut c_void,
711 pub alloc: FT_Alloc_Func,
712 pub free: FT_Free_Func,
713 pub realloc: FT_Realloc_Func,
714}
715
716unsafe impl Sync for FT_MemoryRec {}
717
718#[repr(C)]
719#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
720pub struct FT_ListRec {
721 pub head: FT_ListNode,
722 pub tail: FT_ListNode,
723}
724
725#[repr(C)]
726#[derive(Debug, Hash, PartialEq, Eq)]
727#[allow(missing_copy_implementations)]
728pub struct FT_ListNodeRec {
729 pub prev: FT_ListNode,
730 pub next: FT_ListNode,
731 pub data: *mut c_void,
732}
733
734#[repr(C)]
735#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
736pub struct FT_Size_RequestRec {
737 pub size_request_type: FT_Size_Request_Type, pub width: FT_Long,
739 pub height: FT_Long,
740 pub horiResolution: FT_UInt,
741 pub vertResolution: FT_UInt,
742}
743
744#[repr(C)]
745#[derive(Debug, Hash, PartialEq, Eq)]
746#[allow(missing_copy_implementations)]
747pub struct FT_GlyphRec {
748 pub library: FT_Library,
749 pub clazz: *const c_void, pub format: FT_Glyph_Format,
751 pub advance: FT_Vector,
752}
753
754#[repr(C)]
755#[derive(Debug, Hash, PartialEq, Eq)]
756#[allow(missing_copy_implementations)]
757pub struct FT_BitmapGlyphRec {
758 pub root: FT_GlyphRec,
759 pub left: FT_Int,
760 pub top: FT_Int,
761 pub bitmap: FT_Bitmap,
762}
763
764#[repr(C)]
765#[derive(Debug, Hash, PartialEq, Eq)]
766#[allow(missing_copy_implementations)]
767pub struct FT_OutlineGlyphRec {
768 pub root: FT_GlyphRec,
769 pub outline: FT_Outline,
770}
771
772#[repr(C)]
773#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
774pub struct FT_Outline_Funcs {
775 pub move_to: FT_Outline_MoveToFunc,
776 pub line_to: FT_Outline_LineToFunc,
777 pub conic_to: FT_Outline_ConicToFunc,
778 pub cubic_to: FT_Outline_CubicToFunc,
779 pub shift: c_int,
780 pub delta: FT_Pos,
781}
782
783#[repr(C)]
784#[derive(Debug, Hash, PartialEq, Eq)]
785#[allow(missing_copy_implementations)]
786pub struct FT_Raster_Params {
787 pub target: *const FT_Bitmap,
788 pub source: *const c_void,
789 pub flags: c_int,
790 pub gray_spans: FT_SpanFunc,
791 pub black_spans: FT_SpanFunc,
792 pub bit_test: FT_Raster_BitTest_Func,
793 pub bit_set: FT_Raster_BitSet_Func,
794 pub user: *mut c_void,
795 pub clip_box: FT_BBox,
796}
797
798
799
800#[inline(always)]
802pub fn FT_HAS_HORIZONTAL(face: FT_Face) -> bool {
803 unsafe {
804 (*face).face_flags & FT_FACE_FLAG_HORIZONTAL != 0
805 }
806}
807
808#[inline(always)]
809pub fn FT_HAS_VERTICAL(face: FT_Face) -> bool {
810 unsafe {
811 (*face).face_flags & FT_FACE_FLAG_VERTICAL != 0
812 }
813}
814
815#[inline(always)]
816pub fn FT_HAS_KERNING(face: FT_Face) -> bool {
817 unsafe {
818 (*face).face_flags & FT_FACE_FLAG_KERNING != 0
819 }
820}
821
822#[inline(always)]
823pub fn FT_IS_SCALABLE(face: FT_Face) -> bool {
824 unsafe {
825 (*face).face_flags & FT_FACE_FLAG_SCALABLE != 0
826 }
827}
828
829#[inline(always)]
830pub fn FT_IS_SFNT(face: FT_Face) -> bool {
831 unsafe {
832 (*face).face_flags & FT_FACE_FLAG_SFNT != 0
833 }
834}
835
836#[inline(always)]
837pub fn FT_IS_FIXED_WIDTH(face: FT_Face) -> bool {
838 unsafe {
839 (*face).face_flags & FT_FACE_FLAG_FIXED_WIDTH != 0
840 }
841}
842
843#[inline(always)]
844pub fn FT_HAS_FIXED_SIZES(face: FT_Face) -> bool {
845 unsafe {
846 (*face).face_flags & FT_FACE_FLAG_FIXED_SIZES != 0
847 }
848}
849
850#[inline(always)]
851pub fn FT_HAS_GLYPH_NAMES(face: FT_Face) -> bool {
852 unsafe {
853 (*face).face_flags & FT_FACE_FLAG_GLYPH_NAMES != 0
854 }
855}
856
857#[inline(always)]
858pub fn FT_HAS_MULTIPLE_MASTERS(face: FT_Face) -> bool {
859 unsafe {
860 (*face).face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS != 0
861 }
862}
863
864#[inline(always)]
865pub fn FT_IS_CID_KEYED(face: FT_Face) -> bool {
866 unsafe {
867 (*face).face_flags & FT_FACE_FLAG_CID_KEYED != 0
868 }
869}
870
871#[inline(always)]
872pub fn FT_IS_TRICKY(face: FT_Face) -> bool {
873 unsafe {
874 (*face).face_flags & FT_FACE_FLAG_TRICKY != 0
875 }
876}
877
878#[inline(always)]
879pub fn FT_HAS_COLOR(face: FT_Face) -> bool {
880 unsafe {
881 (*face).face_flags & FT_FACE_FLAG_COLOR != 0
882 }
883}
884
885extern {
886 pub fn FT_Get_Sfnt_Table(face: FT_Face, tag: FT_Sfnt_Tag) -> *mut c_void;
887}
888
889extern "C" {
890 pub fn FT_Init_FreeType(alibrary: *mut FT_Library) -> FT_Error;
891 pub fn FT_Done_FreeType(library: FT_Library) -> FT_Error;
892 pub fn FT_New_Library(memory: FT_Memory, alibrary: *mut FT_Library) -> FT_Error;
893 pub fn FT_Done_Library(library: FT_Library) -> FT_Error;
894 pub fn FT_Reference_Library(library: FT_Library) -> FT_Error;
895 pub fn FT_Add_Default_Modules(library: FT_Library);
896 pub fn FT_New_Face(library: FT_Library, filepathname: *const c_char, face_index: FT_Long, aface: *mut FT_Face) -> FT_Error;
897 pub fn FT_New_Memory_Face(library: FT_Library, file_base: *const FT_Byte, file_size: FT_Long, face_index: FT_Long, aface: *mut FT_Face) -> FT_Error;
898 pub fn FT_Open_Face(library: FT_Library, args: *const FT_Open_Args, face_index: FT_Long, aface: *mut FT_Face) -> FT_Error;
899 pub fn FT_Attach_File(face: FT_Face, filepathname: *const c_char) -> FT_Error;
900 pub fn FT_Attach_Stream(face: FT_Face, parameters: *mut FT_Open_Args) -> FT_Error;
901 pub fn FT_Reference_Face(face: FT_Face) -> FT_Error;
902 pub fn FT_Done_Face(face: FT_Face) -> FT_Error;
903 pub fn FT_Select_Size(face: FT_Face, strike_index: FT_Int) -> FT_Error;
904 pub fn FT_Request_Size(face: FT_Face, req: FT_Size_Request) -> FT_Error;
905 pub fn FT_Set_Char_Size(face: FT_Face, char_width: FT_F26Dot6, char_height: FT_F26Dot6, horz_resolution: FT_UInt, vert_resolution: FT_UInt) -> FT_Error;
906 pub fn FT_Set_Pixel_Sizes(face: FT_Face, pixel_width: FT_UInt, pixel_height: FT_UInt) -> FT_Error;
907 pub fn FT_Library_SetLcdFilter(library: FT_Library, filter: FT_LcdFilter) -> FT_Error;
908 pub fn FT_Load_Glyph(face: FT_Face, glyph_index: FT_UInt, load_flags: FT_Int32) -> FT_Error;
909 pub fn FT_Load_Char(face: FT_Face, char_code: FT_ULong, load_flags: FT_Int32) -> FT_Error;
910 pub fn FT_Set_Transform(face: FT_Face, matrix: *mut FT_Matrix, delta: *mut FT_Vector);
911 pub fn FT_Render_Glyph(slot: FT_GlyphSlot, render_mode: FT_Render_Mode) -> FT_Error;
912 pub fn FT_Get_Kerning(face: FT_Face, left_glyph: FT_UInt, right_glyph: FT_UInt, kern_mode: FT_UInt, akerning: *mut FT_Vector) -> FT_Error;
913 pub fn FT_Get_Track_Kerning(face: FT_Face, point_size: FT_Fixed, degree: FT_Int, akerning: *mut FT_Fixed) -> FT_Error;
914 pub fn FT_Get_Glyph_Name(face: FT_Face, glyph_index: FT_UInt, buffer: FT_Pointer, buffer_max: FT_UInt) -> FT_Error;
915 pub fn FT_Get_Postscript_Name(face: FT_Face) -> *const c_char;
916 pub fn FT_Select_CharMap(face: FT_Face, encoding: FT_Encoding) -> FT_Error;
917 pub fn FT_Set_Charmap(face: FT_Face, charmap: FT_CharMap) -> FT_Error;
918 pub fn FT_Get_Charmap_Index(charmap: FT_CharMap) -> FT_Int;
919 pub fn FT_Get_Char_Index(face: FT_Face, charcode: FT_ULong) -> FT_UInt;
920 pub fn FT_Get_First_Char(face: FT_Face, agindex: *mut FT_UInt) -> FT_ULong;
921 pub fn FT_Get_Next_Char(face: FT_Face, char_code: FT_ULong, agindex: *mut FT_UInt) -> FT_ULong;
922 pub fn FT_Get_Name_Index(face: FT_Face, glyph_name: *mut FT_String) -> FT_UInt;
923 pub fn FT_Get_SubGlyph_Info(glyph: FT_GlyphSlot, sub_index: FT_UInt, p_index: *mut FT_Int, p_flags: *mut FT_UInt, p_arg1: *mut FT_Int, p_arg2: *mut FT_Int, p_transform: *mut FT_Matrix) -> FT_Error;
924 pub fn FT_Get_FSType_Flags(face: FT_Face) -> FT_UShort;
925 pub fn FT_Get_Glyph(slot: FT_GlyphSlot, aglyph: *mut FT_Glyph) -> FT_Error;
926 pub fn FT_Glyph_Copy(source: FT_Glyph, target: *mut FT_Glyph) -> FT_Error;
927 pub fn FT_Glyph_Transform(glyph: FT_Glyph, matrix: *mut FT_Matrix, delta: *mut FT_Vector) -> FT_Error;
928 pub fn FT_Glyph_Get_CBox(glyph: FT_Glyph, bbox_mode: FT_UInt, acbox: *mut FT_BBox);
929 pub fn FT_Glyph_To_Bitmap(the_glyph: *mut FT_Glyph, render_mode: FT_Render_Mode, origin: *mut FT_Vector, destroy: FT_Bool) -> FT_Error;
930 pub fn FT_Done_Glyph(glyph: FT_Glyph);
931 pub fn FT_Outline_GetInsideBorder(outline: *mut FT_Outline) -> FT_StrokerBorder;
932 pub fn FT_Outline_GetOutsideBorder(outline: *mut FT_Outline) -> FT_StrokerBorder;
933 pub fn FT_Glyph_Stroke(pglyph: *mut FT_Glyph, stroker: FT_Stroker, destroy: FT_Bool) -> FT_Error;
934 pub fn FT_Glyph_StrokeBorder(pglyph: *mut FT_Glyph, stroker: FT_Stroker, inside: FT_Bool, outline: FT_Bool) -> FT_Error;
935 pub fn FT_Stroker_New(library: FT_Library, stroker: *mut FT_Stroker) -> FT_Error;
936 pub fn FT_Stroker_Set(stroker: FT_Stroker, radius: FT_Fixed, line_cap: FT_Stroker_LineCap, line_join: FT_Stroker_LineJoin, miter_limit: FT_Fixed);
937 pub fn FT_Stroker_Rewind(stroker: FT_Stroker);
938 pub fn FT_Stroker_ParseOutline(stroker: FT_Stroker, outline: *mut FT_Outline, opened: FT_Bool) -> FT_Error;
939 pub fn FT_Stroker_Done(stroker: FT_Stroker);
940 pub fn FT_Stroker_BeginSubPath(stroker: FT_Stroker, to: *mut FT_Vector, open: FT_Bool) -> FT_Error;
941 pub fn FT_Stroker_EndSubPath(stroker: FT_Stroker) -> FT_Error;
942 pub fn FT_Stroker_LineTo(stroker: FT_Stroker, to: *mut FT_Vector) -> FT_Error;
943 pub fn FT_Stroker_ConicTo(stroker: FT_Stroker, control: *mut FT_Vector, to: *mut FT_Vector) -> FT_Error;
944 pub fn FT_Stroker_CubicTo(stroker: FT_Stroker, control1: *mut FT_Vector, control2: *mut FT_Vector, to: *mut FT_Vector) -> FT_Error;
945 pub fn FT_Stroker_GetBorderCounts(stroker: FT_Stroker, border: FT_StrokerBorder, anum_points: *mut FT_UInt, anum_contours: *mut FT_UInt) -> FT_Error;
946 pub fn FT_Stroker_ExportBorder(stroker: FT_Stroker, border: FT_StrokerBorder, outline: *mut FT_Outline);
947 pub fn FT_Stroker_GetCounts(stroker: FT_Stroker, anum_points: *mut FT_UInt, anum_contours: *mut FT_UInt) -> FT_Error;
948 pub fn FT_Stroker_Export(stroker: FT_Stroker, outline: *mut FT_Outline);
949 pub fn FT_MulDiv(a: FT_Long, b: FT_Long, c: FT_Long) -> FT_Long;
950 pub fn FT_MulFix(a: FT_Long, b: FT_Long) -> FT_Long;
951 pub fn FT_DivFix(a: FT_Long, b: FT_Long) -> FT_Long;
952 pub fn FT_RoundFix(a: FT_Fixed) -> FT_Fixed;
953 pub fn FT_CeilFix(a: FT_Fixed) -> FT_Fixed;
954 pub fn FT_FloorFix(a: FT_Fixed) -> FT_Fixed;
955
956 pub fn FT_Outline_New(library: FT_Library, num_points: FT_UInt, num_contours: FT_Int, anoutline: *mut FT_Outline) -> FT_Error;
957 pub fn FT_Outline_New_Internal(memory: FT_Memory, num_points: FT_UInt, num_contours: FT_Int, anoutline: *mut FT_Outline) -> FT_Error;
958 pub fn FT_Outline_Done(library: FT_Library, outline: *mut FT_Outline) -> FT_Error;
959 pub fn FT_Outline_Done_Internal(memory: FT_Memory, outline: *mut FT_Outline) -> FT_Error;
960 pub fn FT_Outline_Copy(source: *const FT_Outline, target: *mut FT_Outline) -> FT_Error;
961 pub fn FT_Outline_Translate(outline: *const FT_Outline, xOffset: FT_Pos, yOffset: FT_Pos);
962 pub fn FT_Outline_Transform(outline: *const FT_Outline, matrix: *const FT_Matrix);
963 pub fn FT_Outline_Embolden(outline: *mut FT_Outline, strength: FT_Pos) -> FT_Error;
964 pub fn FT_Outline_EmboldenXY(outline: *mut FT_Outline, xstrength: FT_Pos, ystrength: FT_Pos) -> FT_Error;
965 pub fn FT_Outline_Reverse(outline: *mut FT_Outline);
966 pub fn FT_Outline_Check(outline: *mut FT_Outline) -> FT_Error;
967
968 pub fn FT_Outline_Get_CBox(outline: *const FT_Outline, acbox: *mut FT_BBox);
969 pub fn FT_Outline_Get_BBox(outline: *const FT_Outline, abbox: *mut FT_BBox) -> FT_Error;
970
971 pub fn FT_Outline_Get_Bitmap(library: FT_Library, outline: *mut FT_Outline, abitmap: *const FT_Bitmap) -> FT_Error;
972 pub fn FT_Outline_Render(library: FT_Library, outline: *mut FT_Outline, params: *mut FT_Raster_Params) -> FT_Error;
973 pub fn FT_Outline_Decompose(outline: *mut FT_Outline, func_interface: *const FT_Outline_Funcs, user: *mut c_void) -> FT_Error;
974
975 pub fn FT_Outline_Get_Orientation(outline: *mut FT_Outline) -> FT_Orientation;
976}