22#include FT_INTERNAL_OBJECTS_H
66 dist =
w - stand->
cur;
153 for ( ; read_count > 1; read_count -= 2 )
163 if (
first || is_others )
168 zones = bot_table->
zones;
177 zones = top_table->
zones;
186 if ( reference < zone->org_ref )
198 if ( delta < delta0 )
199 zone->org_delta = delta;
203 if ( delta > delta0 )
204 zone->org_delta = delta;
214 zone->org_delta = delta;
225 top_table->
count = count_top;
226 bot_table->
count = count_bot;
248 top_table = &
target->family_top;
249 bot_table = &
target->family_bottom;
253 top_table = &
target->normal_top;
254 bot_table = &
target->normal_bottom;
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;
284 delta =
zone[1].org_ref -
zone[0].org_ref;
285 if (
zone->org_delta > delta )
286 zone->org_delta = delta;
307 delta =
zone[0].org_ref -
zone[1].org_ref;
308 if (
zone->org_delta < delta )
309 zone->org_delta = delta;
326 for ( dim = 1; dim >= 0; dim-- )
331 zone->org_bottom -= fuzz;
339 bot =
zone[1].org_bottom;
342 if ( delta / 2 < fuzz )
343 zone[0].org_top =
zone[1].org_bottom =
top + delta / 2;
347 zone[1].org_bottom = bot - fuzz;
405 if (
scale >= 0x20C49BAL )
463 if (
zone->cur_ref >
zone->cur_top )
465 else if (
zone->cur_ref <
zone->cur_bottom )
495 for ( ; count1 > 0; count1--, zone1++ )
499 zone2 = family->
zones;
500 count2 = family->
count;
502 for ( ; count2 > 0; count2--, zone2++ )
539 if ( cur_height > cur_max )
540 cur_max = cur_height;
562 no_shoots = blues->no_overshoots;
565 table = &blues->normal_top;
571 delta = stem_top -
zone->org_bottom;
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;
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;
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 =
NULL;
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];
773 dim = &globals->dimension[1];
FT_DivFix(FT_Long a, FT_Long b)
FT_MulFix(FT_Long a, FT_Long b)
FT_BEGIN_HEADER typedef signed long FT_Pos
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLint GLint GLsizei width
GLenum GLenum GLenum GLenum GLenum scale
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLenum GLenum GLvoid * values
GLubyte GLubyte GLubyte GLubyte w
typedefFT_BEGIN_HEADER struct PSH_GlobalsRec_ * PSH_Globals
static char memory[1024 *256]
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)
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)
psh_globals_funcs_init(PSH_Globals_FuncsRec *funcs)
static void psh_globals_scale_widths(PSH_Globals globals, FT_UInt direction)
static FT_Short psh_calc_max_height(FT_UInt num, const FT_Short *values, FT_Short cur_max)
static void psh_globals_destroy(PSH_Globals globals)
psh_blues_snap_stem(PSH_Blues blues, FT_Int stem_top, FT_Int stem_bot, PSH_Alignment alignment)
static FT_Error psh_globals_new(FT_Memory memory, T1_Private *priv, PSH_Globals *aglobals)
static void psh_blues_scale_zones(PSH_Blues blues, FT_Fixed scale, FT_Pos delta)
psh_globals_set_scale(PSH_Globals globals, FT_Fixed x_scale, FT_Fixed y_scale, FT_Fixed x_delta, FT_Fixed y_delta)
#define PSH_BLUE_ALIGN_BOT
#define PSH_BLUE_ALIGN_NONE
#define PSH_BLUE_ALIGN_TOP
static struct __wine_debug_functions funcs
PSH_Blue_ZoneRec zones[PS_GLOBALS_MAX_BLUE_ZONES]
PSH_Blue_TableRec family_bottom
PSH_Blue_TableRec normal_top
PSH_Blue_TableRec normal_bottom
PSH_Blue_TableRec family_top
PSH_WidthRec widths[PS_GLOBALS_MAX_STD_WIDTHS]
FT_UShort standard_width[1]
FT_Short snap_heights[13]
FT_Byte num_family_other_blues
FT_UShort standard_height[1]
FT_Short family_blues[14]
FT_Short family_other_blues[10]