39#include FT_INTERNAL_OBJECTS_H
40#include FT_INTERNAL_DEBUG_H
44#ifdef FT_DEBUG_AUTOFIT
45#include FT_CONFIG_STANDARD_LIBRARY_H
59#ifdef FT_DEBUG_AUTOFIT
61extern int _af_debug_disable_horz_hints;
62extern int _af_debug_disable_vert_hints;
63extern int _af_debug_disable_blue_hints;
64extern void* _af_debug_hints;
113#define AF_ANGLE_PI 256
114#define AF_ANGLE_2PI ( AF_ANGLE_PI * 2 )
115#define AF_ANGLE_PI2 ( AF_ANGLE_PI / 2 )
116#define AF_ANGLE_PI4 ( AF_ANGLE_PI / 4 )
138#define AF_ANGLE_DIFF( result, angle1, angle2 ) \
140 AF_Angle _delta = (angle2) - (angle1); \
143 while ( _delta <= -AF_ANGLE_PI ) \
144 _delta += AF_ANGLE_2PI; \
146 while ( _delta > AF_ANGLE_PI ) \
147 _delta -= AF_ANGLE_2PI; \
172#define AF_SCALER_FLAG_NO_HORIZONTAL 1U
173#define AF_SCALER_FLAG_NO_VERTICAL 2U
174#define AF_SCALER_FLAG_NO_ADVANCE 4U
175#define AF_SCALER_FLAG_NO_WARPER 8U
191#define AF_SCALER_EQUAL_SCALES( a, b ) \
192 ( (a)->x_scale == (b)->x_scale && \
193 (a)->y_scale == (b)->y_scale && \
194 (a)->x_delta == (b)->x_delta && \
195 (a)->y_delta == (b)->y_delta )
260#define WRITING_SYSTEM( ws, WS ) \
261 AF_WRITING_SYSTEM_ ## WS,
312#define SCRIPT( s, S, d, h, H, ss ) \
333#define AF_UNIRANGE_REC( a, b ) { (FT_UInt32)(a), (FT_UInt32)(b) }
403#define COVERAGE( name, NAME, description, \
404 tag1, tag2, tag3, tag4 ) \
405 AF_COVERAGE_ ## NAME,
431#define STYLE( s, S, d, ws, sc, ss, c ) \
484#define AF_HINTING_BOTTOM_TO_TOP 0
485#define AF_HINTING_TOP_TO_BOTTOM 1
489#ifndef FT_CONFIG_OPTION_PIC
491#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \
492 FT_CALLBACK_TABLE const AF_WritingSystemClassRec \
493 writing_system_class;
495#define AF_DEFINE_WRITING_SYSTEM_CLASS( \
496 writing_system_class, \
505 FT_CALLBACK_TABLE_DEF \
506 const AF_WritingSystemClassRec writing_system_class = \
522#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
523 FT_CALLBACK_TABLE const AF_ScriptClassRec \
526#define AF_DEFINE_SCRIPT_CLASS( \
533 FT_CALLBACK_TABLE_DEF \
534 const AF_ScriptClassRec script_class = \
544#define AF_DECLARE_STYLE_CLASS( style_class ) \
545 FT_CALLBACK_TABLE const AF_StyleClassRec \
548#define AF_DEFINE_STYLE_CLASS( \
555 FT_CALLBACK_TABLE_DEF \
556 const AF_StyleClassRec style_class = \
567#define AF_DECLARE_WRITING_SYSTEM_CLASS( writing_system_class ) \
569 FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac );
571#define AF_DEFINE_WRITING_SYSTEM_CLASS( \
572 writing_system_class, \
581 FT_LOCAL_DEF( void ) \
582 FT_Init_Class_ ## writing_system_class( AF_WritingSystemClassRec* ac ) \
584 ac->writing_system = system; \
586 ac->style_metrics_size = m_size; \
588 ac->style_metrics_init = m_init; \
589 ac->style_metrics_scale = m_scale; \
590 ac->style_metrics_done = m_done; \
591 ac->style_metrics_getstdw = m_stdw; \
593 ac->style_hints_init = h_init; \
594 ac->style_hints_apply = h_apply; \
598#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
600 FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac );
602#define AF_DEFINE_SCRIPT_CLASS( \
609 FT_LOCAL_DEF( void ) \
610 FT_Init_Class_ ## script_class( AF_ScriptClassRec* ac ) \
612 ac->script = script_; \
613 ac->script_uni_ranges = ranges; \
614 ac->script_uni_nonbase_ranges = nonbase_ranges; \
615 ac->top_to_bottom_hinting = top_to_bottom; \
616 ac->standard_charstring = std_charstring; \
620#define AF_DECLARE_STYLE_CLASS( style_class ) \
622 FT_Init_Class_ ## style_class( AF_StyleClassRec* ac );
624#define AF_DEFINE_STYLE_CLASS( \
631 FT_LOCAL_DEF( void ) \
632 FT_Init_Class_ ## style_class( AF_StyleClassRec* ac ) \
634 ac->style = style_; \
635 ac->writing_system = writing_system_; \
636 ac->script = script_; \
637 ac->blue_stringset = blue_stringset_; \
638 ac->coverage = coverage_; \
enum AF_Blue_Stringset_ AF_Blue_Stringset
struct AF_StyleMetricsRec_ * AF_StyleMetrics
const AF_ScriptClassRec * AF_ScriptClass
const AF_StyleClassRec * AF_StyleClass
struct AF_FaceGlobalsRec_ * AF_FaceGlobals
FT_Error(* AF_WritingSystem_InitMetricsFunc)(AF_StyleMetrics metrics, FT_Face face)
void(* AF_WritingSystem_ScaleMetricsFunc)(AF_StyleMetrics metrics, AF_Scaler scaler)
struct AF_StyleMetricsRec_ AF_StyleMetricsRec
enum AF_Script_ AF_Script
struct AF_ScriptClassRec_ AF_ScriptClassRec
af_sort_pos(FT_UInt count, FT_Pos *table)
struct AF_WritingSystemClassRec_ AF_WritingSystemClassRec
FT_BEGIN_HEADER struct AF_WidthRec_ AF_WidthRec
struct AF_StyleClassRec_ AF_StyleClassRec
FT_BEGIN_HEADER struct AF_WidthRec_ * AF_Width
void(* AF_WritingSystem_DoneMetricsFunc)(AF_StyleMetrics metrics)
const AF_WritingSystemClassRec * AF_WritingSystemClass
const AF_Script_UniRangeRec * AF_Script_UniRange
FT_Error(* AF_WritingSystem_InitHintsFunc)(AF_GlyphHints hints, AF_StyleMetrics metrics)
struct AF_ScalerRec_ * AF_Scaler
FT_Error(* AF_WritingSystem_ApplyHintsFunc)(FT_UInt glyph_index, AF_GlyphHints hints, FT_Outline *outline, AF_StyleMetrics metrics)
struct AF_GlyphHintsRec_ * AF_GlyphHints
struct AF_ScalerRec_ AF_ScalerRec
enum AF_WritingSystem_ AF_WritingSystem
enum AF_Coverage_ AF_Coverage
struct AF_Script_UniRangeRec_ AF_Script_UniRangeRec
af_sort_and_quantize_widths(FT_UInt *count, AF_Width widths, FT_Pos threshold)
void(* AF_WritingSystem_GetStdWidthsFunc)(AF_StyleMetrics metrics, FT_Pos *stdHW, FT_Pos *stdVW)
enum FT_Render_Mode_ FT_Render_Mode
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
namespace GUID const ADDRINFOEXW * hints
FT_Render_Mode render_mode
const char * standard_charstring
FT_Bool top_to_bottom_hinting
AF_Script_UniRange script_uni_nonbase_ranges
AF_Script_UniRange script_uni_ranges
AF_WritingSystem writing_system
AF_Blue_Stringset blue_stringset
FT_Bool digits_have_same_width
AF_StyleClass style_class
AF_WritingSystem_InitHintsFunc style_hints_init
AF_WritingSystem writing_system
AF_WritingSystem_DoneMetricsFunc style_metrics_done
AF_WritingSystem_GetStdWidthsFunc style_metrics_getstdw
AF_WritingSystem_ScaleMetricsFunc style_metrics_scale
AF_WritingSystem_ApplyHintsFunc style_hints_apply
FT_Offset style_metrics_size
AF_WritingSystem_InitMetricsFunc style_metrics_init