diff options
author | Parth Wazurkar <parthwazurkar@gmail.com> | 2018-07-27 01:32:33 +0530 |
---|---|---|
committer | Parth Wazurkar <parthwazurkar@gmail.com> | 2018-07-30 23:47:51 +0530 |
commit | 2d693b5a2c0f8a70284753f919b5c957e0b9d462 (patch) | |
tree | 7cb2b09b6bee5d94093b0dc3f6a65f5c9e90b51c | |
parent | 146b7febbdd9dcafb58d47162aef0e69bd57a7cc (diff) | |
download | freetype2-2d693b5a2c0f8a70284753f919b5c957e0b9d462.tar.gz |
[tfm] Define `tfm_module_class' and `tfm_interface'.
* src/tfm/tfmmod.c: Do it.
-rw-r--r-- | include/freetype/internal/fttrace.h | 3 | ||||
-rw-r--r-- | src/tfm/tfmerr.h | 42 | ||||
-rw-r--r-- | src/tfm/tfmmod.c | 50 | ||||
-rw-r--r-- | src/tfm/tfmmod.h | 39 |
4 files changed, 134 insertions, 0 deletions
diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h index 30a9609f4..5a7700c14 100644 --- a/include/freetype/internal/fttrace.h +++ b/include/freetype/internal/fttrace.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 ) diff --git a/src/tfm/tfmerr.h b/src/tfm/tfmerr.h new file mode 100644 index 000000000..0a1e8f8c5 --- /dev/null +++ b/src/tfm/tfmerr.h @@ -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 */ diff --git a/src/tfm/tfmmod.c b/src/tfm/tfmmod.c new file mode 100644 index 000000000..9f2aaf967 --- /dev/null +++ b/src/tfm/tfmmod.c @@ -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 */ diff --git a/src/tfm/tfmmod.h b/src/tfm/tfmmod.h new file mode 100644 index 000000000..f1fec8ff6 --- /dev/null +++ b/src/tfm/tfmmod.h @@ -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 */ |