21#include FT_INTERNAL_OBJECTS_H
22#include FT_INTERNAL_DEBUG_H
23#include FT_INTERNAL_CALC_H
31#define FT_COMPONENT trace_pshrec
35 int ps_debug_no_horz_hints = 0;
36 int ps_debug_no_vert_hints = 0;
70 if ( new_max > old_max )
75 table->max_hints = new_max;
145 if ( new_max > old_max )
149 mask->max_bits = new_max * 8;
163 return mask->bytes[
idx >> 3] & ( 0x80 >> (
idx & 7 ) );
223 table->num_masks = 0;
224 table->max_masks = 0;
239 if ( new_max > old_max )
243 table->max_masks = new_max;
328 mask->num_bits = bit_count;
339 for ( ; bit_count > 0; bit_count-- )
397 return ( p1[0] & p2[0] ) & ~( 0xFF >>
count );
412 if ( index1 > index2 )
422 if ( index1 < index2 && index2 < table->num_masks )
442 if ( count2 > count1 )
448 for (
pos = count1;
pos < count2;
pos++ )
455 pos = ( count2 + 7 ) >> 3;
482 mask2[delta] =
dummy;
488 FT_TRACE0((
"ps_mask_table_merge: ignoring invalid indices (%d,%d)\n",
508 for ( index1 = (
FT_Int)
table->num_masks - 1; index1 > 0; index1-- )
510 for ( index2 = index1 - 1; index2 >= 0; index2-- )
643 source_pos, source_bits,
memory );
832 hints->hint_type = hint_type;
855 FT_TRACE0((
"ps_hints_stem: invalid dimension (%d) used\n",
857 dimension = ( dimension != 0 );
862 dim = &
hints->dimension[dimension];
877 FT_ERROR((
"ps_hints_stem: could not add stem"
878 " (%d,%d) to hints table\n", stems[0], stems[1] ));
907 FT_TRACE0((
"ps_hints_t1stem3: invalid dimension (%d) used\n",
909 dimension = ( dimension != 0 );
912 dim = &
hints->dimension[dimension];
936 FT_ERROR((
"ps_hints_t1stem3: called with invalid hint type\n" ));
945 FT_ERROR((
"ps_hints_t1stem3: could not add counter stems to table\n" ));
1008 if ( bit_count != count1 + count2 )
1011 " called with invalid bitcount %d (instead of %d)\n",
1012 bit_count, count1 + count2 ));
1044 if ( !
hints->error )
1053 if ( bit_count != count1 + count2 )
1056 " called with invalid bitcount %d (instead of %d)\n",
1057 bit_count, count1 + count2 ));
1105 ps_debug_hints =
hints;
1195 for (
n = 0;
n <
count * 2;
n += 2 )
1196 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
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
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