26 af_corner_is_flat(
FT_Pos x_in,
34 FT_Pos d_in, d_out, d_corner;
59 return ( d_in + d_out - d_corner ) < ( d_corner >> 4 );
64 af_corner_orientation(
FT_Pos x_in,
72 delta = x_in * y_out - y_in * x_out;
77 return 1 - 2 * ( delta < 0 );
144 #define AF_ATAN_BITS 8 146 static const FT_Byte af_arctan[1L << AF_ATAN_BITS] =
148 0, 0, 1, 1, 1, 2, 2, 2,
149 3, 3, 3, 3, 4, 4, 4, 5,
150 5, 5, 6, 6, 6, 7, 7, 7,
151 8, 8, 8, 9, 9, 9, 10, 10,
152 10, 10, 11, 11, 11, 12, 12, 12,
153 13, 13, 13, 14, 14, 14, 14, 15,
154 15, 15, 16, 16, 16, 17, 17, 17,
155 18, 18, 18, 18, 19, 19, 19, 20,
156 20, 20, 21, 21, 21, 21, 22, 22,
157 22, 23, 23, 23, 24, 24, 24, 24,
158 25, 25, 25, 26, 26, 26, 26, 27,
159 27, 27, 28, 28, 28, 28, 29, 29,
160 29, 30, 30, 30, 30, 31, 31, 31,
161 31, 32, 32, 32, 33, 33, 33, 33,
162 34, 34, 34, 34, 35, 35, 35, 35,
163 36, 36, 36, 36, 37, 37, 37, 38,
164 38, 38, 38, 39, 39, 39, 39, 40,
165 40, 40, 40, 41, 41, 41, 41, 42,
166 42, 42, 42, 42, 43, 43, 43, 43,
167 44, 44, 44, 44, 45, 45, 45, 45,
168 46, 46, 46, 46, 46, 47, 47, 47,
169 47, 48, 48, 48, 48, 48, 49, 49,
170 49, 49, 50, 50, 50, 50, 50, 51,
171 51, 51, 51, 51, 52, 52, 52, 52,
172 52, 53, 53, 53, 53, 53, 54, 54,
173 54, 54, 54, 55, 55, 55, 55, 55,
174 56, 56, 56, 56, 56, 57, 57, 57,
175 57, 57, 57, 58, 58, 58, 58, 58,
176 59, 59, 59, 59, 59, 59, 60, 60,
177 60, 60, 60, 61, 61, 61, 61, 61,
178 61, 62, 62, 62, 62, 62, 62, 63,
179 63, 63, 63, 63, 63, 64, 64, 64
225 if ( dx == 0 && dy == 0 )
231 angle += af_arctan[
FT_DivFix( dy, dx ) >> ( 16 - AF_ATAN_BITS )];
234 af_arctan[
FT_DivFix( dx, dy ) >> ( 16 - AF_ATAN_BITS )];
254 for ( i = 1; i <
count; i++ )
256 for ( j = i; j > 0; j-- )
258 if ( table[j] >= table[j - 1] )
262 table[j] = table[j - 1];
285 for ( i = 1; i < *
count; i++ )
287 for ( j = i; j > 0; j-- )
289 if ( table[j].org >= table[j - 1].org )
293 table[j] = table[j - 1];
299 cur_val = table[cur_idx].org;
305 for ( i = 1; i < *
count; i++ )
307 if ( table[i].org - cur_val > threshold ||
313 if ( table[i].org - cur_val <= threshold &&
317 for ( j = cur_idx; j <
i; j++ )
322 table[cur_idx].org = sum / j;
324 if ( i < *count - 1 )
327 cur_val = table[cur_idx].org;
335 for ( i = 1; i < *
count; i++ )
338 table[cur_idx++] = table[
i];
FT_DivFix(FT_Long a, FT_Long b)
FT_BEGIN_HEADER typedef signed long FT_Pos
af_sort_and_quantize_widths(FT_UInt *count, AF_Width table, FT_Pos threshold)
FT_BEGIN_HEADER struct AF_WidthRec_ * AF_Width
FT_BEGIN_HEADER struct AF_WidthRec_ AF_WidthRec
GLuint GLuint GLsizei count
af_sort_pos(FT_UInt count, FT_Pos *table)
GLenum GLsizei GLenum GLenum const GLvoid * table