FT_CONFIG_OPTION_INCREMENTAL is now used to compile incremental loading stuff conditionally.
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
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 8eb510a..f53608d 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -199,6 +199,8 @@ FT_BEGIN_HEADER
} FT_Glyph_Metrics;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -222,6 +224,8 @@ FT_BEGIN_HEADER
FT_Long advance;
} FT_Basic_Glyph_Metrics;
+#endif /* #ifdef FT_CONFIG_OPTION_INCREMENTAL */
+
/*************************************************************************/
/* */
@@ -502,6 +506,8 @@ FT_BEGIN_HEADER
} FT_CharMapRec;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
/*************************************************************************/
/* */
@@ -607,6 +613,8 @@ FT_BEGIN_HEADER
void* object;
} FT_Incremental_Interface;
+#endif /* #ifdef FT_CONFIG_OPTION_INCREMENTAL */
+
/*************************************************************************/
/*************************************************************************/
@@ -839,6 +847,10 @@ FT_BEGIN_HEADER
FT_Face_Internal internal;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_Interface* incremental_interface;
+#endif
+
/*@private end */
} FT_FaceRec;
@@ -1576,6 +1588,9 @@ FT_BEGIN_HEADER
/* */
/* ft_open_params :: Use the `num_params' & `params' field. */
/* */
+ /* ft_open_incremental :: Use the 'incremental_interface' field. */
+ /* (Available if FT_CONFIG_OPTION_INCREMENTAL is defined.) */
+ /* */
/* <Note> */
/* The `ft_open_memory', `ft_open_stream', and `ft_open_pathname' */
/* flags are mutually exclusive. */
@@ -1587,6 +1602,9 @@ FT_BEGIN_HEADER
ft_open_pathname = 4,
ft_open_driver = 8,
ft_open_params = 16
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ ,ft_open_incremental = 32
+#endif
} FT_Open_Flags;
@@ -1648,6 +1666,11 @@ FT_BEGIN_HEADER
/* params :: Extra parameters passed to the font driver when */
/* opening a new face. */
/* */
+ /* incremental_interface :: If non-null, an interface used to */
+ /* implement incremental font loading. This field */
+ /* exists only if FT_CONFIG_OPTION_INCREMENTAL is */
+ /* defined. */
+ /* */
/* <Note> */
/* The stream type is determined by the contents of `flags' which */
/* are tested in the following order by @FT_Open_Face: */
@@ -1668,16 +1691,23 @@ FT_BEGIN_HEADER
/* `num_params' and `params' will be used. They are ignored */
/* otherwise. */
/* */
+ /* If the `ft_open_incremental' bit is set 'incremental_interface' */
+ /* will be used, else it is ignored. This feature is available only */
+ /* if FT_CONFIG_OPTION_INCREMENTAL is defined. */
+ /* */
typedef struct FT_Open_Args_
{
- FT_Open_Flags flags;
- const FT_Byte* memory_base;
- FT_Long memory_size;
- FT_String* pathname;
- FT_Stream stream;
- FT_Module driver;
- FT_Int num_params;
- FT_Parameter* params;
+ FT_Open_Flags flags;
+ const FT_Byte* memory_base;
+ FT_Long memory_size;
+ FT_String* pathname;
+ FT_Stream stream;
+ FT_Module driver;
+ FT_Int num_params;
+ FT_Parameter* params;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ FT_Incremental_Interface* incremental_interface;
+#endif
} FT_Open_Args;