30#define FT_COMPONENT pshrec
34 int ps_debug_no_horz_hints = 0;
35 int ps_debug_no_vert_hints = 0;
69 if ( new_max > old_max )
74 table->max_hints = new_max;
144 if ( new_max > old_max )
148 mask->max_bits = new_max * 8;
162 return mask->bytes[
idx >> 3] & ( 0x80 >> (
idx & 7 ) );
222 table->num_masks = 0;
223 table->max_masks = 0;
238 if ( new_max > old_max )
242 table->max_masks = new_max;
327 mask->num_bits = bit_count;
338 for ( ; bit_count > 0; bit_count-- )
396 return ( p1[0] & p2[0] ) & ~( 0xFF >>
count );
411 if ( index1 > index2 )
421 if ( index1 < index2 && index2 < table->num_masks )
441 if ( count2 > count1 )
447 for (
pos = count1;
pos < count2;
pos++ )
454 pos = ( count2 + 7 ) >> 3;
481 mask2[delta] =
dummy;
487 FT_TRACE0((
"ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
507 for ( index1 = (
FT_Int)
table->num_masks - 1; index1 > 0; index1-- )
509 for ( index2 = index1 - 1; index2 >= 0; index2-- )
642 source_pos, source_bits,
memory );
831 hints->hint_type = hint_type;
854 FT_TRACE0((
"ps_hints_stem: invalid dimension (%d) used\n",
856 dimension = ( dimension != 0 );
861 dim = &
hints->dimension[dimension];
876 FT_ERROR((
"ps_hints_stem: could not add stem"
877 " (%ld,%ld) to hints table\n", stems[0], stems[1] ));
906 FT_TRACE0((
"ps_hints_t1stem3: invalid dimension (%d) used\n",
908 dimension = ( dimension != 0 );
911 dim = &
hints->dimension[dimension];
935 FT_ERROR((
"ps_hints_t1stem3: called with invalid hint type\n" ));
944 FT_ERROR((
"ps_hints_t1stem3: could not add counter stems to table\n" ));
1007 if ( bit_count != count1 + count2 )
1010 " called with invalid bitcount %d (instead of %d)\n",
1011 bit_count, count1 + count2 ));
1043 if ( !
hints->error )
1052 if ( bit_count != count1 + count2 )
1055 " called with invalid bitcount %d (instead of %d)\n",
1056 bit_count, count1 + count2 ));
1104 ps_debug_hints =
hints;
1194 for (
n = 0;
n <
count * 2;
n += 2 )
1195 stems[
n + 1] = stems[
n + 1] - stems[
n];
static unsigned char bytes[4]
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
#define FT_PAD_CEIL(x, n)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
FT_Error(* T2_Hints_CloseFunc)(T2_Hints hints, FT_UInt end_point)
void(* T2_Hints_CounterFunc)(T2_Hints hints, FT_UInt bit_count, const FT_Byte *bytes)
void(* T1_Hints_SetStemFunc)(T1_Hints hints, FT_UInt dimension, FT_Fixed *coords)
void(* T1_Hints_OpenFunc)(T1_Hints hints)
void(* T1_Hints_SetStem3Func)(T1_Hints hints, FT_UInt dimension, FT_Fixed *coords)
void(* T2_Hints_StemsFunc)(T2_Hints hints, FT_UInt dimension, FT_Int count, FT_Fixed *coordinates)
FT_Error(* T1_Hints_CloseFunc)(T1_Hints hints, FT_UInt end_point)
void(* T2_Hints_OpenFunc)(T2_Hints hints)
struct T1_HintsRec_ * T1_Hints
void(* T2_Hints_MaskFunc)(T2_Hints hints, FT_UInt end_point, FT_UInt bit_count, const FT_Byte *bytes)
FT_Error(* T1_Hints_ApplyFunc)(T1_Hints hints, FT_Outline *outline, PSH_Globals globals, FT_Render_Mode hint_mode)
FT_Error(* T2_Hints_ApplyFunc)(T2_Hints hints, FT_Outline *outline, PSH_Globals globals, FT_Render_Mode hint_mode)
void(* T1_Hints_ResetFunc)(T1_Hints hints, FT_UInt end_point)
struct T2_HintsRec_ * T2_Hints
static char memory[1024 *256]
FT_Error ps_hints_apply(PS_Hints ps_hints, FT_Outline *outline, PSH_Globals globals, FT_Render_Mode hint_mode)
static void ps_dimension_done(PS_Dimension dimension, FT_Memory memory)
static FT_Error ps_dimension_set_mask_bits(PS_Dimension dim, const FT_Byte *source, FT_UInt source_pos, FT_UInt source_bits, FT_UInt end_point, FT_Memory memory)
static FT_Int ps_mask_table_test_intersect(PS_Mask_Table table, FT_UInt index1, FT_UInt index2)
static void t1_hints_open(T1_Hints hints)
static FT_Error ps_dimension_end(PS_Dimension dim, FT_UInt end_point, FT_Memory memory)
static FT_Error ps_mask_table_merge(PS_Mask_Table table, FT_UInt index1, FT_UInt index2, FT_Memory memory)
static FT_Error ps_hints_close(PS_Hints hints, FT_UInt end_point)
t1_hints_funcs_init(T1_Hints_FuncsRec *funcs)
static FT_Error ps_dimension_add_t1stem(PS_Dimension dim, FT_Int pos, FT_Int len, FT_Memory memory, FT_Int *aindex)
static FT_Error ps_mask_set_bit(PS_Mask mask, FT_UInt idx, FT_Memory memory)
ps_hints_init(PS_Hints hints, FT_Memory memory)
static FT_Error ps_hint_table_alloc(PS_Hint_Table table, FT_Memory memory, PS_Hint *ahint)
static void ps_hints_t2mask(PS_Hints hints, FT_UInt end_point, FT_UInt bit_count, const FT_Byte *bytes)
static void ps_hint_table_done(PS_Hint_Table table, FT_Memory memory)
static FT_Int ps_mask_test_bit(PS_Mask mask, FT_Int idx)
ps_hints_done(PS_Hints hints)
static void t1_hints_stem(T1_Hints hints, FT_UInt dimension, FT_Fixed *coords)
static FT_Error ps_mask_table_alloc(PS_Mask_Table table, FT_Memory memory, PS_Mask *amask)
static void ps_hints_t1stem3(PS_Hints hints, FT_UInt dimension, FT_Fixed *stems)
static FT_Error ps_dimension_add_counter(PS_Dimension dim, FT_Int hint1, FT_Int hint2, FT_Int hint3, FT_Memory memory)
static void ps_hints_t1reset(PS_Hints hints, FT_UInt end_point)
static void ps_mask_table_done(PS_Mask_Table table, FT_Memory memory)
static void t2_hints_stems(T2_Hints hints, FT_UInt dimension, FT_Int count, FT_Fixed *coords)
static FT_Error ps_mask_table_set_bits(PS_Mask_Table table, const FT_Byte *source, FT_UInt bit_pos, FT_UInt bit_count, FT_Memory memory)
static void ps_hints_t2counter(PS_Hints hints, FT_UInt bit_count, const FT_Byte *bytes)
static FT_Error ps_hint_table_ensure(PS_Hint_Table table, FT_UInt count, FT_Memory memory)
t2_hints_funcs_init(T2_Hints_FuncsRec *funcs)
static void t2_hints_open(T2_Hints hints)
static void ps_mask_clear_bit(PS_Mask mask, FT_UInt idx)
static FT_Error ps_dimension_reset_mask(PS_Dimension dim, FT_UInt end_point, FT_Memory memory)
static void ps_mask_done(PS_Mask mask, FT_Memory memory)
static FT_Error ps_mask_table_last(PS_Mask_Table table, FT_Memory memory, PS_Mask *amask)
static FT_Error ps_mask_table_ensure(PS_Mask_Table table, FT_UInt count, FT_Memory memory)
static void ps_dimension_end_mask(PS_Dimension dim, FT_UInt end_point)
static FT_Error ps_mask_table_merge_all(PS_Mask_Table table, FT_Memory memory)
static void ps_hints_stem(PS_Hints hints, FT_UInt dimension, FT_Int count, FT_Long *stems)
static void ps_hints_open(PS_Hints hints, PS_Hint_Type hint_type)
static void ps_dimension_init(PS_Dimension dimension)
static FT_Error ps_mask_ensure(PS_Mask mask, FT_UInt count, FT_Memory memory)
enum PS_Hint_Type_ PS_Hint_Type
#define PS_HINT_FLAG_GHOST
#define PS_HINT_FLAG_BOTTOM
typedefFT_BEGIN_HEADER struct PS_HintRec_ * PS_Hint
static struct __wine_debug_functions funcs
namespace GUID const ADDRINFOEXW * hints
PS_Mask_TableRec counters