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 +#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 +#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 */