af_autofitter_load_glyph( AF_Module module, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ) { FT_Error error = FT_Err_Ok; FT_Memory memory = module->root.library->memory; #ifdef FT_DEBUG_AUTOFIT /* in debug mode, we use a global object that survives this routine */ AF_GlyphHints hints = _af_debug_hints_rec; AF_LoaderRec loader[1]; FT_UNUSED( size ); if ( hints->memory ) af_glyph_hints_done( hints ); af_glyph_hints_init( hints, memory ); af_loader_init( loader, hints ); error = af_loader_load_glyph( loader, module, slot->face, glyph_index, load_flags ); af_glyph_hints_dump_points( hints, 0 ); af_glyph_hints_dump_segments( hints, 0 ); af_glyph_hints_dump_edges( hints, 0 ); af_loader_done( loader ); return error; #else /* !FT_DEBUG_AUTOFIT */ AF_GlyphHintsRec hints[1]; AF_LoaderRec loader[1]; FT_UNUSED( size ); af_glyph_hints_init( hints, memory ); af_loader_init( loader, hints ); error = af_loader_load_glyph( loader, module, slot->face, glyph_index, load_flags ); af_loader_done( loader ); af_glyph_hints_done( hints ); return error; #endif /* !FT_DEBUG_AUTOFIT */ }
af_autofitter_init( FT_Module ft_module ) /* AF_Module */ { AF_Module module = (AF_Module)ft_module; module->fallback_style = AF_STYLE_FALLBACK; module->default_script = AF_SCRIPT_DEFAULT; return af_loader_init( module ); }
af_autofitter_init( FT_Autofitter module ) { return af_loader_init( module->loader, module->root.library->memory ); }
af_autofitter_init( AF_Module module ) { module->fallback_script = AF_SCRIPT_FALLBACK; return af_loader_init( module ); }