[tfm] Define `tfm_module_class' and `tfm_interface'.

* src/tfm/tfmmod.c: Do it.
GSoC-2018-parth
Parth Wazurkar 7 years ago
parent 146b7febbd
commit 2d693b5a2c
  1. 3
      include/freetype/internal/fttrace.h
  2. 42
      src/tfm/tfmerr.h
  3. 50
      src/tfm/tfmmod.c
  4. 39
      src/tfm/tfmmod.h

@ -120,6 +120,9 @@ FT_TRACE_DEF( bdflib )
FT_TRACE_DEF( gfdriver )
FT_TRACE_DEF( gflib )
/* TFM helper module components */
FT_TRACE_DEF( tfmobjs )
/* PFR font component */
FT_TRACE_DEF( pfr )

@ -0,0 +1,42 @@
/****************************************************************************
*
* tfmerr.h
*
* FreeType auxiliary TFM module error codes (specification only).
*
* Copyright 2001-2018 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.
*
*/
/**************************************************************************
*
* This file is used to define the TFM auxiliary module error enumeration
* constants.
*
*/
#ifndef TFMERR_H_
#define TFMERR_H_
#include FT_MODULE_ERRORS_H
#undef FTERRORS_H_
#undef FT_ERR_PREFIX
#define FT_ERR_PREFIX TFM_Err_
#define FT_ERR_BASE FT_Mod_Err_TFM
#include FT_ERRORS_H
#endif /* TFMERR_H_ */
/* END */

@ -0,0 +1,50 @@
/****************************************************************************
*
* tfmmod.c
*
* FreeType auxiliary TFM module.
*
* Copyright 2000-2018 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 "tfmmod.h"
static
const TFM_Interface tfm_interface =
{
tfm_init, /* init */
tfm_parse_metrics, /* parse metrics */
tfm_parse_kerns, /* parse kerns */
tfm_close, /* done */
};
FT_CALLBACK_TABLE_DEF
const FT_Module_Class tfm_module_class =
{
0,
sizeof ( FT_ModuleRec ),
"tfm",
0x20000L,
0x20000L,
&tfm_interface, /* module-specific interface */
(FT_Module_Constructor)NULL, /* module_init */
(FT_Module_Destructor) NULL, /* module_done */
(FT_Module_Requester) NULL /* get_interface */
};
/* END */

@ -0,0 +1,39 @@
/****************************************************************************
*
* tfmmod.h
*
* FreeType auxiliary TFM module.
*
* Copyright 2000-2018 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.
*
*/
#ifndef TFMMOD_H_
#define TFMMOD_H_
#include <ft2build.h>
#include FT_MODULE_H
#include FT_INTERNAL_TFM_H
FT_BEGIN_HEADER
FT_EXPORT_VAR( const FT_Module_Class ) tfm_driver_class;
FT_END_HEADER
#endif /* TFMMOD_H_ */
/* END */
Loading…
Cancel
Save