zenilib: zenilib/jni/external/freetype2/src/autofit/afhints.h File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros | Typedefs | Enumerations | Functions
afhints.h File Reference
`#include "aftypes.h"`

Go to the source code of this file.

## Classes

struct | AF_AxisHintsRec_
struct | AF_EdgeRec_
struct | AF_GlyphHintsRec_
struct | AF_PointRec_
struct | AF_SegmentRec_

## Macros

#define | AF_HINTS_DO_ADVANCE(h) !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_ADVANCE )
#define | AF_HINTS_DO_BLUES(h) 1
#define | AF_HINTS_DO_HORIZONTAL(h) !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_HORIZONTAL )
#define | AF_HINTS_DO_VERTICAL(h) !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_VERTICAL )
#define | AF_HINTS_TEST_OTHER(h, f) ( (h)->other_flags & (f) )
#define | AF_HINTS_TEST_SCALER(h, f) ( (h)->scaler_flags & (f) )
#define | AF_SEGMENT_DIST(seg1, seg2)
#define | AF_SEGMENT_LEN(seg) ( (seg)->max_coord - (seg)->min_coord )
#define | xxAF_SORT_SEGMENTS

## Typedefs

typedef struct AF_AxisHintsRec_ * | AF_AxisHints
typedef struct AF_AxisHintsRec_ | AF_AxisHintsRec
typedef FT_BEGIN_HEADER enum AF_Dimension_ | AF_Dimension
typedef enum AF_Direction_ | AF_Direction
typedef struct AF_EdgeRec_ * | AF_Edge
typedef enum AF_Edge_Flags_ | AF_Edge_Flags
typedef struct AF_EdgeRec_ | AF_EdgeRec
typedef enum AF_Flags_ | AF_Flags
typedef struct AF_GlyphHintsRec_ | AF_GlyphHintsRec
typedef struct AF_PointRec_ * | AF_Point
typedef struct AF_PointRec_ | AF_PointRec
typedef struct AF_SegmentRec_ * | AF_Segment
typedef struct AF_SegmentRec_ | AF_SegmentRec

## Enumerations

enum | AF_Dimension_ { AF_DIMENSION_HORZ = 0, AF_DIMENSION_VERT = 1, AF_DIMENSION_MAX }
enum | AF_Direction_ { AF_DIR_NONE = 4, AF_DIR_RIGHT = 1, AF_DIR_LEFT = -1, AF_DIR_UP = 2, AF_DIR_DOWN = -2 }
enum | AF_Edge_Flags_ { AF_EDGE_NORMAL = 0, AF_EDGE_ROUND = 1 << 0, AF_EDGE_SERIF = 1 << 1, AF_EDGE_DONE = 1 << 2 }

enum

AF_Flags_ {
AF_FLAG_NONE = 0, AF_FLAG_CONIC = 1 << 0, AF_FLAG_CUBIC = 1 << 1, AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC,
AF_FLAG_EXTREMA_X = 1 << 2, AF_FLAG_EXTREMA_Y = 1 << 3, AF_FLAG_ROUND_X = 1 << 4, AF_FLAG_ROUND_Y = 1 << 5,
AF_FLAG_TOUCH_X = 1 << 6, AF_FLAG_TOUCH_Y = 1 << 7, AF_FLAG_WEAK_INTERPOLATION = 1 << 8, AF_FLAG_INFLECTION = 1 << 9
}

## Functions

| af_axis_hints_new_edge (AF_AxisHints axis, FT_Int fpos, AF_Direction dir, FT_Memory memory, AF_Edge *edge)
| af_axis_hints_new_segment (AF_AxisHints axis, FT_Memory memory, AF_Segment *asegment)
| af_direction_compute (FT_Pos dx, FT_Pos dy)
| af_glyph_hints_align_edge_points (AF_GlyphHints hints, AF_Dimension dim)
| af_glyph_hints_align_strong_points (AF_GlyphHints hints, AF_Dimension dim)
| af_glyph_hints_align_weak_points (AF_GlyphHints hints, AF_Dimension dim)
| af_glyph_hints_done (AF_GlyphHints hints)
| af_glyph_hints_init (AF_GlyphHints hints, FT_Memory memory)
| af_glyph_hints_reload (AF_GlyphHints hints, FT_Outline *outline)
| af_glyph_hints_rescale (AF_GlyphHints hints, AF_ScriptMetrics metrics)
| af_glyph_hints_save (AF_GlyphHints hints, FT_Outline *outline)

## Macro Definition Documentation

#define AF_HINTS_DO_ADVANCE | ( |  | h | ) | !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_ADVANCE )

Definition at line 389 of file afhints.h.

Referenced by af_loader_load_g().

#define AF_HINTS_DO_BLUES | ( |  | h | ) | 1

Definition at line 392 of file afhints.h.

Referenced by af_latin2_hint_edges(), and af_latin_hint_edges().

#define AF_HINTS_DO_HORIZONTAL | ( |  | h | ) | !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_HORIZONTAL )

Definition at line 383 of file afhints.h.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().

#define AF_HINTS_DO_VERTICAL | ( |  | h | ) | !AF_HINTS_TEST_SCALER( h, AF_SCALER_FLAG_NO_VERTICAL )

Definition at line 386 of file afhints.h.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().

#define AF_HINTS_TEST_OTHER | ( |  | h,
|  |  | f
| ) |  | ( (h)->other_flags & (f) )

Definition at line 363 of file afhints.h.

#define AF_HINTS_TEST_SCALER | ( |  | h,
|  |  | f
| ) |  | ( (h)->scaler_flags & (f) )

Definition at line 362 of file afhints.h.

#define AF_SEGMENT_DIST | ( |  | seg1,
|  |  | seg2
| ) |  |

Value:
( ( (seg1)->pos > (seg2)->pos ) \
? (seg1)->pos - (seg2)->pos \
: (seg2)->pos - (seg1)->pos )

Definition at line 457 of file afhints.h.

#define AF_SEGMENT_LEN | ( |  | seg | ) | ( (seg)->max_coord - (seg)->min_coord )

Definition at line 455 of file afhints.h.

#define xxAF_SORT_SEGMENTS

Definition at line 24 of file afhints.h.

## Typedef Documentation

typedef struct AF_AxisHintsRec_ * AF_AxisHints

typedef struct AF_AxisHintsRec_ AF_AxisHintsRec

typedef FT_BEGIN_HEADER enum AF_Dimension_ AF_Dimension

typedef enum AF_Direction_ AF_Direction

typedef struct AF_EdgeRec_* AF_Edge

Definition at line 247 of file afhints.h.

typedef enum AF_Edge_Flags_ AF_Edge_Flags

typedef struct AF_EdgeRec_ AF_EdgeRec

typedef enum AF_Flags_ AF_Flags

typedef struct AF_GlyphHintsRec_ AF_GlyphHintsRec

typedef struct AF_PointRec_* AF_Point

Definition at line 245 of file afhints.h.

typedef struct AF_PointRec_ AF_PointRec

typedef struct AF_SegmentRec_* AF_Segment

Definition at line 246 of file afhints.h.

typedef struct AF_SegmentRec_ AF_SegmentRec

## Enumeration Type Documentation

enum AF_Dimension_

Enumerator
AF_DIMENSION_HORZ |
AF_DIMENSION_VERT |
AF_DIMENSION_MAX |

Definition at line 33 of file afhints.h.

enum AF_Direction_

Enumerator
AF_DIR_NONE |
AF_DIR_RIGHT |
AF_DIR_LEFT |
AF_DIR_UP |
AF_DIR_DOWN |

Definition at line 47 of file afhints.h.

enum AF_Edge_Flags_

Enumerator
AF_EDGE_NORMAL |
AF_EDGE_ROUND |
AF_EDGE_SERIF |
AF_EDGE_DONE |

Definition at line 235 of file afhints.h.

enum AF_Flags_

Enumerator
AF_FLAG_NONE |
AF_FLAG_CONIC |
AF_FLAG_CUBIC |
AF_FLAG_CONTROL |
AF_FLAG_EXTREMA_X |
AF_FLAG_EXTREMA_Y |
AF_FLAG_ROUND_X |
AF_FLAG_ROUND_Y |
AF_FLAG_TOUCH_X |
AF_FLAG_TOUCH_Y |
AF_FLAG_WEAK_INTERPOLATION |
AF_FLAG_INFLECTION |

Definition at line 204 of file afhints.h.

## Function Documentation

af_axis_hints_new_edge | ( | AF_AxisHints | axis,
|  | FT_Int | fpos,
|  | AF_Direction | dir,
|  | FT_Memory | memory,
|  | AF_Edge * | edge
| ) |  |

Definition at line 69 of file afhints.c.

References AF_EdgeRec_::dir, error, AF_EdgeRec_::fpos, FT_INT_MAX, FT_RENEW_ARRAY, FT_ZERO, and NULL.

Referenced by af_latin2_hints_compute_edges(), and af_latin_hints_compute_edges().

af_axis_hints_new_segment | ( | AF_AxisHints | axis,
|  | FT_Memory | memory,
|  | AF_Segment * | asegment
| ) |  |

Definition at line 27 of file afhints.c.

References error, FT_INT_MAX, FT_RENEW_ARRAY, and NULL.

Referenced by af_latin2_hints_compute_segments(), and af_latin_hints_compute_segments().

af_direction_compute | ( | FT_Pos | dx,
|  | FT_Pos | dy
| ) |  |

Definition at line 459 of file afhints.c.

References AF_DIR_DOWN, AF_DIR_LEFT, AF_DIR_NONE, AF_DIR_RIGHT, AF_DIR_UP, FT_ABS, and FT_Pos.

Referenced by af_glyph_hints_reload().

af_glyph_hints_align_edge_points | ( | AF_GlyphHints | hints,
|  | AF_Dimension | dim
| ) |  |

Definition at line 814 of file afhints.c.

References AF_DIMENSION_HORZ, AF_FLAG_TOUCH_X, AF_FLAG_TOUCH_Y, AF_SegmentRec_::edge, AF_SegmentRec_::first, AF_PointRec_::flags, AF_SegmentRec_::last, AF_PointRec_::next, NULL, AF_AxisHintsRec_::num_segments, AF_EdgeRec_::pos, AF_AxisHintsRec_::segments, AF_PointRec_::x, and AF_PointRec_::y.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().

af_glyph_hints_align_strong_points | ( | AF_GlyphHints | hints,
|  | AF_Dimension | dim
| ) |  |

Definition at line 889 of file afhints.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_VERT, AF_FLAG_INFLECTION, AF_FLAG_TOUCH_X, AF_FLAG_TOUCH_Y, AF_FLAG_WEAK_INTERPOLATION, AF_AxisHintsRec_::edges, AF_PointRec_::flags, AF_EdgeRec_::fpos, FT_DivFix(), FT_MulFix(), FT_Pos, AF_PointRec_::fx, AF_PointRec_::fy, max, min, AF_AxisHintsRec_::num_edges, AF_EdgeRec_::opos, AF_PointRec_::ox, AF_PointRec_::oy, AF_EdgeRec_::pos, AF_EdgeRec_::scale, u, AF_PointRec_::x, and AF_PointRec_::y.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().

af_glyph_hints_align_weak_points | ( | AF_GlyphHints | hints,
|  | AF_Dimension | dim
| ) |  |

Definition at line 1144 of file afhints.c.

References AF_DIMENSION_HORZ, AF_FLAG_TOUCH_X, AF_FLAG_TOUCH_Y, af_iup_interp(), af_iup_shift(), AF_PointRec_::flags, FT_ASSERT, AF_PointRec_::ox, AF_PointRec_::oy, AF_PointRec_::prev, AF_PointRec_::u, AF_PointRec_::v, AF_PointRec_::x, and AF_PointRec_::y.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().

af_glyph_hints_done | ( | AF_GlyphHints | hints | ) |

Definition at line 517 of file afhints.c.

References AF_DIMENSION_MAX, AF_AxisHintsRec_::edges, FT_FREE, AF_AxisHintsRec_::max_edges, AF_AxisHintsRec_::max_segments, NULL, AF_AxisHintsRec_::num_edges, AF_AxisHintsRec_::num_segments, and AF_AxisHintsRec_::segments.

Referenced by af_latin2_metrics_init_widths(), af_latin_metrics_init_widths(), and af_loader_done().

af_glyph_hints_init | ( | AF_GlyphHints | hints,
|  | FT_Memory | memory
| ) |  |

Definition at line 508 of file afhints.c.

References FT_ZERO.

Referenced by af_latin2_metrics_init_widths(), af_latin_metrics_init_widths(), and af_loader_init().

af_glyph_hints_reload | ( | AF_GlyphHints | hints,
|  | FT_Outline * | outline
| ) |  |

Definition at line 571 of file afhints.c.

References AF_DIMENSION_HORZ, AF_DIMENSION_VERT, AF_DIR_DOWN, AF_DIR_LEFT, AF_DIR_NONE, AF_DIR_RIGHT, AF_DIR_UP, af_direction_compute(), AF_FLAG_CONIC, AF_FLAG_CUBIC, AF_FLAG_NONE, AF_FLAG_WEAK_INTERPOLATION, error, AF_PointRec_::flags, ft_corner_is_flat(), FT_CURVE_TAG, FT_CURVE_TAG_CONIC, FT_CURVE_TAG_CUBIC, FT_MulFix(), FT_ORIENTATION_POSTSCRIPT, FT_Outline_Get_Orientation(), FT_Pos, FT_RENEW_ARRAY, AF_PointRec_::fx, AF_PointRec_::fy, idx, if(), AF_PointRec_::in_dir, AF_PointRec_::next, NULL, AF_PointRec_::out_dir, AF_PointRec_::ox, AF_PointRec_::oy, AF_PointRec_::prev, vec, AF_PointRec_::x, and AF_PointRec_::y.

Referenced by af_latin2_hints_apply(), af_latin2_metrics_init_widths(), af_latin_hints_apply(), and af_latin_metrics_init_widths().

af_glyph_hints_rescale | ( | AF_GlyphHints | hints,
|  | AF_ScriptMetrics | metrics
| ) |  |

Definition at line 559 of file afhints.c.

Referenced by af_dummy_hints_init(), af_latin2_hints_init(), af_latin2_metrics_init_widths(), af_latin_hints_init(), and af_latin_metrics_init_widths().

af_glyph_hints_save | ( | AF_GlyphHints | hints,
|  | FT_Outline * | outline
| ) |  |

Definition at line 779 of file afhints.c.

References AF_FLAG_CONIC, AF_FLAG_CUBIC, AF_PointRec_::flags, FT_CURVE_TAG_CONIC, FT_CURVE_TAG_CUBIC, FT_CURVE_TAG_ON, vec, FT_Vector_::x, AF_PointRec_::x, and AF_PointRec_::y.

Referenced by af_latin2_hints_apply(), and af_latin_hints_apply().