21 #include FT_FREETYPE_H
22 #include FT_INTERNAL_OBJECTS_H
60 for ( ; count > 0; count--, width++ )
66 dist = w - stand->
cur;
94 for ( n = 0; n < dimension->stdw.count; n++ )
100 w = dimension->stdw.widths[
n].cur;
111 if ( width >= reference )
114 if ( width < reference )
120 if ( width > reference )
153 for ( ; read_count > 1; read_count -= 2 )
163 if ( first || is_others )
168 zones = bot_table->
zones;
177 zones = top_table->
zones;
184 for ( ; count > 0; count--, zone++ )
189 if ( reference == zone->
org_ref )
198 if ( delta < delta0 )
203 if ( delta > delta0 )
210 for ( ; count > 0; count-- )
211 zone[count] = zone[count-1];
225 top_table->
count = count_top;
226 bot_table->
count = count_bot;
243 FT_Int count_top, count_bot;
259 top_table->
count = 0;
260 bot_table->
count = 0;
264 count, blues, top_table, bot_table );
266 count_others, other_blues, top_table, bot_table );
268 count_top = top_table->
count;
269 count_bot = bot_table->
count;
277 for ( count = count_top; count > 0; count--, zone++ )
300 for ( count = count_bot; count > 0; count--, zone++ )
323 zone = top_table->
zones;
326 for ( dim = 1; dim >= 0; dim-- )
337 for ( count--; count > 0; count-- )
342 if ( delta < 2 * fuzz )
357 zone = bot_table->
zones;
405 if ( scale >= 0x20C49BAL )
423 while ( threshold > 0 &&
FT_MulFix( threshold, scale ) > 32 )
429 for ( num = 0; num < 4; num++ )
451 count = table->
count;
452 for ( ; count > 0; count--, zone++ )
473 for ( num = 0; num < 2; num++ )
492 zone1 = normal->
zones;
493 count1 = normal->
count;
495 for ( ; count1 > 0; count1--, zone1++ )
499 zone2 = family->
zones;
500 count2 = family->
count;
502 for ( ; count2 > 0; count2--, zone2++ )
540 no_shoots = blues->no_overshoots;
543 table = &blues->normal_top;
544 count = table->
count;
547 for ( ; count > 0; count--, zone++ )
550 if ( delta < -blues->blue_fuzz )
553 if ( stem_top <= zone->org_top + blues->blue_fuzz )
555 if ( no_shoots || delta <= blues->blue_threshold )
558 alignment->align_top = zone->
cur_ref;
565 table = &blues->normal_bottom;
566 count = table->
count;
567 zone = table->
zones + count-1;
569 for ( ; count > 0; count--, zone-- )
571 delta = zone->
org_top - stem_bot;
572 if ( delta < -blues->blue_fuzz )
575 if ( stem_bot >= zone->
org_bottom - blues->blue_fuzz )
577 if ( no_shoots || delta < blues->blue_threshold )
580 alignment->align_bot = zone->
cur_ref;
604 memory = globals->memory;
605 globals->dimension[0].stdw.count = 0;
606 globals->dimension[1].stdw.count = 0;
608 globals->blues.normal_top.count = 0;
609 globals->blues.normal_bottom.count = 0;
610 globals->blues.family_top.count = 0;
611 globals->blues.family_bottom.count = 0;
616 ps_debug_globals = 0;
637 globals->memory = memory;
689 globals->blues.blue_fuzz = priv->
blue_fuzz;
691 globals->dimension[0].scale_mult = 0;
692 globals->dimension[0].scale_delta = 0;
693 globals->dimension[1].scale_mult = 0;
694 globals->dimension[1].scale_delta = 0;
697 ps_debug_globals = globals;
716 dim = &globals->dimension[0];
726 dim = &globals->dimension[1];
FT_UShort standard_width[1]
typedefFT_BEGIN_HEADER struct PSH_GlobalsRec_ * PSH_Globals
GLenum GLsizei GLenum GLenum const GLvoid * table
FT_BEGIN_HEADER typedef signed long FT_Pos
static void psh_globals_scale_widths(PSH_Globals globals, FT_UInt direction)
PSH_Blue_TableRec normal_bottom
PSH_Blue_TableRec family_bottom
static FT_Error psh_globals_new(FT_Memory memory, T1_Private *priv, PSH_Globals *aglobals)
#define PSH_BLUE_ALIGN_BOT
FT_UShort standard_height[1]
FT_BEGIN_HEADER typedef unsigned char FT_Bool
PSH_Blue_TableRec normal_top
EGLContext EGLenum target
static void psh_globals_destroy(PSH_Globals globals)
EGLSurface EGLint EGLint EGLint width
PSH_Blue_TableRec family_top
#define PSH_BLUE_ALIGN_TOP
static void psh_blues_set_zones(PSH_Blues target, FT_UInt count, FT_Short *blues, FT_UInt count_others, FT_Short *other_blues, FT_Int fuzz, FT_Int family)
GLfloat GLfloat GLfloat top
#define PSH_BLUE_ALIGN_NONE
GLenum const void GLuint GLint reference
GLenum GLenum GLenum GLenum GLenum scale
static void psh_blues_set_zones_0(PSH_Blues target, FT_Bool is_others, FT_UInt read_count, FT_Short *read, PSH_Blue_Table top_table, PSH_Blue_Table bot_table)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
psh_globals_funcs_init(PSH_Globals_FuncsRec *funcs)
FT_MulFix(FT_Long a, FT_Long b)
FT_Short family_blues[14]
PSH_WidthRec widths[PS_GLOBALS_MAX_STD_WIDTHS]
PSH_Blue_ZoneRec zones[PS_GLOBALS_MAX_BLUE_ZONES]
static void psh_blues_scale_zones(PSH_Blues blues, FT_Fixed scale, FT_Pos delta)
FT_Short snap_heights[13]
GLint GLint GLint GLint GLint w
FT_Byte num_family_other_blues
FT_Short family_other_blues[10]
psh_blues_snap_stem(PSH_Blues blues, FT_Int stem_top, FT_Int stem_bot, PSH_Alignment alignment)
psh_globals_set_scale(PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta)