summaryrefslogtreecommitdiffstats
path: root/include/freetype/config
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2010-09-14 17:02:58 -0700
committerNick Kralevich <nnk@google.com>2010-09-15 10:32:30 -0700
commitaacb8e1368a883fcbc9fe64fd0e460cef9c9b20c (patch)
tree2b4c5412391bf31f6a54b237ea83bfde05ec3802 /include/freetype/config
parentd4476115dee94297c020b3a2b067188117424e25 (diff)
downloadandroid_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.gz
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.tar.bz2
android_external_freetype-aacb8e1368a883fcbc9fe64fd0e460cef9c9b20c.zip
upgrade freetype to 2.4.2.
Bug: 2969145 Change-Id: I8debbbe0bd478d9cf8c39cff5179981b5f3b371a
Diffstat (limited to 'include/freetype/config')
-rw-r--r--include/freetype/config/ftconfig.h2
-rw-r--r--include/freetype/config/ftoption.h35
2 files changed, 30 insertions, 7 deletions
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 43d587e..cbe30f2 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -363,7 +363,7 @@ FT_BEGIN_HEADER
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
-#if defined( i386 )
+#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 0258e1b..22056e1 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -488,8 +488,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
- /* a bytecode interpreter in the TrueType driver. Note that there are */
- /* important patent issues related to the use of the interpreter. */
+ /* a bytecode interpreter in the TrueType driver. */
/* */
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
@@ -504,10 +503,13 @@ FT_BEGIN_HEADER
/* */
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* of the TrueType bytecode interpreter is used that doesn't implement */
- /* any of the patented opcodes and algorithms. Note that the */
- /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */
- /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
+ /* any of the patented opcodes and algorithms. The patents related to */
+ /* TrueType hinting have expired worldwide since May 2010; this option */
+ /* is now deprecated. */
+ /* */
+ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
+ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
+ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
@@ -691,6 +693,27 @@ FT_BEGIN_HEADER
/*
+ * To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+ * we restrict the number of charmaps in a font. The current API of
+ * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+ * takes charcode only. To determine the passed value is for cmap_index
+ * or charcode, the possible cmap_index is restricted not to exceed
+ * the minimum possible charcode by a rogue client. It is also very
+ * unlikely that a rogue client is interested in Unicode values 0 to 15.
+ *
+ * NOTE: The original threshold was 4 deduced from popular number of
+ * cmap subtables in UCS-4 TrueType fonts, but now it is not
+ * irregular for OpenType fonts to have more than 4 subtables,
+ * because variation selector subtables are available for Apple
+ * and Microsoft platforms.
+ */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
+
+
+ /*
* This macro is defined if either unpatented or native TrueType
* hinting is requested by the definitions above.
*/