`make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.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
diff --git a/ChangeLog b/ChangeLog
index 07cb466..b430b10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-04 Werner Lemberg <wl@gnu.org>
+
+ `make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
+
+ * devel/ftoption.h: Synchronize with
+ include/freetype/config/ftoption.h.
+
2010-08-04 Suzuki, Toshiya (鈴木俊哉) <mpsuzuki@hiroshima-u.ac.jp>
[cff] Improve stack overflow test.
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 058601e..4f12373 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -317,7 +317,7 @@ FT_BEGIN_HEADER
/* supply font data incrementally as the document is parsed, such */
/* as the Ghostscript interpreter for the PostScript language. */
/* */
-#define FT_CONFIG_OPTION_INCREMENTAL
+/* #define FT_CONFIG_OPTION_INCREMENTAL */
/*************************************************************************/
@@ -689,7 +689,28 @@ FT_BEGIN_HEADER
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/
-/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
+#define FT_CONFIG_OPTION_OLD_INTERNALS
+
+
+ /*
+ * 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
/*