added new auto-hinter driver interface ! modified tttypes.h to use the new "include/tttables.h"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
diff --git a/src/shared/autohint.h b/src/shared/autohint.h
new file mode 100644
index 0000000..5257ca0
--- /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 <freetype.h>
+
+ /***********************************************************************
+ *
+ * <FuncType>
+ * FT_AutoHinter_Init_Func
+ *
+ * <Description>
+ * 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.
+ *
+ * <Input>
+ * face :: handle to the face.
+ *
+ * <Note>
+ * 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 );
+
+
+ /***********************************************************************
+ *
+ * <FuncType>
+ * FT_AutoHinter_Done_Func
+ *
+ * <Description>
+ * Each face can have its own auto-hinter object. This function
+ * is used to finalise and destroy it.
+ *
+ * <Input>
+ * face :: handle to the face.
+ *
+ * <Note>
+ * 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 );
+
+
+ /***********************************************************************
+ *
+ * <FuncType>
+ * FT_AutoHinter_Load_Func
+ *
+ * <Description>
+ * This function is used to load, scale and automatically hint a glyph
+ * from a given face.
+ *
+ * <Input>
+ * face :: handle to the face.
+ * glyph_index :: glyph index
+ * load_flags :: load flags
+ *
+ * <Note>
+ * 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 );
+
+ /***********************************************************************
+ *
+ * <Struct>
+ * FT_AutoHinter_Interface
+ *
+ * <Description>
+ * 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 eb31b5c..74a8c43 100644
--- a/src/shared/tttypes.h
+++ b/src/shared/tttypes.h
@@ -24,7 +24,7 @@
#define TTTYPES_H
-#include <freetype.h>
+#include <tttables.h>
#ifdef __cplusplus
@@ -423,6 +423,7 @@
} TT_Table;
+#if 0
/*************************************************************************/
/* */
/* <Struct> */
@@ -787,7 +788,7 @@
/* load them by default. See the ttpost.c file. */
} TT_Postscript;
-
+#endif
/*************************************************************************/
/* */