zenilib
0.5.3.0
|
#include <ft2build.h>
#include <FT_INTERNAL_OBJECTS_H>
#include <FT_INTERNAL_DEBUG_H>
#include <FT_INTERNAL_CALC_H>
#include "pshalgo.h"
#include "pshnterr.h"
Go to the source code of this file.
Macros | |
#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_MAX_STRONG_INTERNAL 16 |
#define | psh_print_zone(x) do { } while ( 0 ) |
#define | PSH_STRONG_THRESHOLD 32 |
#define | PSH_STRONG_THRESHOLD_MAXIMUM 30 |
#define | PSH_ZONE_MAX +3200000L |
#define | PSH_ZONE_MIN -3200000L |
#define | STRONGER /* slightly increase the contrast of smooth */ |
#define | xxDEBUG_ZONES |
#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */ |
#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().
#define PSH_MAX_STRONG_INTERNAL 16 |
Definition at line 1876 of file pshalgo.c.
Referenced by psh_glyph_interpolate_normal_points().
#define PSH_STRONG_THRESHOLD 32 |
Definition at line 1662 of file pshalgo.c.
Referenced by psh_glyph_find_strong_points().
#define PSH_STRONG_THRESHOLD_MAXIMUM 30 |
Definition at line 1665 of file pshalgo.c.
Referenced by psh_glyph_find_strong_points().
#define STRONGER /* slightly increase the contrast of smooth */ |
FT_Error ps_hints_apply | ( | PS_Hints | ps_hints, |
FT_Outline * | outline, | ||
PSH_Globals | globals, | ||
FT_Render_Mode | hint_mode | ||
) |
Definition at line 2181 of file pshalgo.c.
References PSH_GlyphRec_::do_horz_hints, PSH_GlyphRec_::do_horz_snapping, PSH_GlyphRec_::do_stem_adjust, PSH_GlyphRec_::do_vert_hints, PSH_GlyphRec_::do_vert_snapping, error, FALSE, FT_Bool, FT_BOOL, FT_FREE, FT_MulDiv(), FT_MulFix(), FT_NEW, FT_PIX_ROUND, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, PSH_GlyphRec_::globals, PSH_GlyphRec_::hint_tables, FT_Outline_::n_contours, FT_Outline_::n_points, psh_globals_set_scale(), psh_glyph_compute_extrema(), psh_glyph_done(), psh_glyph_find_blue_points(), psh_glyph_find_strong_points(), psh_glyph_init(), psh_glyph_interpolate_normal_points(), psh_glyph_interpolate_other_points(), psh_glyph_interpolate_strong_points(), psh_glyph_load_points(), psh_glyph_save_points(), psh_hint_table_align_hints(), PSH_DimensionRec_::scale_mult, and TRUE.
Referenced by t1_hints_funcs_init(), and t2_hints_funcs_init().
Definition at line 1158 of file pshalgo.c.
References FT_Pos, PSH_DIR_DOWN, PSH_DIR_LEFT, PSH_DIR_NONE, PSH_DIR_RIGHT, and PSH_DIR_UP.
Referenced by psh_glyph_init().
|
static |
Definition at line 347 of file pshalgo.c.
References PSH_WidthRec_::cur, FT_PIX_ROUND, FT_Pos, PSH_DimensionRec_::stdw, and PSH_WidthsRec_::widths.
Referenced by psh_hint_align().
Definition at line 1393 of file pshalgo.c.
References PSH_GlyphRec_::contours, PSH_ContourRec_::count, PSH_PointRec_::next, PSH_GlyphRec_::num_contours, PSH_GlyphRec_::num_points, PSH_PointRec_::org_u, PSH_PointRec_::org_v, PSH_GlyphRec_::points, PSH_PointRec_::prev, psh_point_is_extremum, psh_point_set_extremum, psh_point_set_negative, psh_point_set_positive, and PSH_ContourRec_::start.
Referenced by ps_hints_apply().
Definition at line 1031 of file pshalgo.c.
References PSH_GlyphRec_::contours, PSH_ContourRec_::count, FT_Pos, PSH_PointRec_::next, PSH_GlyphRec_::num_contours, PSH_PointRec_::org_u, PSH_PointRec_::org_v, PSH_PointRec_::prev, psh_corner_orientation, psh_point_set_inflex, and PSH_ContourRec_::start.
Referenced by psh_glyph_init().
Definition at line 1139 of file pshalgo.c.
References PSH_GlyphRec_::contours, FT_FREE, PSH_GlyphRec_::hint_tables, PSH_GlyphRec_::memory, PSH_GlyphRec_::num_contours, PSH_GlyphRec_::num_points, PSH_GlyphRec_::points, and psh_hint_table_done().
Referenced by ps_hints_apply().
Definition at line 1753 of file pshalgo.c.
References PSH_BluesRec_::blue_fuzz, PSH_Blue_TableRec_::count, PSH_Blue_ZoneRec_::cur_bottom, PSH_Blue_ZoneRec_::cur_top, PSH_PointRec_::cur_u, PSH_PointRec_::dir_in, PSH_PointRec_::dir_out, FT_Pos, PSH_BluesRec_::no_overshoots, PSH_BluesRec_::normal_bottom, PSH_BluesRec_::normal_top, PSH_GlyphRec_::num_points, PSH_Blue_ZoneRec_::org_bottom, PSH_Blue_ZoneRec_::org_top, PSH_PointRec_::org_u, PSH_GlyphRec_::points, PSH_DIR_COMPARE, PSH_DIR_HORIZONTAL, psh_point_is_strong, psh_point_set_fitted, psh_point_set_strong, and PSH_Blue_TableRec_::zones.
Referenced by ps_hints_apply().
Definition at line 1670 of file pshalgo.c.
References PS_MaskRec_::end_point, FT_DivFix(), PSH_GlyphRec_::globals, PSH_PointRec_::hint, PSH_Hint_TableRec_::hint_masks, PSH_GlyphRec_::hint_tables, PS_Mask_TableRec_::masks, PS_Mask_TableRec_::num_masks, PSH_GlyphRec_::num_points, PSH_GlyphRec_::points, PSH_DIR_HORIZONTAL, PSH_DIR_VERTICAL, psh_hint_table_activate_mask(), psh_hint_table_find_strong_points(), psh_point_is_strong, psh_point_set_strong, PSH_STRONG_THRESHOLD, PSH_STRONG_THRESHOLD_MAXIMUM, and PSH_DimensionRec_::scale_mult.
Referenced by ps_hints_apply().
|
static |
Definition at line 1259 of file pshalgo.c.
References PSH_PointRec_::contour, PSH_GlyphRec_::contours, FT_Outline_::contours, PSH_ContourRec_::count, PS_DimensionRec_::counters, PS_HintsRec_::dimension, PSH_PointRec_::dir_in, PSH_PointRec_::dir_out, error, PSH_PointRec_::flags, FT_CURVE_TAG_ON, FT_MEM_ZERO, FT_NEW_ARRAY, FT_Pos, PSH_GlyphRec_::globals, PSH_GlyphRec_::hint_tables, PS_DimensionRec_::hints, PS_DimensionRec_::masks, PSH_GlyphRec_::memory, FT_Outline_::n_contours, FT_Outline_::n_points, PSH_PointRec_::next, PSH_GlyphRec_::num_contours, PSH_GlyphRec_::num_points, PSH_GlyphRec_::outline, PSH_GlyphRec_::points, FT_Outline_::points, PSH_PointRec_::prev, psh_compute_dir(), psh_corner_is_flat, PSH_DIR_NONE, psh_glyph_compute_inflections(), psh_glyph_load_points(), psh_hint_table_init(), PSH_POINT_OFF, PSH_POINT_SMOOTH, PSH_ContourRec_::start, FT_Outline_::tags, vec, FT_Vector_::x, and FT_Vector_::y.
Referenced by ps_hints_apply().
Definition at line 1879 of file pshalgo.c.
References PSH_PointRec_::cur_u, PSH_PointRec_::dir_in, PSH_PointRec_::dir_out, error, PSH_PointRec_::flags, FT_FREE, FT_MulDiv(), FT_MulFix(), FT_NEW_ARRAY, FT_Pos, PSH_GlyphRec_::globals, PSH_GlyphRec_::memory, NULL, PSH_GlyphRec_::num_points, PSH_PointRec_::org_u, PSH_GlyphRec_::points, PSH_DIR_NONE, PSH_MAX_STRONG_INTERNAL, psh_point_is_extremum, psh_point_is_inflex, psh_point_is_smooth, psh_point_is_strong, psh_point_set_fitted, PSH_POINT_SMOOTH, PSH_DimensionRec_::scale_mult, and u.
Referenced by ps_hints_apply().
Definition at line 2033 of file pshalgo.c.
References PSH_GlyphRec_::contours, PSH_ContourRec_::count, PSH_PointRec_::cur_u, FT_DivFix(), FT_MulFix(), FT_Pos, PSH_GlyphRec_::globals, PSH_PointRec_::next, PSH_GlyphRec_::num_contours, PSH_PointRec_::org_u, psh_point_is_fitted, PSH_DimensionRec_::scale_delta, PSH_DimensionRec_::scale_mult, and PSH_ContourRec_::start.
Referenced by ps_hints_apply().
Definition at line 1828 of file pshalgo.c.
References PSH_PointRec_::cur_u, FT_MulDiv(), FT_MulFix(), FT_Pos, PSH_GlyphRec_::globals, PSH_PointRec_::hint, PSH_GlyphRec_::num_points, PSH_PointRec_::org_u, PSH_GlyphRec_::points, psh_point_is_edge_max, psh_point_is_edge_min, psh_point_set_fitted, and PSH_DimensionRec_::scale_mult.
Referenced by ps_hints_apply().
Definition at line 1185 of file pshalgo.c.
References NULL, PSH_GlyphRec_::num_points, PSH_GlyphRec_::outline, PSH_GlyphRec_::points, FT_Outline_::points, vec, FT_Vector_::x, and FT_Vector_::y.
Referenced by ps_hints_apply(), and psh_glyph_init().
Definition at line 1219 of file pshalgo.c.
References PSH_PointRec_::cur_u, PSH_PointRec_::flags, PSH_PointRec_::flags2, PSH_GlyphRec_::num_points, PSH_GlyphRec_::outline, PSH_GlyphRec_::points, FT_Outline_::points, psh_point_is_strong, FT_Outline_::tags, vec, FT_Vector_::x, and FT_Vector_::y.
Referenced by ps_hints_apply().
|
static |
Definition at line 440 of file pshalgo.c.
References PSH_AlignmentRec_::align, PSH_AlignmentRec_::align_bot, PSH_AlignmentRec_::align_top, PSH_GlyphRec_::do_horz_hints, PSH_GlyphRec_::do_horz_snapping, PSH_GlyphRec_::do_stem_adjust, PSH_GlyphRec_::do_vert_hints, PSH_GlyphRec_::do_vert_snapping, FT_MulFix(), FT_PIX_FLOOR, FT_PIX_ROUND, FT_Pos, PSH_BLUE_ALIGN_BOT, PSH_BLUE_ALIGN_NONE, PSH_BLUE_ALIGN_TOP, psh_blues_snap_stem(), psh_dimension_quantize_len(), psh_hint_is_fitted, psh_hint_set_fitted, psh_hint_snap_stem_side_delta(), PSH_DimensionRec_::scale_delta, and PSH_DimensionRec_::scale_mult.
Referenced by psh_hint_table_align_hints().
Definition at line 56 of file pshalgo.c.
Referenced by psh_hint_table_activate_mask(), and psh_hint_table_record().
Definition at line 425 of file pshalgo.c.
References FT_ABS, and FT_PIX_ROUND.
Referenced by psh_hint_align().
|
static |
Definition at line 247 of file pshalgo.c.
References PS_MaskRec_::bytes, FT_TRACE0, PSH_Hint_TableRec_::hints, i1, i2, idx, PS_MaskRec_::num_bits, PSH_Hint_TableRec_::num_hints, psh_hint_activate, psh_hint_is_active, psh_hint_overlap(), psh_hint_table_deactivate(), and PSH_Hint_TableRec_::sort.
Referenced by psh_glyph_find_strong_points().
|
static |
Definition at line 849 of file pshalgo.c.
References PSH_Hint_TableRec_::hints, PSH_Hint_TableRec_::max_hints, psh_hint_align(), PSH_DimensionRec_::scale_delta, and PSH_DimensionRec_::scale_mult.
Referenced by ps_hints_apply().
|
static |
Definition at line 83 of file pshalgo.c.
References PSH_Hint_TableRec_::hints, PSH_Hint_TableRec_::max_hints, and psh_hint_deactivate.
Referenced by psh_hint_table_activate_mask().
|
static |
Definition at line 66 of file pshalgo.c.
References FT_FREE, PSH_Hint_TableRec_::hints, PSH_Hint_TableRec_::max_hints, PSH_Hint_TableRec_::num_hints, PSH_Hint_TableRec_::num_zones, PSH_Hint_TableRec_::sort, PSH_Hint_TableRec_::sort_global, PSH_Hint_TableRec_::zone, and PSH_Hint_TableRec_::zones.
Referenced by psh_glyph_done().
|
static |
Definition at line 1517 of file pshalgo.c.
References d, PSH_PointRec_::dir_in, PSH_PointRec_::dir_out, PSH_PointRec_::flags2, FT_Pos, PSH_PointRec_::hint, NULL, PSH_Hint_TableRec_::num_hints, PSH_PointRec_::org_u, PSH_DIR_COMPARE, PSH_DIR_HORIZONTAL, PSH_POINT_EDGE_MAX, PSH_POINT_EDGE_MIN, psh_point_is_extremum, psh_point_is_strong, PSH_POINT_NEGATIVE, PSH_POINT_POSITIVE, psh_point_set_strong, and PSH_Hint_TableRec_::sort.
Referenced by psh_glyph_find_strong_points().
|
static |
Definition at line 174 of file pshalgo.c.
References error, FT_NEW_ARRAY, FT_TRACE0, FT_UNUSED, PSH_Hint_TableRec_::hint_masks, PSH_Hint_TableRec_::hints, PS_Hint_TableRec_::hints, idx, PS_Mask_TableRec_::masks, PSH_Hint_TableRec_::max_hints, PSH_Hint_TableRec_::num_hints, PS_Hint_TableRec_::num_hints, PS_Mask_TableRec_::num_masks, PSH_Hint_TableRec_::num_zones, psh_hint_table_record(), psh_hint_table_record_mask(), PSH_Hint_TableRec_::sort, PSH_Hint_TableRec_::sort_global, PSH_Hint_TableRec_::zone, and PSH_Hint_TableRec_::zones.
Referenced by psh_glyph_init().
|
static |
Definition at line 99 of file pshalgo.c.
References FT_TRACE0, PSH_Hint_TableRec_::hints, idx, PSH_Hint_TableRec_::max_hints, PSH_Hint_TableRec_::num_hints, psh_hint_activate, psh_hint_is_active, psh_hint_overlap(), and PSH_Hint_TableRec_::sort_global.
Referenced by psh_hint_table_init(), and psh_hint_table_record_mask().
|
static |
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().