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

* src/tfm/tfmmod.c: Do it.
This commit is contained in:
Parth Wazurkar 2018-07-27 01:32:33 +05:30
parent 6ae549152a
commit 46d2e1bd65
4 changed files with 134 additions and 0 deletions

View File

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

42
src/tfm/tfmerr.h Normal file
View File

@ -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 */

50
src/tfm/tfmmod.c Normal file
View File

@ -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 */

39
src/tfm/tfmmod.h Normal file
View File

@ -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 */