c3b2160869
Cleaning up of ChangeLog. * docs/license.txt: s/X Windows/X Window System/. * src/raster/ftraster.c: Fix definition condition of MEM_Set(). * src/smooth/ftgrays.c (M_Y): Change value to 192. * src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter. Remove unused variable. * src/cache/ftcimage.c (ftc_image_node_init, ftc_image_node_compare): Remove unused variables. * src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused variable. * src/raster/ftraster.c (MEM_Set): Move definition down to avoid compiler warning. * src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to avoid compiler warnings. * src/pcf/pcfread.c (tableNames): Use `const'. (pcf_read_TOC): Change counter name to avoid compiler warning. Use `const'. * src/pshinter/pshrec.c (ps_hints_close): Remove redundant declaration. * src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables to avoid shadowing. * src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto. * src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()' and `T1_Size_Done()'.
121 lines
3.4 KiB
C
121 lines
3.4 KiB
C
/***************************************************************************/
|
|
/* */
|
|
/* pshmod.c */
|
|
/* */
|
|
/* FreeType PostScript hinter module implementation (body). */
|
|
/* */
|
|
/* Copyright 2001 by */
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
/* */
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
/* this file you indicate that you have read the license and */
|
|
/* understand and accept it fully. */
|
|
/* */
|
|
/***************************************************************************/
|
|
|
|
|
|
#include <ft2build.h>
|
|
#include FT_INTERNAL_OBJECTS_H
|
|
#include "pshrec.h"
|
|
#include "pshalgo.h"
|
|
|
|
|
|
/* the Postscript Hinter module structure */
|
|
typedef struct PS_Hinter_Module_Rec_
|
|
{
|
|
FT_ModuleRec root;
|
|
PS_HintsRec ps_hints;
|
|
|
|
PSH_Globals_FuncsRec globals_funcs;
|
|
T1_Hints_FuncsRec t1_funcs;
|
|
T2_Hints_FuncsRec t2_funcs;
|
|
|
|
} PS_Hinter_ModuleRec, *PS_Hinter_Module;
|
|
|
|
|
|
/* finalize module */
|
|
FT_CALLBACK_DEF( void )
|
|
ps_hinter_done( PS_Hinter_Module module )
|
|
{
|
|
module->t1_funcs.hints = NULL;
|
|
module->t2_funcs.hints = NULL;
|
|
|
|
ps_hints_done( &module->ps_hints );
|
|
}
|
|
|
|
|
|
/* initialize module, create hints recorder and the interface */
|
|
FT_CALLBACK_DEF( FT_Error )
|
|
ps_hinter_init( PS_Hinter_Module module )
|
|
{
|
|
FT_Memory memory = module->root.memory;
|
|
|
|
|
|
ps_hints_init( &module->ps_hints, memory );
|
|
|
|
psh_globals_funcs_init( &module->globals_funcs );
|
|
|
|
t1_hints_funcs_init( &module->t1_funcs );
|
|
module->t1_funcs.hints = (T1_Hints)&module->ps_hints;
|
|
|
|
t2_hints_funcs_init( &module->t2_funcs );
|
|
module->t2_funcs.hints = (T2_Hints)&module->ps_hints;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
/* returns global hints interface */
|
|
FT_CALLBACK_DEF( PSH_Globals_Funcs )
|
|
pshinter_get_globals_funcs( FT_Module module )
|
|
{
|
|
return &((PS_Hinter_Module)module)->globals_funcs;
|
|
}
|
|
|
|
|
|
/* return Type 1 hints interface */
|
|
FT_CALLBACK_DEF( T1_Hints_Funcs )
|
|
pshinter_get_t1_funcs( FT_Module module )
|
|
{
|
|
return &((PS_Hinter_Module)module)->t1_funcs;
|
|
}
|
|
|
|
|
|
/* return Type 2 hints interface */
|
|
FT_CALLBACK_DEF( T2_Hints_Funcs )
|
|
pshinter_get_t2_funcs( FT_Module module )
|
|
{
|
|
return &((PS_Hinter_Module)module)->t2_funcs;
|
|
}
|
|
|
|
|
|
FT_CALLBACK_DEF( PSHinter_Interface )
|
|
pshinter_interface =
|
|
{
|
|
pshinter_get_globals_funcs,
|
|
pshinter_get_t1_funcs,
|
|
pshinter_get_t2_funcs
|
|
};
|
|
|
|
|
|
FT_CALLBACK_TABLE_DEF
|
|
const FT_Module_Class pshinter_module_class =
|
|
{
|
|
0,
|
|
sizeof ( PS_Hinter_ModuleRec ),
|
|
"pshinter",
|
|
0x10000L,
|
|
0x20000L,
|
|
|
|
&pshinter_interface, /* module-specific interface */
|
|
|
|
(FT_Module_Constructor)ps_hinter_init,
|
|
(FT_Module_Destructor) ps_hinter_done,
|
|
(FT_Module_Requester) 0 /* no additional interface for now */
|
|
};
|
|
|
|
|
|
/* END */
|