1 ! Copyright (C) 2005, 2007 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.syntax kernel system combinators
8 { [ os macosx? ] [ "/usr/X11R6/lib/libfreetype.6.dylib" "cdecl" add-library ] }
9 { [ os windows? ] [ "freetype6.dll" "cdecl" add-library ] }
15 TYPEDEF: uchar FT_Byte
16 TYPEDEF: void* FT_Bytes
21 TYPEDEF: short FT_Short
22 TYPEDEF: ushort FT_UShort
24 TYPEDEF: ulong FT_ULong
25 TYPEDEF: uchar FT_Bool
26 TYPEDEF: cell FT_Offset
27 TYPEDEF: int FT_PtrDist
28 TYPEDEF: char FT_String
31 TYPEDEF: long FT_Fixed
32 TYPEDEF: void* FT_Pointer
34 TYPEDEF: ushort FT_UFWord
35 TYPEDEF: short FT_F2Dot14
36 TYPEDEF: long FT_F26Dot6
38 FUNCTION: FT_Error FT_Init_FreeType ( void* library ) ;
40 ! circular reference between glyph and face
48 { "FT_UInt" "reserved" }
55 { "FT_Pos" "hori-bearing-x" }
56 { "FT_Pos" "hori-bearing-y" }
57 { "FT_Pos" "hori-advance" }
59 { "FT_Pos" "vert-bearing-x" }
60 { "FT_Pos" "vert-bearing-y" }
61 { "FT_Pos" "vert-advance" }
63 { "FT_Fixed" "linear-hori-advance" }
64 { "FT_Fixed" "linear-vert-advance" }
65 { "FT_Pos" "advance-x" }
66 { "FT_Pos" "advance-y" }
68 { "intptr_t" "format" }
70 { "int" "bitmap-rows" }
71 { "int" "bitmap-width" }
72 { "int" "bitmap-pitch" }
73 { "void*" "bitmap-buffer" }
74 { "short" "bitmap-num-grays" }
75 { "char" "bitmap-pixel-mode" }
76 { "char" "bitmap-palette-mode" }
77 { "void*" "bitmap-palette" }
79 { "FT_Int" "bitmap-left" }
80 { "FT_Int" "bitmap-top" }
82 { "short" "n-contours" }
83 { "short" "n-points" }
87 { "short*" "contours" }
89 { "int" "outline-flags" }
91 { "FT_UInt" "num_subglyphs" }
92 { "void*" "subglyphs" }
94 { "void*" "control-data" }
95 { "long" "control-len" }
97 { "FT_Pos" "lsb-delta" }
98 { "FT_Pos" "rsb-delta" }
100 { "void*" "other" } ;
104 { "void*" "generic" }
105 { "void*" "generic" }
107 { "FT_UShort" "x-ppem" }
108 { "FT_UShort" "y-ppem" }
110 { "FT_Fixed" "x-scale" }
111 { "FT_Fixed" "y-scale" }
113 { "FT_Pos" "ascender" }
114 { "FT_Pos" "descender" }
115 { "FT_Pos" "height" }
116 { "FT_Pos" "max-advance" } ;
119 { "FT_Long" "num-faces" }
120 { "FT_Long" "index" }
122 { "FT_Long" "flags" }
123 { "FT_Long" "style-flags" }
125 { "FT_Long" "num-glyphs" }
127 { "FT_Char*" "family-name" }
128 { "FT_Char*" "style-name" }
130 { "FT_Int" "num-fixed-sizes" }
131 { "void*" "available-sizes" }
133 { "FT_Int" "num-charmaps" }
134 { "void*" "charmaps" }
136 { "void*" "generic" }
137 { "void*" "generic" }
144 { "FT_UShort" "units-per-em" }
145 { "FT_Short" "ascender" }
146 { "FT_Short" "descender" }
147 { "FT_Short" "height" }
149 { "FT_Short" "max-advance-width" }
150 { "FT_Short" "max-advance-height" }
152 { "FT_Short" "underline-position" }
153 { "FT_Short" "underline-thickness" }
156 { "face-size*" "size" }
157 { "void*" "charmap" } ;
164 { "short" "num_grays" }
165 { "char" "pixel_mode" }
166 { "char" "palette_mode" }
167 { "void*" "palette" } ;
169 FUNCTION: FT_Error FT_New_Face ( void* library, FT_Char* font, FT_Long index, face* face ) ;
171 FUNCTION: FT_Error FT_New_Memory_Face ( void* library, FT_Byte* file_base, FT_Long file_size, FT_Long face_index, FT_Face* aface ) ;
173 FUNCTION: FT_Error FT_Set_Char_Size ( face* face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horizontal_dpi, FT_UInt vertical_dpi ) ;
175 FUNCTION: FT_Error FT_Load_Char ( face* face, FT_ULong charcode, FT_Int32 load_flags ) ;
178 FT_RENDER_MODE_NORMAL
182 FT_RENDER_MODE_LCD_V ;
191 FT_PIXEL_MODE_LCD_V ;
193 FUNCTION: int FT_Render_Glyph ( glyph* slot, int render_mode ) ;
195 FUNCTION: void FT_Done_Face ( face* face ) ;
197 FUNCTION: void FT_Done_FreeType ( void* library ) ;
199 FUNCTION: FT_Long FT_MulFix ( FT_Long a, FT_Long b ) ;