aflatin.c File Reference

#include <ft2build.h>
#include "aflatin.h"
#include "aferrors.h"

Go to the source code of this file.

Defines

#define AF_LATIN_MAX_TEST_CHARACTERS   12

Functions

 af_latin_metrics_init_widths (AF_LatinMetrics metrics, FT_Face face, FT_ULong charcode)
static void af_latin_metrics_init_blues (AF_LatinMetrics metrics, FT_Face face)
 af_latin_metrics_check_digits (AF_LatinMetrics metrics, FT_Face face)
 af_latin_metrics_init (AF_LatinMetrics metrics, FT_Face face)
static void af_latin_metrics_scale_dim (AF_LatinMetrics metrics, AF_Scaler scaler, AF_Dimension dim)
 af_latin_metrics_scale (AF_LatinMetrics metrics, AF_Scaler scaler)
 af_latin_hints_compute_segments (AF_GlyphHints hints, AF_Dimension dim)
 af_latin_hints_link_segments (AF_GlyphHints hints, AF_Dimension dim)
 af_latin_hints_compute_edges (AF_GlyphHints hints, AF_Dimension dim)
 af_latin_hints_detect_features (AF_GlyphHints hints, AF_Dimension dim)
 af_latin_hints_compute_blue_edges (AF_GlyphHints hints, AF_LatinMetrics metrics)
static FT_Error af_latin_hints_init (AF_GlyphHints hints, AF_LatinMetrics metrics)
static FT_Pos af_latin_snap_width (AF_Width widths, FT_Int count, FT_Pos width)
static FT_Pos af_latin_compute_stem_width (AF_GlyphHints hints, AF_Dimension dim, FT_Pos width, AF_Edge_Flags base_flags, AF_Edge_Flags stem_flags)
static void af_latin_align_linked_edge (AF_GlyphHints hints, AF_Dimension dim, AF_Edge base_edge, AF_Edge stem_edge)
static void af_latin_align_serif_edge (AF_GlyphHints hints, AF_Edge base, AF_Edge serif)
 af_latin_hint_edges (AF_GlyphHints hints, AF_Dimension dim)
static FT_Error af_latin_hints_apply (AF_GlyphHints hints, FT_Outline *outline, AF_LatinMetrics metrics)

Variables

static const char af_latin_blue_chars [AF_LATIN_MAX_BLUES][AF_LATIN_MAX_TEST_CHARACTERS+1]
static const AF_Script_UniRangeRec af_latin_uniranges []


Define Documentation

#define AF_LATIN_MAX_TEST_CHARACTERS   12

Definition at line 149 of file aflatin.c.

Referenced by af_latin2_metrics_init_blues(), and af_latin_metrics_init_blues().


Function Documentation

static void af_latin_align_linked_edge ( AF_GlyphHints  hints,
AF_Dimension  dim,
AF_Edge  base_edge,
AF_Edge  stem_edge 
) [static]

Definition at line 1655 of file aflatin.c.

References af_latin_compute_stem_width(), AF_LOG, AF_GlyphHintsRec_::axis, ROOT::Math::gv_detail::dist(), AF_AxisHintsRec_::edges, AF_EdgeRec_::flags, FT_Pos, AF_EdgeRec_::opos, and AF_EdgeRec_::pos.

Referenced by af_latin_hint_edges().

static void af_latin_align_serif_edge ( AF_GlyphHints  hints,
AF_Edge  base,
AF_Edge  serif 
) [static]

Definition at line 1678 of file aflatin.c.

References FT_UNUSED, AF_EdgeRec_::opos, and AF_EdgeRec_::pos.

static FT_Pos af_latin_compute_stem_width ( AF_GlyphHints  hints,
AF_Dimension  dim,
FT_Pos  width,
AF_Edge_Flags  base_flags,
AF_Edge_Flags  stem_flags 
) [static]

Definition at line 1490 of file aflatin.c.

References AF_DIMENSION_VERT, AF_EDGE_ROUND, AF_EDGE_SERIF, AF_LATIN_HINTS_DO_HORZ_SNAP, AF_LATIN_HINTS_DO_MONO, AF_LATIN_HINTS_DO_STEM_ADJUST, AF_LATIN_HINTS_DO_VERT_SNAP, af_latin_snap_width(), axis, ROOT::Math::gv_detail::dist(), FT_Pos, AF_GlyphHintsRec_::metrics, metrics(), and RootCsg::sign().

Referenced by af_latin_align_linked_edge().

af_latin_hint_edges ( AF_GlyphHints  hints,
AF_Dimension  dim 
)

Definition at line 1700 of file aflatin.c.

References AF_DIMENSION_VERT, AF_EDGE_DONE, AF_HINTS_DO_BLUES, af_latin_align_linked_edge(), AF_LOG, axis, blue, AF_EdgeRec_::blue_edge, AF_EdgeRec_::flags, if(), AF_EdgeRec_::link, NULL, and AF_EdgeRec_::opos.

Referenced by af_latin_hints_apply().

static FT_Error af_latin_hints_apply ( AF_GlyphHints  hints,
FT_Outline outline,
AF_LatinMetrics  metrics 
) [static]

Definition at line 2100 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_MAX, AF_DIMENSION_VERT, af_glyph_hints_align_edge_points(), af_glyph_hints_align_strong_points(), af_glyph_hints_align_weak_points(), af_glyph_hints_reload(), AF_HINTS_DO_HORIZONTAL, AF_HINTS_DO_VERTICAL, af_latin_hint_edges(), af_latin_hints_compute_blue_edges(), af_latin_hints_detect_features(), af_warper_compute(), error, FT_Pos, FT_RENDER_MODE_LIGHT, and metrics().

af_latin_hints_compute_blue_edges ( AF_GlyphHints  hints,
AF_LatinMetrics  metrics 
)

Definition at line 1264 of file aflatin.c.

References AF_DIMENSION_VERT, AF_EDGE_ROUND, AF_LATIN_BLUE_ACTIVE, AF_LATIN_BLUE_MAX, AF_LATIN_BLUE_TOP, axis, blue, AF_EdgeRec_::blue_edge, AF_LatinAxisRec_::blues, AF_EdgeRec_::dir, ROOT::Math::gv_detail::dist(), AF_EdgeRec_::flags, AF_EdgeRec_::fpos, FT_Bool, FT_BOOL, FT_MulFix(), FT_Pos, if(), NULL, and AF_LatinAxisRec_::scale.

Referenced by af_latin_hints_apply().

af_latin_hints_compute_edges ( AF_GlyphHints  hints,
AF_Dimension  dim 
)

Definition at line 964 of file aflatin.c.

References af_axis_hints_new_edge(), AF_DIMENSION_HORZ, AF_DIR_RIGHT, AF_DIR_UP, axis, AF_SegmentRec_::dir, dir(), ROOT::Math::gv_detail::dist(), AF_LatinAxisRec_::edge_distance_threshold, AF_SegmentRec_::edge_next, error, AF_SegmentRec_::first, for(), FT_DivFix(), FT_MulFix(), FT_Pos, FT_ZERO, AF_SegmentRec_::height, if(), AF_SegmentRec_::last, AF_SegmentRec_::pos, and AF_SegmentRec_::serif.

Referenced by af_latin_hints_detect_features().

af_latin_hints_compute_segments ( AF_GlyphHints  hints,
AF_Dimension  dim 
)

Definition at line 659 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_EDGE_NORMAL, axis, error, AF_SegmentRec_::flags, for(), FT_ABS, FT_Bool, FT_Pos, FT_ZERO, if(), NULL, AF_PointRec_::out_dir, AF_PointRec_::prev, and AF_SegmentRec_::score.

Referenced by af_latin_hints_detect_features(), and af_latin_metrics_init_widths().

af_latin_hints_detect_features ( AF_GlyphHints  hints,
AF_Dimension  dim 
)

Definition at line 1246 of file aflatin.c.

References af_latin_hints_compute_edges(), af_latin_hints_compute_segments(), af_latin_hints_link_segments(), and error.

Referenced by af_latin_hints_apply().

static FT_Error af_latin_hints_init ( AF_GlyphHints  hints,
AF_LatinMetrics  metrics 
) [static]

Definition at line 1361 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_VERT, af_glyph_hints_rescale(), AF_LATIN_HINTS_HORZ_SNAP, AF_LATIN_HINTS_MONO, AF_LATIN_HINTS_STEM_ADJUST, AF_LATIN_HINTS_VERT_SNAP, AF_SCALER_FLAG_NO_HORIZONTAL, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, FT_RENDER_MODE_NORMAL, FT_STYLE_FLAG_ITALIC, metrics(), AF_GlyphHintsRec_::other_flags, AF_GlyphHintsRec_::scaler_flags, AF_GlyphHintsRec_::x_delta, AF_GlyphHintsRec_::x_scale, AF_GlyphHintsRec_::y_delta, and AF_GlyphHintsRec_::y_scale.

af_latin_hints_link_segments ( AF_GlyphHints  hints,
AF_Dimension  dim 
)

Definition at line 878 of file aflatin.c.

References AF_LATIN_CONSTANT, axis, AF_SegmentRec_::dir, ROOT::Math::gv_detail::dist(), AF_SegmentRec_::first, for(), FT_Pos, if(), AF_SegmentRec_::last, len, AF_SegmentRec_::link, max, AF_SegmentRec_::max_coord, min, AF_SegmentRec_::min_coord, AF_SegmentRec_::pos, and AF_SegmentRec_::score.

Referenced by af_latin_hints_detect_features(), and af_latin_metrics_init_widths().

af_latin_metrics_check_digits ( AF_LatinMetrics  metrics,
FT_Face  face 
)

Definition at line 402 of file aflatin.c.

References FT_Bool, FT_Get_Advance(), FT_Get_Char_Index(), FT_LOAD_IGNORE_TRANSFORM, FT_LOAD_NO_HINTING, FT_LOAD_NO_SCALE, and i.

Referenced by af_latin_metrics_init().

af_latin_metrics_init ( AF_LatinMetrics  metrics,
FT_Face  face 
)

Definition at line 448 of file aflatin.c.

References af_latin_metrics_check_digits(), af_latin_metrics_init_blues(), af_latin_metrics_init_widths(), error, FT_ENCODING_ADOBE_LATIN_1, FT_ENCODING_ADOBE_STANDARD, FT_ENCODING_NONE, FT_ENCODING_UNICODE, FT_Select_Charmap(), and FT_Set_Charmap().

static void af_latin_metrics_init_blues ( AF_LatinMetrics  metrics,
FT_Face  face 
) [static]

Definition at line 165 of file aflatin.c.

References AF_DIMENSION_VERT, AF_LATIN_BLUE_ADJUSTMENT, af_latin_blue_chars, AF_LATIN_BLUE_MAX, AF_LATIN_BLUE_SMALL_TOP, AF_LATIN_BLUE_TOP, AF_LATIN_IS_TOP_BLUE, AF_LATIN_MAX_TEST_CHARACTERS, AF_LOG, af_sort_pos(), axis, blue, FT_Outline_::contours, ROOT::Math::gv_detail::dist(), error, FT_Bool, FT_BOOL, FT_CURVE_TAG, FT_CURVE_TAG_ON, FT_Get_Char_Index(), FT_Load_Glyph(), FT_LOAD_NO_SCALE, FT_Pos, metrics(), FT_Outline_::n_contours, FT_Outline_::n_points, FT_GlyphSlotRec_::outline, p, FT_Outline_::points, points, FT_Outline_::tags, POINT::y, and y.

Referenced by af_latin_metrics_init().

af_latin_metrics_init_widths ( AF_LatinMetrics  metrics,
FT_Face  face,
FT_ULong  charcode 
)

Definition at line 40 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_MAX, AF_DIMENSION_VERT, af_glyph_hints_init(), af_glyph_hints_reload(), af_glyph_hints_rescale(), AF_LATIN_CONSTANT, af_latin_hints_compute_segments(), af_latin_hints_link_segments(), AF_LATIN_MAX_WIDTHS, af_sort_widths(), axis, AF_GlyphHintsRec_::axis, ROOT::Math::gv_detail::dist(), dummy, error, AF_ScalerRec_::face, AF_ScalerRec_::flags, FT_Get_Char_Index(), FT_Load_Glyph(), FT_LOAD_NO_SCALE, FT_Pos, FT_RENDER_MODE_NORMAL, FT_ZERO, if(), RooFitShortHand::L(), AF_GlyphHintsRec_::memory, AF_ScalerRec_::render_mode, AF_ScalerRec_::x_delta, AF_ScalerRec_::x_scale, AF_ScalerRec_::y_delta, and AF_ScalerRec_::y_scale.

Referenced by af_latin_metrics_init().

af_latin_metrics_scale ( AF_LatinMetrics  metrics,
AF_Scaler  scaler 
)

Definition at line 639 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_VERT, and af_latin_metrics_scale_dim().

static void af_latin_metrics_scale_dim ( AF_LatinMetrics  metrics,
AF_Scaler  scaler,
AF_Dimension  dim 
) [static]

Definition at line 489 of file aflatin.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_VERT, AF_LATIN_BLUE_ADJUSTMENT, axis, blue, AF_LatinAxisRec_::blue_count, AF_LatinAxisRec_::blues, AF_LatinBlueRec_::flags, FT_MulDiv(), FT_MulFix(), FT_Pos, if(), metrics(), NULL, AF_ScalerRec_::x_delta, AF_ScalerRec_::x_scale, AF_ScalerRec_::y_delta, and AF_ScalerRec_::y_scale.

Referenced by af_latin_metrics_scale().

static FT_Pos af_latin_snap_width ( AF_Width  widths,
FT_Int  count,
FT_Pos  width 
) [static]

Definition at line 1443 of file aflatin.c.

References AF_WidthRec_::cur, ROOT::Math::gv_detail::dist(), FT_PIX_ROUND, FT_Pos, n, and w.

Referenced by af_latin_compute_stem_width().


Variable Documentation

const char af_latin_blue_chars[AF_LATIN_MAX_BLUES][AF_LATIN_MAX_TEST_CHARACTERS+1] [static]

Initial value:

  {
    "THEZOCQS",
    "HEZLOCUS",
    "fijkdbh",
    "xzroesc",
    "xzroesc",
    "pqgjy"
  }

Definition at line 153 of file aflatin.c.

Referenced by af_latin_metrics_init_blues().

const AF_Script_UniRangeRec af_latin_uniranges[] [static]

Initial value:

  {
    AF_UNIRANGE_REC(  0x0020UL,  0x007FUL ),  
    AF_UNIRANGE_REC(  0x00A0UL,  0x00FFUL ),  
    AF_UNIRANGE_REC(  0x0100UL,  0x017FUL ),  
    AF_UNIRANGE_REC(  0x0180UL,  0x024FUL ),  
    AF_UNIRANGE_REC(  0x0250UL,  0x02AFUL ),  
    AF_UNIRANGE_REC(  0x02B0UL,  0x02FFUL ),  
    AF_UNIRANGE_REC(  0x0300UL,  0x036FUL ),  
    AF_UNIRANGE_REC(  0x0370UL,  0x03FFUL ),  
    AF_UNIRANGE_REC(  0x0400UL,  0x04FFUL ),  
    AF_UNIRANGE_REC(  0x0500UL,  0x052FUL ),  
    AF_UNIRANGE_REC(  0x1D00UL,  0x1D7FUL ),  
    AF_UNIRANGE_REC(  0x1D80UL,  0x1DBFUL ),  
    AF_UNIRANGE_REC(  0x1DC0UL,  0x1DFFUL ),  
    AF_UNIRANGE_REC(  0x1E00UL,  0x1EFFUL ),  
    AF_UNIRANGE_REC(  0x1F00UL,  0x1FFFUL ),  
    AF_UNIRANGE_REC(  0x2000UL,  0x206FUL ),  
    AF_UNIRANGE_REC(  0x2070UL,  0x209FUL ),  
    AF_UNIRANGE_REC(  0x20A0UL,  0x20CFUL ),  
    AF_UNIRANGE_REC(  0x2150UL,  0x218FUL ),  
    AF_UNIRANGE_REC(  0x2460UL,  0x24FFUL ),  
    AF_UNIRANGE_REC(  0x2C60UL,  0x2C7FUL ),  
    AF_UNIRANGE_REC(  0x2DE0UL,  0x2DFFUL ),  
    AF_UNIRANGE_REC(  0xA640UL,  0xA69FUL ),  
    AF_UNIRANGE_REC(  0xA720UL,  0xA7FFUL ),  
    AF_UNIRANGE_REC(  0xFB00UL,  0xFB06UL ),  
    AF_UNIRANGE_REC( 0x1D400UL, 0x1D7FFUL ),  

  }

Definition at line 2180 of file aflatin.c.


Generated on Tue Jul 5 15:58:21 2011 for ROOT_528-00b_version by  doxygen 1.5.1