summaryrefslogtreecommitdiffstats
path: root/include/freetype/internal/ftrfork.h
diff options
context:
space:
mode:
authorEric Vannier <evannier@google.com>2012-03-22 16:08:33 -0700
committerGeremy Condra <gcondra@google.com>2012-04-20 14:53:55 -0700
commit41371e1e39c8528eb0c4bc40683c736e6683e60c (patch)
treeba563af45d79cd0832305fe3833919bb2475f186 /include/freetype/internal/ftrfork.h
parent27811904d8de0ce5591417812ca31163bf5aad60 (diff)
downloadandroid_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.tar.gz
android_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.tar.bz2
android_external_freetype-41371e1e39c8528eb0c4bc40683c736e6683e60c.zip
Update to freetype 2.4.9
This was done by applying the entire 2.4.9 except for the following exceptions: - files that were new, or were not present originally in the version of freetype we were using (meaning that they are present in 2.4.8, and in 2.4.9, but were never integrated into the Android tree because they are not used in the Android tree). - ftmodule.h: given that we support fewer modules than in upstream 2.4.9 (same as Android), the file was left unchanged (and there were no changes from the official 2.4.8 to 2.4.9 - ftoption.h: same reasons as ftmodule.h Change-Id: Id251f2cc5ca1c864f9a4cc0c67b94025ee3ccc4a
Diffstat (limited to 'include/freetype/internal/ftrfork.h')
-rw-r--r--include/freetype/internal/ftrfork.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/freetype/internal/ftrfork.h b/include/freetype/internal/ftrfork.h
index aa573c8..77e1020 100644
--- a/include/freetype/internal/ftrfork.h
+++ b/include/freetype/internal/ftrfork.h
@@ -48,6 +48,57 @@ FT_BEGIN_HEADER
} FT_RFork_Ref;
+#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+ typedef FT_Error
+ (*ft_raccess_guess_func)( FT_Library library,
+ FT_Stream stream,
+ char *base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ typedef enum FT_RFork_Rule_ {
+ FT_RFork_Rule_invalid = -2,
+ FT_RFork_Rule_uknown, /* -1 */
+ FT_RFork_Rule_apple_double,
+ FT_RFork_Rule_apple_single,
+ FT_RFork_Rule_darwin_ufs_export,
+ FT_RFork_Rule_darwin_newvfs,
+ FT_RFork_Rule_darwin_hfsplus,
+ FT_RFork_Rule_vfat,
+ FT_RFork_Rule_linux_cap,
+ FT_RFork_Rule_linux_double,
+ FT_RFork_Rule_linux_netatalk
+ } FT_RFork_Rule;
+
+ /* For fast translation between rule index and rule type,
+ * the macros FT_RFORK_xxx should be kept consistent with
+ * the raccess_guess_funcs table
+ */
+ typedef struct ft_raccess_guess_rec_ {
+ ft_raccess_guess_func func;
+ FT_RFork_Rule type;
+ } ft_raccess_guess_rec;
+
+#ifndef FT_CONFIG_OPTION_PIC
+ /* this array is a storage in non-PIC mode, so ; is needed in END */
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ const type name[] = {
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ { raccess_guess_##func_suffix, FT_RFork_Rule_##type_suffix },
+#define CONST_FT_RFORK_RULE_ARRAY_END };
+#else /* FT_CONFIG_OPTION_PIC */
+ /* this array is a function in PIC mode, so no ; is needed in END */
+#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \
+ void FT_Init_##name ( type* storage ) { \
+ type *local = storage; \
+ int i = 0;
+#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \
+ local[i].func = raccess_guess_##func_suffix; \
+ local[i].type = FT_RFork_Rule_##type_suffix; \
+ i++;
+#define CONST_FT_RFORK_RULE_ARRAY_END }
+#endif /* FT_CONFIG_OPTION_PIC */
+#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
/*************************************************************************/
/* */