All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pshalgo.c File Reference
#include <ft2build.h>
#include "pshalgo.h"
#include "pshnterr.h"

Go to the source code of this file.


#define COMPUTE_INFLEXS   /* compute inflection points to optimize `S' */
#define FT_COMPONENT   trace_pshalgo2
#define psh_corner_is_flat   ft_corner_is_flat
#define psh_corner_orientation   ft_corner_orientation
#define psh_print_zone(x)   do { } while ( 0 )
#define PSH_ZONE_MAX   +3200000L
#define PSH_ZONE_MIN   -3200000L
#define STRONGER   /* slightly increase the contrast of smooth */
#define xxDEBUG_ZONES


FT_Error ps_hints_apply (PS_Hints ps_hints, FT_Outline *outline, PSH_Globals globals, FT_Render_Mode hint_mode)
static int psh_compute_dir (FT_Pos dx, FT_Pos dy)
static FT_Pos psh_dimension_quantize_len (PSH_Dimension dim, FT_Pos len, FT_Bool do_snapping)
static void psh_glyph_compute_extrema (PSH_Glyph glyph)
static void psh_glyph_compute_inflections (PSH_Glyph glyph)
static void psh_glyph_done (PSH_Glyph glyph)
static void psh_glyph_find_blue_points (PSH_Blues blues, PSH_Glyph glyph)
static void psh_glyph_find_strong_points (PSH_Glyph glyph, FT_Int dimension)
static FT_Error psh_glyph_init (PSH_Glyph glyph, FT_Outline *outline, PS_Hints ps_hints, PSH_Globals globals)
static void psh_glyph_interpolate_normal_points (PSH_Glyph glyph, FT_Int dimension)
static void psh_glyph_interpolate_other_points (PSH_Glyph glyph, FT_Int dimension)
static void psh_glyph_interpolate_strong_points (PSH_Glyph glyph, FT_Int dimension)
static void psh_glyph_load_points (PSH_Glyph glyph, FT_Int dimension)
static void psh_glyph_save_points (PSH_Glyph glyph, FT_Int dimension)
static void psh_hint_align (PSH_Hint hint, PSH_Globals globals, FT_Int dimension, PSH_Glyph glyph)
static FT_Int psh_hint_overlap (PSH_Hint hint1, PSH_Hint hint2)
static FT_Fixed psh_hint_snap_stem_side_delta (FT_Fixed pos, FT_Fixed len)
static void psh_hint_table_activate_mask (PSH_Hint_Table table, PS_Mask hint_mask)
static void psh_hint_table_align_hints (PSH_Hint_Table table, PSH_Globals globals, FT_Int dimension, PSH_Glyph glyph)
static void psh_hint_table_deactivate (PSH_Hint_Table table)
static void psh_hint_table_done (PSH_Hint_Table table, FT_Memory memory)
static void psh_hint_table_find_strong_points (PSH_Hint_Table table, PSH_Point point, FT_UInt count, FT_Int threshold, FT_Int major_dir)
static FT_Error psh_hint_table_init (PSH_Hint_Table table, PS_Hint_Table hints, PS_Mask_Table hint_masks, PS_Mask_Table counter_masks, FT_Memory memory)
static void psh_hint_table_record (PSH_Hint_Table table, FT_UInt idx)
static void psh_hint_table_record_mask (PSH_Hint_Table table, PS_Mask hint_mask)

Macro Definition Documentation

#define COMPUTE_INFLEXS   /* compute inflection points to optimize `S' */

Definition at line 40 of file pshalgo.c.

#define FT_COMPONENT   trace_pshalgo2

Definition at line 30 of file pshalgo.c.

#define psh_corner_is_flat   ft_corner_is_flat

Definition at line 931 of file pshalgo.c.

Referenced by psh_glyph_init().

#define psh_corner_orientation   ft_corner_orientation

Definition at line 932 of file pshalgo.c.

Referenced by psh_glyph_compute_inflections().


Definition at line 1876 of file pshalgo.c.

Referenced by psh_glyph_interpolate_normal_points().

#define psh_print_zone (   x)    do { } while ( 0 )

Definition at line 916 of file pshalgo.c.


Definition at line 1662 of file pshalgo.c.

Referenced by psh_glyph_find_strong_points().


Definition at line 1665 of file pshalgo.c.

Referenced by psh_glyph_find_strong_points().

#define PSH_ZONE_MAX   +3200000L

Definition at line 895 of file pshalgo.c.

#define PSH_ZONE_MIN   -3200000L

Definition at line 894 of file pshalgo.c.

#define STRONGER   /* slightly increase the contrast of smooth */

Definition at line 42 of file pshalgo.c.

#define xxDEBUG_ZONES

Definition at line 897 of file pshalgo.c.

Function Documentation

static int psh_compute_dir ( FT_Pos  dx,
FT_Pos  dy 

Definition at line 1158 of file pshalgo.c.


Referenced by psh_glyph_init().

static FT_Pos psh_dimension_quantize_len ( PSH_Dimension  dim,
FT_Pos  len,
FT_Bool  do_snapping 
static void psh_glyph_load_points ( PSH_Glyph  glyph,
FT_Int  dimension 
static FT_Int psh_hint_overlap ( PSH_Hint  hint1,
PSH_Hint  hint2 

Definition at line 56 of file pshalgo.c.

Referenced by psh_hint_table_activate_mask(), and psh_hint_table_record().

static FT_Fixed psh_hint_snap_stem_side_delta ( FT_Fixed  pos,
FT_Fixed  len 

Definition at line 425 of file pshalgo.c.

References FT_ABS, and FT_PIX_ROUND.

Referenced by psh_hint_align().

static void psh_hint_table_align_hints ( PSH_Hint_Table  table,
PSH_Globals  globals,
FT_Int  dimension,
PSH_Glyph  glyph 
static void psh_hint_table_deactivate ( PSH_Hint_Table  table)
static void psh_hint_table_record_mask ( PSH_Hint_Table  table,
PS_Mask  hint_mask 

Definition at line 146 of file pshalgo.c.

References PS_MaskRec_::bytes, idx, PS_MaskRec_::num_bits, and psh_hint_table_record().

Referenced by psh_hint_table_init().