diff options
author | marha <marha@users.sourceforge.net> | 2010-08-20 08:28:36 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-08-20 08:28:36 +0000 |
commit | f5d6fd32902e742cc62622b1abc8826dd7c03c32 (patch) | |
tree | 96c33069543f425f5f70045e24b549a5783c73d1 /freetype/devel/ftoption.h | |
parent | 3799f1085abb02c5721f4c33f42c063edb68029d (diff) | |
parent | 00666832a756014eef48c4f5bd8484cc1299bdf0 (diff) | |
download | vcxsrv-f5d6fd32902e742cc62622b1abc8826dd7c03c32.tar.gz vcxsrv-f5d6fd32902e742cc62622b1abc8826dd7c03c32.tar.bz2 vcxsrv-f5d6fd32902e742cc62622b1abc8826dd7c03c32.zip |
svn merge ^/branches/released .
Diffstat (limited to 'freetype/devel/ftoption.h')
-rw-r--r-- | freetype/devel/ftoption.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/freetype/devel/ftoption.h b/freetype/devel/ftoption.h index 058601e4c..32dd25aa7 100644 --- a/freetype/devel/ftoption.h +++ b/freetype/devel/ftoption.h @@ -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 /* |