32 FT_Memory memory = module->root.library->memory;
38 #ifdef FT_DEBUG_AUTOFIT 39 _af_debug_hints = &loader->
hints;
67 face->autohint.finalizer =
89 #ifdef FT_DEBUG_AUTOFIT 90 _af_debug_hints =
NULL;
183 if ( metrics->
clazz->script_hints_apply )
184 metrics->
clazz->script_hints_apply( hints,
185 &gloader->current.outline,
192 FT_Pos old_rsb, old_lsb, new_lsb;
202 old_rsb = loader->
pp2.
x - edge2->
opos;
203 old_lsb = edge1->
opos;
204 new_lsb = edge1->
pos;
209 pp1x_uh = new_lsb - old_lsb;
210 pp2x_uh = edge2->
pos + old_rsb;
224 if ( loader->
pp1.
x >= new_lsb && old_lsb > 0 )
227 if ( loader->
pp2.
x <= edge2->
pos && old_rsb > 0 )
263 case FT_GLYPH_FORMAT_COMPOSITE:
266 FT_UInt num_base_subgs, start_point;
270 start_point = gloader->base.outline.n_points;
281 gloader->current.num_subglyphs = num_subglyphs;
282 num_base_subgs = gloader->base.num_subglyphs;
285 for ( nn = 0; nn < num_subglyphs; nn++ )
289 FT_UInt num_points, num_new_points, num_base_points;
295 subglyph = gloader->base.subglyphs + num_base_subgs + nn;
300 num_base_points = gloader->base.outline.n_points;
302 error = af_loader_load_g( loader, scaler, subglyph->
index,
303 load_flags, depth + 1 );
308 subglyph = gloader->base.subglyphs + num_base_subgs + nn;
321 num_points = gloader->base.outline.n_points;
322 num_new_points = num_points - num_base_points;
330 FT_Vector* cur = gloader->base.outline.points +
335 for ( ; cur <
limit; cur++ )
349 if ( start_point + k >= num_base_points ||
352 error =
FT_THROW( Invalid_Composite );
356 l += num_base_points;
360 p1 = gloader->base.outline.points + start_point + k;
361 p2 = gloader->base.outline.points + start_point + l;
379 dummy.
points += num_base_points;
380 dummy.
n_points = (short)num_new_points;
390 error =
FT_THROW( Unimplemented_Feature );
458 if ( slot->
metrics.horiAdvance )
478 slot->
outline.
points =
internal->loader->base.outline.points;
479 slot->
outline.
tags =
internal->loader->base.outline.tags;
505 return FT_THROW( Invalid_Argument );
525 #ifdef FT_OPTION_AUTOFIT2 527 if ( load_flags & ( 1UL << 20 ) )
537 if ( metrics->
clazz->script_metrics_scale )
538 metrics->
clazz->script_metrics_scale( metrics, &scaler );
545 if ( metrics->
clazz->script_hints_init )
553 error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 );
af_glyph_hints_done(AF_GlyphHints hints)
FT_BEGIN_HEADER typedef signed long FT_Pos
#define FT_SUBGLYPH_FLAG_SCALE
FT_Bool digits_have_same_width
typedefFT_BEGIN_HEADER struct AF_ModuleRec_ * AF_Module
GLint GLint GLsizei GLsizei GLsizei depth
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS
GLint GLint GLint GLint GLint GLint y
#define FT_ARRAY_COPY(dest, source, count)
af_glyph_hints_init(AF_GlyphHints hints, FT_Memory memory)
void(* FT_Generic_Finalizer)(void *object)
return FT_THROW(Missing_Property)
GLint GLint GLint GLint GLint x
FT_GlyphLoader_New(FT_Memory memory, FT_GlyphLoader *aloader)
FT_GlyphLoader_CopyPoints(FT_GlyphLoader target, FT_GlyphLoader source)
af_face_globals_new(FT_Face face, AF_FaceGlobals *aglobals, AF_Module module)
#define FT_LOAD_LINEAR_DESIGN
GLenum GLuint GLint GLenum face
#define FT_SUBGLYPH_FLAG_2X2
af_loader_init(AF_Module module)
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
FT_GlyphLoader_Add(FT_GlyphLoader loader)
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
af_loader_reset(AF_Module module, FT_Face face)
FT_GlyphLoader_Done(FT_GlyphLoader loader)
#define FT_IS_FIXED_WIDTH(face)
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
#define FT_SUBGLYPH_FLAG_XY_SCALE
af_face_globals_free(AF_FaceGlobals globals)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_MulFix(FT_Long a, FT_Long b)
af_loader_load_glyph(AF_Module module, FT_Face face, FT_UInt gindex, FT_Int32 load_flags)
af_loader_done(AF_Module module)
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
af_face_globals_is_digit(AF_FaceGlobals globals, FT_UInt gindex)
struct AF_FaceGlobalsRec_ * AF_FaceGlobals
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
FT_Slot_Internal internal
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
AF_AxisHintsRec axis[AF_DIMENSION_MAX]
FT_Matrix_Invert(FT_Matrix *matrix)
#define AF_HINTS_DO_ADVANCE(h)
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
FT_Render_Mode render_mode
#define FT_LOAD_IGNORE_TRANSFORM
#define FT_GLYPHLOADER_CHECK_POINTS(_loader, _points, _contours)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
af_face_globals_get_metrics(AF_FaceGlobals globals, FT_UInt gindex, FT_UInt options, AF_ScriptMetrics *ametrics)
#define FT_LOAD_TARGET_MODE(x)