diff --git a/src/shared/autohint.h b/src/shared/autohint.h new file mode 100644 index 000000000..5257ca010 --- /dev/null +++ b/src/shared/autohint.h @@ -0,0 +1,117 @@ +/***************************************************************************/ +/* */ +/* autohint.h */ +/* */ +/* High-level `autohint" driver interface (specification) */ +/* */ +/* Copyright 1996-2000 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. */ +/* */ +/* */ +/* The auto-hinter is used to load and automatically hint glyphs */ +/* when a format-specific hinter isn't available.. */ +/* */ +/***************************************************************************/ + +#ifndef AUTOHINT_H +#define AUTOHINT_H + +#include + + /*********************************************************************** + * + * + * FT_AutoHinter_Init_Func + * + * + * Each face can have its own auto-hinter object. This function + * is used to initialise it. Its role is to perform a few statistics + * on the face's content in order to compute global metrics like + * blue zones and standard width/heights. + * + * + * face :: handle to the face. + * + * + * this function will call FT_Load_Glyph several times in order to + * compute various statistics on the face's glyphs. This means that + * the face handle must be valid when calling it. + * + * This function set the "hinter" and "hinter_len" fields of 'face'. + */ + typedef FT_Error (*FT_AutoHinter_Init_Func)( FT_Face face ); + + + /*********************************************************************** + * + * + * FT_AutoHinter_Done_Func + * + * + * Each face can have its own auto-hinter object. This function + * is used to finalise and destroy it. + * + * + * face :: handle to the face. + * + * + * This function clears the "hinter" and "hinter_len" fields of + * "face". However, the face object is still valid and can be used + * to load un-hinted glyphs.. + * + */ + typedef void (*FT_AutoHinter_Done_Func)( FT_Face face ); + + + /*********************************************************************** + * + * + * FT_AutoHinter_Load_Func + * + * + * This function is used to load, scale and automatically hint a glyph + * from a given face. + * + * + * face :: handle to the face. + * glyph_index :: glyph index + * load_flags :: load flags + * + * + * This function is capable of loading composite glyphs by hinting + * each sub-glyph independently (which improves quality). + * + * It will call the font driver with FT_Load_Glyph, with FT_LOAD_NO_SCALE + * set.. + * + */ + typedef FT_Error (*FT_AutoHinter_Load_Func)( FT_Face face, + FT_UInt glyph_index, + FT_ULong load_flags ); + + /*********************************************************************** + * + * + * FT_AutoHinter_Interface + * + * + * The auto-hinter module's interface. + * + */ + typedef struct FT_AutoHinter_Interface + { + FT_AutoHinter_Init_Func init_autohinter; + FT_AutoHinter_Done_Func done_autohinter; + FT_AutoHinter_Load_Func load_glyph; + + } FT_AutoHinter_Interface; + +#endif /* AUTOHINT_H */ + + diff --git a/src/shared/tttypes.h b/src/shared/tttypes.h index eb31b5c51..74a8c4364 100644 --- a/src/shared/tttypes.h +++ b/src/shared/tttypes.h @@ -24,7 +24,7 @@ #define TTTYPES_H -#include +#include #ifdef __cplusplus @@ -423,6 +423,7 @@ } TT_Table; +#if 0 /*************************************************************************/ /* */ /* */ @@ -787,7 +788,7 @@ /* load them by default. See the ttpost.c file. */ } TT_Postscript; - +#endif /*************************************************************************/ /* */