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++ )
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;
263 psh_blues_set_zones_0( target, 0,
264 count, blues, top_table, bot_table );
265 psh_blues_set_zones_0( target, 1,
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++ )
527 psh_calc_max_height(
FT_UInt num,
534 for ( count = 0; count <
num; count += 2 )
539 if ( cur_height > cur_max )
540 cur_max = cur_height;
562 no_shoots = blues->no_overshoots;
565 table = &blues->normal_top;
566 count = table->
count;
569 for ( ; count > 0; count--, zone++ )
572 if ( delta < -blues->blue_fuzz )
575 if ( stem_top <= zone->org_top + blues->blue_fuzz )
577 if ( no_shoots || delta <= blues->blue_threshold )
580 alignment->align_top = zone->
cur_ref;
587 table = &blues->normal_bottom;
588 count = table->
count;
589 zone = table->
zones + count-1;
591 for ( ; count > 0; count--, zone-- )
593 delta = zone->
org_top - stem_bot;
594 if ( delta < -blues->blue_fuzz )
597 if ( stem_bot >= zone->
org_bottom - blues->blue_fuzz )
599 if ( no_shoots || delta < blues->blue_threshold )
602 alignment->align_bot = zone->
cur_ref;
626 memory = globals->memory;
627 globals->dimension[0].stdw.count = 0;
628 globals->dimension[1].stdw.count = 0;
630 globals->blues.normal_top.count = 0;
631 globals->blues.normal_bottom.count = 0;
632 globals->blues.family_top.count = 0;
633 globals->blues.family_bottom.count = 0;
638 ps_debug_globals = 0;
659 globals->memory = memory;
729 max_scale =
FT_DivFix( 1000, max_height );
730 globals->blues.blue_scale = priv->
blue_scale < max_scale
736 globals->blues.blue_fuzz = priv->
blue_fuzz;
738 globals->dimension[0].scale_mult = 0;
739 globals->dimension[0].scale_delta = 0;
740 globals->dimension[1].scale_mult = 0;
741 globals->dimension[1].scale_delta = 0;
744 ps_debug_globals = globals;
763 dim = &globals->dimension[0];
770 psh_globals_scale_widths( globals, 0 );
773 dim = &globals->dimension[1];
780 psh_globals_scale_widths( globals, 1 );
781 psh_blues_scale_zones( &globals->blues, y_scale, y_delta );
791 funcs->create = psh_globals_new;
793 funcs->destroy = psh_globals_destroy;
FT_UShort standard_width[1]
typedefFT_BEGIN_HEADER struct PSH_GlobalsRec_ * PSH_Globals
FT_DivFix(FT_Long a, FT_Long b)
GLenum GLenum GLenum GLenum GLenum scale
FT_BEGIN_HEADER typedef signed long FT_Pos
PSH_Blue_TableRec normal_bottom
int write(int fd, const char *buf, int nbytes)
int read(int fd, char *buf, int nbytes)
PSH_Blue_TableRec family_bottom
GLint GLint GLsizei width
#define PSH_BLUE_ALIGN_BOT
FT_UShort standard_height[1]
FT_BEGIN_HEADER typedef unsigned char FT_Bool
PSH_Blue_TableRec normal_top
PSH_Blue_TableRec family_top
#define PSH_BLUE_ALIGN_TOP
#define PSH_BLUE_ALIGN_NONE
GLboolean GLenum GLenum GLvoid * values
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]
GLubyte GLubyte GLubyte GLubyte w
GLdouble GLdouble GLdouble GLdouble top
PSH_WidthRec widths[PS_GLOBALS_MAX_STD_WIDTHS]
PSH_Blue_ZoneRec zones[PS_GLOBALS_MAX_BLUE_ZONES]
FT_Short snap_heights[13]
GLuint GLuint GLsizei count
FT_Byte num_family_other_blues
FT_Short family_other_blues[10]
GLenum GLsizei GLenum GLenum const GLvoid * table
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)