diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src')
31 files changed, 626 insertions, 343 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.c b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.c index 61ab7957f0c..e4078fd0444 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.c +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.c @@ -166,6 +166,10 @@ '\0', '\xE2', '\xB4', '\x84', ' ', '\xE2', '\xB4', '\x85', ' ', '\xE2', '\xB4', '\x94', ' ', '\xE2', '\xB4', '\x95', ' ', '\xE2', '\xB4', '\x81', ' ', '\xE2', '\xB4', '\x82', ' ', '\xE2', '\xB4', '\x98', ' ', '\xE2', '\xB4', '\x9D', /* ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ */ '\0', + '\xE1', '\xB2', '\x9C', ' ', '\xE1', '\xB2', '\x9F', ' ', '\xE1', '\xB2', '\xB3', ' ', '\xE1', '\xB2', '\xB8', ' ', '\xE1', '\xB2', '\x92', ' ', '\xE1', '\xB2', '\x94', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xB4', /* Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ */ + '\0', + '\xE1', '\xB2', '\x98', ' ', '\xE1', '\xB2', '\xB2', ' ', '\xE1', '\xB2', '\x9D', ' ', '\xE1', '\xB2', '\xA9', ' ', '\xE1', '\xB2', '\x9B', ' ', '\xE1', '\xB2', '\xA8', ' ', '\xE1', '\xB2', '\xAF', ' ', '\xE1', '\xB2', '\xBD', /* Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ */ + '\0', '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x94', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\xAB', ' ', '\xE2', '\xB0', '\x8B', /* Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ */ '\0', '\xE2', '\xB0', '\x85', ' ', '\xE2', '\xB0', '\x84', ' ', '\xE2', '\xB0', '\x82', ' ', '\xE2', '\xB0', '\xAA', ' ', '\xE2', '\xB0', '\x9E', ' ', '\xE2', '\xB0', '\xA1', ' ', '\xE2', '\xB0', '\x8A', ' ', '\xE2', '\xB0', '\x94', /* Ⰵ Ⰴ Ⰲ Ⱚ Ⱎ Ⱑ Ⰺ Ⱄ */ @@ -539,6 +543,8 @@ { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 }, { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 }, + { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, + { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 }, { AF_BLUE_STRING_MAX, 0 }, { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }, { AF_BLUE_STRING_GEORGIAN_ASOMTAVRULI_BOTTOM, 0 }, diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.dat b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.dat index d3cc4284b87..bc2f0d27540 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.dat +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.dat @@ -242,6 +242,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER "ⴄ ⴅ ⴔ ⴕ ⴁ ⴂ ⴘ ⴝ" + AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP + "Ნ Ჟ Ჳ Ჸ Გ Ე Ო Ჴ" + AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM + "Ი Ჲ Ო Ჩ Მ Შ Ჯ Ჽ" + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP "Ⰵ Ⱄ Ⱚ Ⰴ Ⰲ Ⰺ Ⱛ Ⰻ" AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM @@ -795,13 +800,14 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN: { AF_BLUE_STRING_ETHIOPIC_BOTTOM, 0 } { AF_BLUE_STRING_MAX, 0 } - // blue zones for Mtavruli are missing (not yet defined in Unicode) AF_BLUE_STRINGSET_GEOR { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP | AF_BLUE_PROPERTY_LATIN_X_HEIGHT } { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_BOTTOM, 0 } { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP } { AF_BLUE_STRING_GEORGIAN_MKHEDRULI_DESCENDER, 0 } + { AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP, AF_BLUE_PROPERTY_LATIN_TOP } + { AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM, 0 } { AF_BLUE_STRING_MAX, 0 } AF_BLUE_STRINGSET_GEOK diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.h b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.h index 56b591aa8df..de31e259c3b 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.h +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afblue.h @@ -147,119 +147,121 @@ FT_BEGIN_HEADER AF_BLUE_STRING_GEORGIAN_NUSKHURI_BOTTOM = 1813, AF_BLUE_STRING_GEORGIAN_NUSKHURI_ASCENDER = 1845, AF_BLUE_STRING_GEORGIAN_NUSKHURI_DESCENDER = 1877, - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1909, - AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 1941, - AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 1973, - AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2005, - AF_BLUE_STRING_GOTHIC_TOP = 2037, - AF_BLUE_STRING_GOTHIC_BOTTOM = 2077, - AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2097, - AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2118, - AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2136, - AF_BLUE_STRING_GREEK_SMALL = 2154, - AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2178, - AF_BLUE_STRING_GUJARATI_TOP = 2202, - AF_BLUE_STRING_GUJARATI_BOTTOM = 2234, - AF_BLUE_STRING_GUJARATI_ASCENDER = 2266, - AF_BLUE_STRING_GUJARATI_DESCENDER = 2316, - AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2349, - AF_BLUE_STRING_GURMUKHI_BASE = 2369, - AF_BLUE_STRING_GURMUKHI_HEAD = 2401, - AF_BLUE_STRING_GURMUKHI_TOP = 2433, - AF_BLUE_STRING_GURMUKHI_BOTTOM = 2465, - AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2497, - AF_BLUE_STRING_HEBREW_TOP = 2517, - AF_BLUE_STRING_HEBREW_BOTTOM = 2541, - AF_BLUE_STRING_HEBREW_DESCENDER = 2559, - AF_BLUE_STRING_KANNADA_TOP = 2574, - AF_BLUE_STRING_KANNADA_BOTTOM = 2618, - AF_BLUE_STRING_KAYAH_LI_TOP = 2650, - AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2674, - AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2694, - AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2702, - AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2714, - AF_BLUE_STRING_KHMER_TOP = 2735, - AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2759, - AF_BLUE_STRING_KHMER_BOTTOM = 2799, - AF_BLUE_STRING_KHMER_DESCENDER = 2831, - AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2865, - AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 2952, - AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 2960, - AF_BLUE_STRING_LAO_TOP = 2968, - AF_BLUE_STRING_LAO_BOTTOM = 3000, - AF_BLUE_STRING_LAO_ASCENDER = 3032, - AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3048, - AF_BLUE_STRING_LAO_DESCENDER = 3060, - AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3084, - AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3100, - AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3116, - AF_BLUE_STRING_LATIN_SMALL_TOP = 3130, - AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3146, - AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3162, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3172, - AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3192, - AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3212, - AF_BLUE_STRING_LATIN_SUBS_SMALL = 3232, - AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3268, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3288, - AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3319, - AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3348, - AF_BLUE_STRING_LATIN_SUPS_SMALL = 3374, - AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3399, - AF_BLUE_STRING_LISU_TOP = 3410, - AF_BLUE_STRING_LISU_BOTTOM = 3442, - AF_BLUE_STRING_MALAYALAM_TOP = 3474, - AF_BLUE_STRING_MALAYALAM_BOTTOM = 3518, - AF_BLUE_STRING_MYANMAR_TOP = 3550, - AF_BLUE_STRING_MYANMAR_BOTTOM = 3582, - AF_BLUE_STRING_MYANMAR_ASCENDER = 3614, - AF_BLUE_STRING_MYANMAR_DESCENDER = 3642, - AF_BLUE_STRING_NKO_TOP = 3674, - AF_BLUE_STRING_NKO_BOTTOM = 3698, - AF_BLUE_STRING_NKO_SMALL_TOP = 3713, - AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3722, - AF_BLUE_STRING_OL_CHIKI = 3734, - AF_BLUE_STRING_OLD_TURKIC_TOP = 3758, - AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3773, - AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3793, - AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3833, - AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3863, - AF_BLUE_STRING_OSAGE_SMALL_TOP = 3878, - AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3918, - AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 3958, - AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 3983, - AF_BLUE_STRING_OSMANYA_TOP = 3998, - AF_BLUE_STRING_OSMANYA_BOTTOM = 4038, - AF_BLUE_STRING_SAURASHTRA_TOP = 4078, - AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4110, - AF_BLUE_STRING_SHAVIAN_TOP = 4130, - AF_BLUE_STRING_SHAVIAN_BOTTOM = 4140, - AF_BLUE_STRING_SHAVIAN_DESCENDER = 4165, - AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4175, - AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4210, - AF_BLUE_STRING_SINHALA_TOP = 4225, - AF_BLUE_STRING_SINHALA_BOTTOM = 4257, - AF_BLUE_STRING_SINHALA_DESCENDER = 4289, - AF_BLUE_STRING_SUNDANESE_TOP = 4333, - AF_BLUE_STRING_SUNDANESE_BOTTOM = 4357, - AF_BLUE_STRING_SUNDANESE_DESCENDER = 4389, - AF_BLUE_STRING_TAI_VIET_TOP = 4397, - AF_BLUE_STRING_TAI_VIET_BOTTOM = 4417, - AF_BLUE_STRING_TAMIL_TOP = 4429, - AF_BLUE_STRING_TAMIL_BOTTOM = 4461, - AF_BLUE_STRING_TELUGU_TOP = 4493, - AF_BLUE_STRING_TELUGU_BOTTOM = 4521, - AF_BLUE_STRING_THAI_TOP = 4549, - AF_BLUE_STRING_THAI_BOTTOM = 4573, - AF_BLUE_STRING_THAI_ASCENDER = 4601, - AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4613, - AF_BLUE_STRING_THAI_DESCENDER = 4625, - AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4641, - AF_BLUE_STRING_THAI_DIGIT_TOP = 4649, - AF_BLUE_STRING_TIFINAGH = 4661, - AF_BLUE_STRING_VAI_TOP = 4693, - AF_BLUE_STRING_VAI_BOTTOM = 4725, - af_blue_1_1 = 4756, + AF_BLUE_STRING_GEORGIAN_MTAVRULI_TOP = 1909, + AF_BLUE_STRING_GEORGIAN_MTAVRULI_BOTTOM = 1941, + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_TOP = 1973, + AF_BLUE_STRING_GLAGOLITIC_CAPITAL_BOTTOM = 2005, + AF_BLUE_STRING_GLAGOLITIC_SMALL_TOP = 2037, + AF_BLUE_STRING_GLAGOLITIC_SMALL_BOTTOM = 2069, + AF_BLUE_STRING_GOTHIC_TOP = 2101, + AF_BLUE_STRING_GOTHIC_BOTTOM = 2141, + AF_BLUE_STRING_GREEK_CAPITAL_TOP = 2161, + AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 2182, + AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 2200, + AF_BLUE_STRING_GREEK_SMALL = 2218, + AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 2242, + AF_BLUE_STRING_GUJARATI_TOP = 2266, + AF_BLUE_STRING_GUJARATI_BOTTOM = 2298, + AF_BLUE_STRING_GUJARATI_ASCENDER = 2330, + AF_BLUE_STRING_GUJARATI_DESCENDER = 2380, + AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 2413, + AF_BLUE_STRING_GURMUKHI_BASE = 2433, + AF_BLUE_STRING_GURMUKHI_HEAD = 2465, + AF_BLUE_STRING_GURMUKHI_TOP = 2497, + AF_BLUE_STRING_GURMUKHI_BOTTOM = 2529, + AF_BLUE_STRING_GURMUKHI_DIGIT_TOP = 2561, + AF_BLUE_STRING_HEBREW_TOP = 2581, + AF_BLUE_STRING_HEBREW_BOTTOM = 2605, + AF_BLUE_STRING_HEBREW_DESCENDER = 2623, + AF_BLUE_STRING_KANNADA_TOP = 2638, + AF_BLUE_STRING_KANNADA_BOTTOM = 2682, + AF_BLUE_STRING_KAYAH_LI_TOP = 2714, + AF_BLUE_STRING_KAYAH_LI_BOTTOM = 2738, + AF_BLUE_STRING_KAYAH_LI_ASCENDER = 2758, + AF_BLUE_STRING_KAYAH_LI_DESCENDER = 2766, + AF_BLUE_STRING_KAYAH_LI_LARGE_DESCENDER = 2778, + AF_BLUE_STRING_KHMER_TOP = 2799, + AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 2823, + AF_BLUE_STRING_KHMER_BOTTOM = 2863, + AF_BLUE_STRING_KHMER_DESCENDER = 2895, + AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 2929, + AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 3016, + AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 3024, + AF_BLUE_STRING_LAO_TOP = 3032, + AF_BLUE_STRING_LAO_BOTTOM = 3064, + AF_BLUE_STRING_LAO_ASCENDER = 3096, + AF_BLUE_STRING_LAO_LARGE_ASCENDER = 3112, + AF_BLUE_STRING_LAO_DESCENDER = 3124, + AF_BLUE_STRING_LATIN_CAPITAL_TOP = 3148, + AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 3164, + AF_BLUE_STRING_LATIN_SMALL_F_TOP = 3180, + AF_BLUE_STRING_LATIN_SMALL_TOP = 3194, + AF_BLUE_STRING_LATIN_SMALL_BOTTOM = 3210, + AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 3226, + AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 3236, + AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 3256, + AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 3276, + AF_BLUE_STRING_LATIN_SUBS_SMALL = 3296, + AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 3332, + AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 3352, + AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 3383, + AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 3412, + AF_BLUE_STRING_LATIN_SUPS_SMALL = 3438, + AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 3463, + AF_BLUE_STRING_LISU_TOP = 3474, + AF_BLUE_STRING_LISU_BOTTOM = 3506, + AF_BLUE_STRING_MALAYALAM_TOP = 3538, + AF_BLUE_STRING_MALAYALAM_BOTTOM = 3582, + AF_BLUE_STRING_MYANMAR_TOP = 3614, + AF_BLUE_STRING_MYANMAR_BOTTOM = 3646, + AF_BLUE_STRING_MYANMAR_ASCENDER = 3678, + AF_BLUE_STRING_MYANMAR_DESCENDER = 3706, + AF_BLUE_STRING_NKO_TOP = 3738, + AF_BLUE_STRING_NKO_BOTTOM = 3762, + AF_BLUE_STRING_NKO_SMALL_TOP = 3777, + AF_BLUE_STRING_NKO_SMALL_BOTTOM = 3786, + AF_BLUE_STRING_OL_CHIKI = 3798, + AF_BLUE_STRING_OLD_TURKIC_TOP = 3822, + AF_BLUE_STRING_OLD_TURKIC_BOTTOM = 3837, + AF_BLUE_STRING_OSAGE_CAPITAL_TOP = 3857, + AF_BLUE_STRING_OSAGE_CAPITAL_BOTTOM = 3897, + AF_BLUE_STRING_OSAGE_CAPITAL_DESCENDER = 3927, + AF_BLUE_STRING_OSAGE_SMALL_TOP = 3942, + AF_BLUE_STRING_OSAGE_SMALL_BOTTOM = 3982, + AF_BLUE_STRING_OSAGE_SMALL_ASCENDER = 4022, + AF_BLUE_STRING_OSAGE_SMALL_DESCENDER = 4047, + AF_BLUE_STRING_OSMANYA_TOP = 4062, + AF_BLUE_STRING_OSMANYA_BOTTOM = 4102, + AF_BLUE_STRING_SAURASHTRA_TOP = 4142, + AF_BLUE_STRING_SAURASHTRA_BOTTOM = 4174, + AF_BLUE_STRING_SHAVIAN_TOP = 4194, + AF_BLUE_STRING_SHAVIAN_BOTTOM = 4204, + AF_BLUE_STRING_SHAVIAN_DESCENDER = 4229, + AF_BLUE_STRING_SHAVIAN_SMALL_TOP = 4239, + AF_BLUE_STRING_SHAVIAN_SMALL_BOTTOM = 4274, + AF_BLUE_STRING_SINHALA_TOP = 4289, + AF_BLUE_STRING_SINHALA_BOTTOM = 4321, + AF_BLUE_STRING_SINHALA_DESCENDER = 4353, + AF_BLUE_STRING_SUNDANESE_TOP = 4397, + AF_BLUE_STRING_SUNDANESE_BOTTOM = 4421, + AF_BLUE_STRING_SUNDANESE_DESCENDER = 4453, + AF_BLUE_STRING_TAI_VIET_TOP = 4461, + AF_BLUE_STRING_TAI_VIET_BOTTOM = 4481, + AF_BLUE_STRING_TAMIL_TOP = 4493, + AF_BLUE_STRING_TAMIL_BOTTOM = 4525, + AF_BLUE_STRING_TELUGU_TOP = 4557, + AF_BLUE_STRING_TELUGU_BOTTOM = 4585, + AF_BLUE_STRING_THAI_TOP = 4613, + AF_BLUE_STRING_THAI_BOTTOM = 4637, + AF_BLUE_STRING_THAI_ASCENDER = 4665, + AF_BLUE_STRING_THAI_LARGE_ASCENDER = 4677, + AF_BLUE_STRING_THAI_DESCENDER = 4689, + AF_BLUE_STRING_THAI_LARGE_DESCENDER = 4705, + AF_BLUE_STRING_THAI_DIGIT_TOP = 4713, + AF_BLUE_STRING_TIFINAGH = 4725, + AF_BLUE_STRING_VAI_TOP = 4757, + AF_BLUE_STRING_VAI_BOTTOM = 4789, + af_blue_1_1 = 4820, #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1, AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203, @@ -336,41 +338,41 @@ FT_BEGIN_HEADER AF_BLUE_STRINGSET_DSRT = 75, AF_BLUE_STRINGSET_ETHI = 80, AF_BLUE_STRINGSET_GEOR = 83, - AF_BLUE_STRINGSET_GEOK = 88, - AF_BLUE_STRINGSET_GLAG = 95, - AF_BLUE_STRINGSET_GOTH = 100, - AF_BLUE_STRINGSET_GREK = 103, - AF_BLUE_STRINGSET_GUJR = 110, - AF_BLUE_STRINGSET_GURU = 116, - AF_BLUE_STRINGSET_HEBR = 122, - AF_BLUE_STRINGSET_KALI = 126, - AF_BLUE_STRINGSET_KHMR = 132, - AF_BLUE_STRINGSET_KHMS = 138, - AF_BLUE_STRINGSET_KNDA = 141, - AF_BLUE_STRINGSET_LAO = 144, - AF_BLUE_STRINGSET_LATN = 150, - AF_BLUE_STRINGSET_LATB = 157, - AF_BLUE_STRINGSET_LATP = 164, - AF_BLUE_STRINGSET_LISU = 171, - AF_BLUE_STRINGSET_MLYM = 174, - AF_BLUE_STRINGSET_MYMR = 177, - AF_BLUE_STRINGSET_NKOO = 182, - AF_BLUE_STRINGSET_NONE = 187, - AF_BLUE_STRINGSET_OLCK = 188, - AF_BLUE_STRINGSET_ORKH = 191, - AF_BLUE_STRINGSET_OSGE = 194, - AF_BLUE_STRINGSET_OSMA = 202, - AF_BLUE_STRINGSET_SAUR = 205, - AF_BLUE_STRINGSET_SHAW = 208, - AF_BLUE_STRINGSET_SINH = 214, - AF_BLUE_STRINGSET_SUND = 218, - AF_BLUE_STRINGSET_TAML = 222, - AF_BLUE_STRINGSET_TAVT = 225, - AF_BLUE_STRINGSET_TELU = 228, - AF_BLUE_STRINGSET_TFNG = 231, - AF_BLUE_STRINGSET_THAI = 234, - AF_BLUE_STRINGSET_VAII = 242, - af_blue_2_1 = 245, + AF_BLUE_STRINGSET_GEOK = 90, + AF_BLUE_STRINGSET_GLAG = 97, + AF_BLUE_STRINGSET_GOTH = 102, + AF_BLUE_STRINGSET_GREK = 105, + AF_BLUE_STRINGSET_GUJR = 112, + AF_BLUE_STRINGSET_GURU = 118, + AF_BLUE_STRINGSET_HEBR = 124, + AF_BLUE_STRINGSET_KALI = 128, + AF_BLUE_STRINGSET_KHMR = 134, + AF_BLUE_STRINGSET_KHMS = 140, + AF_BLUE_STRINGSET_KNDA = 143, + AF_BLUE_STRINGSET_LAO = 146, + AF_BLUE_STRINGSET_LATN = 152, + AF_BLUE_STRINGSET_LATB = 159, + AF_BLUE_STRINGSET_LATP = 166, + AF_BLUE_STRINGSET_LISU = 173, + AF_BLUE_STRINGSET_MLYM = 176, + AF_BLUE_STRINGSET_MYMR = 179, + AF_BLUE_STRINGSET_NKOO = 184, + AF_BLUE_STRINGSET_NONE = 189, + AF_BLUE_STRINGSET_OLCK = 190, + AF_BLUE_STRINGSET_ORKH = 193, + AF_BLUE_STRINGSET_OSGE = 196, + AF_BLUE_STRINGSET_OSMA = 204, + AF_BLUE_STRINGSET_SAUR = 207, + AF_BLUE_STRINGSET_SHAW = 210, + AF_BLUE_STRINGSET_SINH = 216, + AF_BLUE_STRINGSET_SUND = 220, + AF_BLUE_STRINGSET_TAML = 224, + AF_BLUE_STRINGSET_TAVT = 227, + AF_BLUE_STRINGSET_TELU = 230, + AF_BLUE_STRINGSET_TFNG = 233, + AF_BLUE_STRINGSET_THAI = 236, + AF_BLUE_STRINGSET_VAII = 244, + af_blue_2_1 = 247, #ifdef AF_CONFIG_OPTION_CJK AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0, af_blue_2_1_1 = af_blue_2_1 + 2, diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afranges.c b/Build/source/libs/freetype2/freetype-src/src/autofit/afranges.c index 1355c5e7cc3..cf67fafb11c 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/afranges.c +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afranges.c @@ -91,7 +91,7 @@ AF_UNIRANGE_REC( 0x06E7, 0x06E8 ), AF_UNIRANGE_REC( 0x06EA, 0x06ED ), AF_UNIRANGE_REC( 0x08D4, 0x08E1 ), - AF_UNIRANGE_REC( 0x08E3, 0x08FF ), + AF_UNIRANGE_REC( 0x08D3, 0x08FF ), AF_UNIRANGE_REC( 0xFBB2, 0xFBC1 ), AF_UNIRANGE_REC( 0xFE70, 0xFE70 ), AF_UNIRANGE_REC( 0xFE72, 0xFE72 ), @@ -163,6 +163,7 @@ AF_UNIRANGE_REC( 0x09C1, 0x09C4 ), AF_UNIRANGE_REC( 0x09CD, 0x09CD ), AF_UNIRANGE_REC( 0x09E2, 0x09E3 ), + AF_UNIRANGE_REC( 0x09FE, 0x09FE ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -190,6 +191,7 @@ { AF_UNIRANGE_REC( 0x11100, 0x11102 ), AF_UNIRANGE_REC( 0x11127, 0x11134 ), + AF_UNIRANGE_REC( 0x11146, 0x11146 ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -304,6 +306,7 @@ AF_UNIRANGE_REC( 0x0953, 0x0957 ), AF_UNIRANGE_REC( 0x0962, 0x0963 ), AF_UNIRANGE_REC( 0xA8E0, 0xA8F1 ), + AF_UNIRANGE_REC( 0xA8FF, 0xA8FF ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -338,11 +341,8 @@ const AF_Script_UniRangeRec af_geor_uniranges[] = { - AF_UNIRANGE_REC( 0x10D0, 0x10FF ), /* Georgian (Mkhedruli) */ -#if 0 - /* the following range is proposed for inclusion in Unicode */ - AF_UNIRANGE_REC( 0x1C90, 0x1CBF ), /* Georgian (Mtavruli) */ -#endif + AF_UNIRANGE_REC( 0x10D0, 0x10FF ), /* Georgian (Mkhedruli) */ + AF_UNIRANGE_REC( 0x1C90, 0x1CBF ), /* Georgian Extended (Mtavruli) */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -355,8 +355,8 @@ const AF_Script_UniRangeRec af_geok_uniranges[] = { /* Khutsuri */ - AF_UNIRANGE_REC( 0x10A0, 0x10CD ), /* Georgian (Asomtavruli) */ - AF_UNIRANGE_REC( 0x2D00, 0x2D2D ), /* Georgian (Nuskhuri) */ + AF_UNIRANGE_REC( 0x10A0, 0x10CD ), /* Georgian (Asomtavruli) */ + AF_UNIRANGE_REC( 0x2D00, 0x2D2D ), /* Georgian Supplement (Nuskhuri) */ AF_UNIRANGE_REC( 0, 0 ) }; @@ -425,6 +425,7 @@ AF_UNIRANGE_REC( 0x0AC1, 0x0AC8 ), AF_UNIRANGE_REC( 0x0ACD, 0x0ACD ), AF_UNIRANGE_REC( 0x0AE2, 0x0AE3 ), + AF_UNIRANGE_REC( 0x0AFA, 0x0AFF ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -655,7 +656,8 @@ const AF_Script_UniRangeRec af_mlym_nonbase_uniranges[] = { - AF_UNIRANGE_REC( 0x0D01, 0x0D01 ), + AF_UNIRANGE_REC( 0x0D00, 0x0D01 ), + AF_UNIRANGE_REC( 0x0D3B, 0x0D3C ), AF_UNIRANGE_REC( 0x0D4D, 0x0D4E ), AF_UNIRANGE_REC( 0x0D62, 0x0D63 ), AF_UNIRANGE_REC( 0, 0 ) @@ -697,6 +699,7 @@ const AF_Script_UniRangeRec af_nkoo_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x07EB, 0x07F5 ), + AF_UNIRANGE_REC( 0x07FD, 0x07FD ), AF_UNIRANGE_REC( 0, 0 ) }; @@ -856,6 +859,7 @@ const AF_Script_UniRangeRec af_telu_nonbase_uniranges[] = { AF_UNIRANGE_REC( 0x0C00, 0x0C00 ), + AF_UNIRANGE_REC( 0x0C04, 0x0C04 ), AF_UNIRANGE_REC( 0x0C3E, 0x0C40 ), AF_UNIRANGE_REC( 0x0C46, 0x0C56 ), AF_UNIRANGE_REC( 0x0C62, 0x0C63 ), @@ -1006,10 +1010,13 @@ AF_UNIRANGE_REC( 0xFE30, 0xFE4F ), /* CJK Compatibility Forms */ AF_UNIRANGE_REC( 0xFF00, 0xFFEF ), /* Halfwidth and Fullwidth Forms */ AF_UNIRANGE_REC( 0x1B000, 0x1B0FF ), /* Kana Supplement */ + AF_UNIRANGE_REC( 0x1B100, 0x1B12F ), /* Kana Extended-A */ AF_UNIRANGE_REC( 0x1D300, 0x1D35F ), /* Tai Xuan Hing Symbols */ AF_UNIRANGE_REC( 0x20000, 0x2A6DF ), /* CJK Unified Ideographs Extension B */ AF_UNIRANGE_REC( 0x2A700, 0x2B73F ), /* CJK Unified Ideographs Extension C */ AF_UNIRANGE_REC( 0x2B740, 0x2B81F ), /* CJK Unified Ideographs Extension D */ + AF_UNIRANGE_REC( 0x2B820, 0x2CEAF ), /* CJK Unified Ideographs Extension E */ + AF_UNIRANGE_REC( 0x2CEB0, 0x2EBEF ), /* CJK Unified Ideographs Extension F */ AF_UNIRANGE_REC( 0x2F800, 0x2FA1F ), /* CJK Compatibility Ideographs Supplement */ AF_UNIRANGE_REC( 0, 0 ) }; diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/afscript.h b/Build/source/libs/freetype2/freetype-src/src/autofit/afscript.h index 6ac193f6a71..623a1734a62 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/afscript.h +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/afscript.h @@ -137,7 +137,7 @@ "Georgian (Mkhedruli)", HB_SCRIPT_GEORGIAN, HINTING_BOTTOM_TO_TOP, - "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90" ) /* ი ე ა */ + "\xE1\x83\x98 \xE1\x83\x94 \xE1\x83\x90 \xE1\xB2\xBF" ) /* ი ე ა Ი */ SCRIPT( geok, GEOK, "Georgian (Khutsuri)", diff --git a/Build/source/libs/freetype2/freetype-src/src/autofit/aftypes.h b/Build/source/libs/freetype2/freetype-src/src/autofit/aftypes.h index a50013439bf..6bd8c895b2a 100644 --- a/Build/source/libs/freetype2/freetype-src/src/autofit/aftypes.h +++ b/Build/source/libs/freetype2/freetype-src/src/autofit/aftypes.h @@ -76,9 +76,9 @@ extern void* _af_debug_hints; typedef struct AF_WidthRec_ { - FT_Pos org; /* original position/width in font units */ - FT_Pos cur; /* current/scaled position/width in device sub-pixels */ - FT_Pos fit; /* current/fitted position/width in device sub-pixels */ + FT_Pos org; /* original position/width in font units */ + FT_Pos cur; /* current/scaled position/width in device subpixels */ + FT_Pos fit; /* current/fitted position/width in device subpixels */ } AF_WidthRec, *AF_Width; diff --git a/Build/source/libs/freetype2/freetype-src/src/base/Jamfile b/Build/source/libs/freetype2/freetype-src/src/base/Jamfile index 2b47b8a242a..4994c1b4caa 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/Jamfile +++ b/Build/source/libs/freetype2/freetype-src/src/base/Jamfile @@ -21,8 +21,10 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ; ftadvanc ftcalc ftdbgmem + ftfntfmt ftgloadr fthash + ftlcdfil ftobjs ftoutln ftpic @@ -51,13 +53,11 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ; ftbitmap ftcid ftdebug - ftfntfmt ftfstype ftgasp ftglyph ftgxval ftinit - ftlcdfil ftmm ftotval ftpatent diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftbase.c b/Build/source/libs/freetype2/freetype-src/src/base/ftbase.c index a1bdbaf6eac..f914b9b247b 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/ftbase.c +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftbase.c @@ -23,8 +23,10 @@ #include "ftadvanc.c" #include "ftcalc.c" #include "ftdbgmem.c" +#include "ftfntfmt.c" #include "ftgloadr.c" #include "fthash.c" +#include "ftlcdfil.c" #include "ftmac.c" #include "ftobjs.c" #include "ftoutln.c" diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftbitmap.c b/Build/source/libs/freetype2/freetype-src/src/base/ftbitmap.c index 93efb094479..a9746663faa 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/ftbitmap.c +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftbitmap.c @@ -237,7 +237,7 @@ unsigned char* out = buffer; unsigned char* limit = bitmap->buffer + pitch * bitmap->rows; - unsigned int delta = new_pitch - pitch; + unsigned int delta = new_pitch - len; FT_MEM_ZERO( out, new_pitch * ypixels ); @@ -247,8 +247,10 @@ { FT_MEM_COPY( out, in, len ); in += pitch; - out += pitch; + out += len; + /* we use FT_QALLOC_MULT, which doesn't zero out the buffer; */ + /* consequently, we have to manually zero out the remaining bytes */ FT_MEM_ZERO( out, delta ); out += delta; } @@ -261,14 +263,14 @@ unsigned char* out = buffer; unsigned char* limit = bitmap->buffer + pitch * bitmap->rows; - unsigned int delta = new_pitch - pitch; + unsigned int delta = new_pitch - len; while ( in < limit ) { FT_MEM_COPY( out, in, len ); in += pitch; - out += pitch; + out += len; FT_MEM_ZERO( out, delta ); out += delta; diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftlcdfil.c b/Build/source/libs/freetype2/freetype-src/src/base/ftlcdfil.c index 5c38911a907..8d314df0803 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/ftlcdfil.c +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftlcdfil.c @@ -77,7 +77,7 @@ /* take care of bitmap flow */ - if ( pitch > 0 ) + if ( pitch > 0 && height > 0 ) origin += pitch * (FT_Int)( height - 1 ); /* horizontal in-place FIR filter */ @@ -192,7 +192,7 @@ /* take care of bitmap flow */ - if ( pitch > 0 ) + if ( pitch > 0 && height > 0 ) origin += pitch * (FT_Int)( height - 1 ); /* horizontal in-place intra-pixel filter */ diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c b/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c index 9c29ade92fb..cb91321debf 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c @@ -286,12 +286,13 @@ FT_TRACE5(( "FT_Outline_Decompose: Done\n", n )); return FT_Err_Ok; + Invalid_Outline: + error = FT_THROW( Invalid_Outline ); + /* fall through */ + Exit: FT_TRACE5(( "FT_Outline_Decompose: Error 0x%x\n", error )); return error; - - Invalid_Outline: - return FT_THROW( Invalid_Outline ); } diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftver.rc b/Build/source/libs/freetype2/freetype-src/src/base/ftver.rc new file mode 100644 index 00000000000..a2903d58834 --- /dev/null +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftver.rc @@ -0,0 +1,61 @@ +/***************************************************************************/ +/* */ +/* ftver.rc */ +/* */ +/* FreeType VERSIONINFO resource for Windows DLLs. */ +/* */ +/* Copyright 2018 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#include<windows.h> + +#define FT_VERSION 2,9,1,0 +#define FT_VERSION_STR "2.9.1" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION FT_VERSION +PRODUCTVERSION FT_VERSION +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG +FILEFLAGS VS_FF_DEBUG +#endif +#ifdef _DLL +FILETYPE VFT_DLL +#define FT_FILENAME "freetype.dll" +#else +FILETYPE VFT_STATIC_LIB +#define FT_FILENAME "freetype.lib" +#endif +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "The FreeType Project" + VALUE "FileDescription", "Font Rendering Library" + VALUE "FileVersion", FT_VERSION_STR + VALUE "ProductName", "FreeType" + VALUE "ProductVersion", FT_VERSION_STR + VALUE "LegalCopyright", "\251 2018 The FreeType Project www.freetype.org. All rights reserved." + VALUE "InternalName", "freetype" + VALUE "OriginalFilename", FT_FILENAME + END + END + + BLOCK "VarFileInfo" + BEGIN + /* The following line should only be modified for localized versions. */ + /* It consists of any number of WORD,WORD pairs, with each pair */ + /* describing a "language,codepage" combination supported by the file. */ + VALUE "Translation", 0x409, 1252 + END +END diff --git a/Build/source/libs/freetype2/freetype-src/src/base/rules.mk b/Build/source/libs/freetype2/freetype-src/src/base/rules.mk index 6491f5d8a6b..e9805bd068a 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/rules.mk +++ b/Build/source/libs/freetype2/freetype-src/src/base/rules.mk @@ -40,8 +40,10 @@ BASE_SRC := $(BASE_DIR)/basepic.c \ $(BASE_DIR)/ftadvanc.c \ $(BASE_DIR)/ftcalc.c \ $(BASE_DIR)/ftdbgmem.c \ + $(BASE_DIR)/ftfntfmt.c \ $(BASE_DIR)/ftgloadr.c \ $(BASE_DIR)/fthash.c \ + $(BASE_DIR)/ftlcdfil.c \ $(BASE_DIR)/ftobjs.c \ $(BASE_DIR)/ftoutln.c \ $(BASE_DIR)/ftpic.c \ diff --git a/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c index ba49793dc8a..1c6fe515667 100644 --- a/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c +++ b/Build/source/libs/freetype2/freetype-src/src/cff/cffload.c @@ -1933,6 +1933,24 @@ else if ( priv->initial_random_seed == 0 ) priv->initial_random_seed = 987654321; + /* some sanitizing to avoid overflows later on; */ + /* the upper limits are ad-hoc values */ + if ( priv->blue_shift > 1000 || priv->blue_shift < 0 ) + { + FT_TRACE2(( "cff_load_private_dict:" + " setting unlikely BlueShift value %d to default (7)\n", + priv->blue_shift )); + priv->blue_shift = 7; + } + + if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 ) + { + FT_TRACE2(( "cff_load_private_dict:" + " setting unlikely BlueFuzz value %d to default (1)\n", + priv->blue_fuzz )); + priv->blue_fuzz = 1; + } + Exit: /* clean up */ cff_blend_clear( subfont ); /* clear blend stack */ diff --git a/Build/source/libs/freetype2/freetype-src/src/pshinter/pshglob.c b/Build/source/libs/freetype2/freetype-src/src/pshinter/pshglob.c index 29f328d0e6d..accc04921d0 100644 --- a/Build/source/libs/freetype2/freetype-src/src/pshinter/pshglob.c +++ b/Build/source/libs/freetype2/freetype-src/src/pshinter/pshglob.c @@ -227,8 +227,8 @@ } - /* Re-read blue zones from the original fonts and store them into out */ - /* private structure. This function re-orders, sanitizes and */ + /* Re-read blue zones from the original fonts and store them into our */ + /* private structure. This function re-orders, sanitizes, and */ /* fuzz-expands the zones as well. */ static void psh_blues_set_zones( PSH_Blues target, diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/sfobjs.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/sfobjs.c index 0c917030f37..6ba8509f569 100644 --- a/Build/source/libs/freetype2/freetype-src/src/sfnt/sfobjs.c +++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/sfobjs.c @@ -1144,6 +1144,8 @@ FT_Bool has_outline; FT_Bool is_apple_sbit; FT_Bool is_apple_sbix; + FT_Bool has_CBLC; + FT_Bool has_CBDT; FT_Bool ignore_typographic_family = FALSE; FT_Bool ignore_typographic_subfamily = FALSE; @@ -1224,6 +1226,13 @@ goto Exit; } + has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 ); + has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 ); + + /* Ignore outlines for CBLC/CBDT fonts. */ + if ( has_CBLC || has_CBDT ) + has_outline = FALSE; + /* OpenType 1.8.2 introduced limits to this value; */ /* however, they make sense for older SFNT fonts also */ if ( face->header.Units_Per_EM < 16 || diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttcmap.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttcmap.c index 8cc70f759af..996e66485fa 100644 --- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttcmap.c +++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttcmap.c @@ -222,10 +222,10 @@ /***** The following charmap lookup and iteration functions all *****/ /***** assume that the value `charcode' fulfills the following. *****/ /***** *****/ - /***** - For one byte characters, `charcode' is simply the *****/ + /***** - For one-byte characters, `charcode' is simply the *****/ /***** character code. *****/ /***** *****/ - /***** - For two byte characters, `charcode' is the 2-byte *****/ + /***** - For two-byte characters, `charcode' is the 2-byte *****/ /***** character code in big endian format. More precisely: *****/ /***** *****/ /***** (charcode >> 8) is the first byte value *****/ @@ -252,11 +252,11 @@ /* subs 518 SUBHEAD[NSUBS] sub-headers array */ /* glyph_ids 518+NSUB*8 USHORT[] glyph ID array */ /* */ - /* The `keys' table is used to map charcode high-bytes to sub-headers. */ + /* The `keys' table is used to map charcode high bytes to sub-headers. */ /* The value of `NSUBS' is the number of sub-headers defined in the */ /* table and is computed by finding the maximum of the `keys' table. */ /* */ - /* Note that for any n, `keys[n]' is a byte offset within the `subs' */ + /* Note that for any `n', `keys[n]' is a byte offset within the `subs' */ /* table, i.e., it is the corresponding sub-header index multiplied */ /* by 8. */ /* */ @@ -269,8 +269,8 @@ /* delta 4 SHORT see below */ /* offset 6 USHORT see below */ /* */ - /* A sub-header defines, for each high-byte, the range of valid */ - /* low-bytes within the charmap. Note that the range defined by `first' */ + /* A sub-header defines, for each high byte, the range of valid */ + /* low bytes within the charmap. Note that the range defined by `first' */ /* and `count' must be completely included in the interval [0..255] */ /* according to the specification. */ /* */ @@ -360,7 +360,7 @@ /* check range within 0..255 */ if ( valid->level >= FT_VALIDATE_PARANOID ) { - if ( first_code >= 256 || first_code + code_count > 256 ) + if ( first_code >= 256 || code_count > 256 - first_code ) FT_INVALID_DATA; } @@ -412,7 +412,7 @@ { FT_UInt char_lo = (FT_UInt)( char_code & 0xFF ); FT_UInt char_hi = (FT_UInt)( char_code >> 8 ); - FT_Byte* p = table + 6; /* keys table */ + FT_Byte* p = table + 6; /* keys table */ FT_Byte* subs = table + 518; /* subheaders table */ FT_Byte* sub; @@ -425,8 +425,8 @@ sub = subs; /* jump to first sub-header */ /* check that the sub-header for this byte is 0, which */ - /* indicates that it is really a valid one-byte value */ - /* Otherwise, return 0 */ + /* indicates that it is really a valid one-byte value; */ + /* otherwise, return 0 */ /* */ p += char_lo * 2; if ( TT_PEEK_USHORT( p ) != 0 ) @@ -445,6 +445,7 @@ if ( sub == subs ) goto Exit; } + result = sub; } @@ -517,6 +518,13 @@ FT_UInt pos, idx; + if ( char_lo >= start + count && charcode <= 0xFF ) + { + /* this happens only for a malformed cmap */ + charcode = 0x100; + continue; + } + if ( offset == 0 ) { if ( charcode == 0x100 ) @@ -549,19 +557,18 @@ } } } + + /* if unsuccessful, avoid `charcode' leaving */ + /* the current 256-character block */ + if ( count ) + charcode--; } - /* If `charcode' is <= 0xFF, retry with `charcode + 1'. If */ - /* `charcode' is 0x100 after the loop, do nothing since we have */ - /* just reached the first sub-header for two-byte character codes. */ - /* */ - /* For all other cases, we jump to the next sub-header and adjust */ - /* `charcode' accordingly. */ + /* If `charcode' is <= 0xFF, retry with `charcode + 1'. */ + /* Otherwise jump to the next 256-character block and retry. */ Next_SubHeader: if ( charcode <= 0xFF ) charcode++; - else if ( charcode == 0x100 ) - ; else charcode = FT_PAD_FLOOR( charcode, 0x100 ) + 0x100; } diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttpost.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttpost.c index f140649993a..6de99ef9778 100644 --- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttpost.c +++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttpost.c @@ -473,8 +473,8 @@ /* idx :: The glyph index. */ /* */ /* <InOut> */ - /* PSname :: The address of a string pointer. Will be NULL in case */ - /* of error, otherwise it is a pointer to the glyph name. */ + /* PSname :: The address of a string pointer. Undefined in case of */ + /* error, otherwise it is a pointer to the glyph name. */ /* */ /* You must not modify the returned string! */ /* */ diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttsbit.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttsbit.c index 53e61756d18..33b8640bc31 100644 --- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttsbit.c +++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttsbit.c @@ -1514,7 +1514,7 @@ FT_FRAME_EXIT(); if ( glyph_start == glyph_end ) - return FT_THROW( Invalid_Argument ); + return FT_THROW( Missing_Bitmap ); if ( glyph_start > glyph_end || glyph_end - glyph_start < 8 || face->ebdt_size - strike_offset < glyph_end ) diff --git a/Build/source/libs/freetype2/freetype-src/src/smooth/ftgrays.c b/Build/source/libs/freetype2/freetype-src/src/smooth/ftgrays.c index 6ce6f86444c..803a19e4150 100644 --- a/Build/source/libs/freetype2/freetype-src/src/smooth/ftgrays.c +++ b/Build/source/libs/freetype2/freetype-src/src/smooth/ftgrays.c @@ -404,7 +404,7 @@ typedef ptrdiff_t FT_PtrDist; /* need to define them to "float" or "double" when experimenting with */ /* new algorithms */ - typedef long TPos; /* sub-pixel coordinate */ + typedef long TPos; /* subpixel coordinate */ typedef int TCoord; /* integer scanline/pixel coordinate */ typedef int TArea; /* cell areas, coordinate products */ diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/apinames.c b/Build/source/libs/freetype2/freetype-src/src/tools/apinames.c index 73bc99de5d9..06c3260430e 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/apinames.c +++ b/Build/source/libs/freetype2/freetype-src/src/tools/apinames.c @@ -22,7 +22,7 @@ #include <ctype.h> #define PROGRAM_NAME "apinames" -#define PROGRAM_VERSION "0.2" +#define PROGRAM_VERSION "0.3" #define LINEBUFF_SIZE 1024 @@ -32,7 +32,8 @@ typedef enum OutputFormat_ OUTPUT_WINDOWS_DEF, /* output a Windows .DEF file for Visual C++ or Mingw */ OUTPUT_BORLAND_DEF, /* output a Windows .DEF file for Borland C++ */ OUTPUT_WATCOM_LBC, /* output a Watcom Linker Command File */ - OUTPUT_NETWARE_IMP /* output a NetWare ImportFile */ + OUTPUT_NETWARE_IMP, /* output a NetWare ImportFile */ + OUTPUT_GNU_VERMAP /* output a version map for GNU or Solaris linker */ } OutputFormat; @@ -198,6 +199,15 @@ names_dump( FILE* out, } break; + case OUTPUT_GNU_VERMAP: + { + fprintf( out, "{\n\tglobal:\n" ); + for ( nn = 0; nn < num_names; nn++ ) + fprintf( out, "\t\t%s;\n", the_names[nn].name ); + fprintf( out, "\tlocal:\n\t\t*;\n};\n" ); + } + break; + default: /* LIST */ for ( nn = 0; nn < num_names; nn++ ) fprintf( out, "%s\n", the_names[nn].name ); @@ -323,6 +333,7 @@ usage( void ) " -wB : output .DEF file for Borland C++\n" " -wW : output Watcom Linker Response File\n" " -wN : output NetWare Import File\n" + " -wL : output version map for GNU or Solaris linker\n" "\n"; fprintf( stderr, @@ -410,6 +421,10 @@ int main( int argc, const char* const* argv ) format = OUTPUT_NETWARE_IMP; break; + case 'L': + format = OUTPUT_GNU_VERMAP; + break; + case 0: break; diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py index c9969dbe5bb..198780aee4f 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/content.py @@ -109,7 +109,7 @@ class DocCode: def dump( self, prefix = "", width = 60 ): lines = self.dump_lines( 0, width ) for l in lines: - print prefix + l + print( prefix + l ) def dump_lines( self, margin = 0, width = 60 ): result = [] @@ -139,7 +139,7 @@ class DocPara: def dump( self, prefix = "", width = 60 ): lines = self.dump_lines( 0, width ) for l in lines: - print prefix + l + print( prefix + l ) def dump_lines( self, margin = 0, width = 60 ): cur = "" # current line @@ -243,13 +243,13 @@ class DocField: def dump( self, prefix = "" ): if self.field: - print prefix + self.field + " ::" + print( prefix + self.field + " ::" ) prefix = prefix + "----" first = 1 for p in self.items: if not first: - print "" + print( "" ) p.dump( prefix ) first = 0 @@ -330,10 +330,10 @@ class DocMarkup: return None def dump( self, margin ): - print " " * margin + "<" + self.tag + ">" + print( " " * margin + "<" + self.tag + ">" ) for f in self.fields: f.dump( " " ) - print " " * margin + "</" + self.tag + ">" + print( " " * margin + "</" + self.tag + ">" ) ################################################################ diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docbeauty.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docbeauty.py index 3ddf4a94a15..0b021fa6c97 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docbeauty.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docbeauty.py @@ -10,9 +10,7 @@ from sources import * from content import * from utils import * -import utils - -import sys, os, time, string, getopt +import sys, os, string, getopt content_processor = ContentProcessor() @@ -40,13 +38,13 @@ def beautify_block( block ): def usage(): - print "\nDocBeauty 0.1 Usage information\n" - print " docbeauty [options] file1 [file2 ...]\n" - print "using the following options:\n" - print " -h : print this page" - print " -b : backup original files with the 'orig' extension" - print "" - print " --backup : same as -b" + print( "\nDocBeauty 0.1 Usage information\n" ) + print( " docbeauty [options] file1 [file2 ...]\n" ) + print( "using the following options:\n" ) + print( " -h : print this page" ) + print( " -b : backup original files with the 'orig' extension" ) + print( "" ) + print( " --backup : same as -b" ) def main( argv ): diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py index 253a4d35af7..eb49afb0a0a 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/docmaker.py @@ -31,21 +31,21 @@ from tohtml import * import utils -import sys, os, time, string, glob, getopt +import sys, glob, getopt def usage(): - print "\nDocMaker Usage information\n" - print " docmaker [options] file1 [file2 ...]\n" - print "using the following options:\n" - print " -h : print this page" - print " -t : set project title, as in '-t \"My Project\"'" - print " -o : set output directory, as in '-o mydir'" - print " -p : set documentation prefix, as in '-p ft2'" - print "" - print " --title : same as -t, as in '--title=\"My Project\"'" - print " --output : same as -o, as in '--output=mydir'" - print " --prefix : same as -p, as in '--prefix=ft2'" + print( "\nDocMaker Usage information\n" ) + print( " docmaker [options] file1 [file2 ...]\n" ) + print( "using the following options:\n" ) + print( " -h : print this page" ) + print( " -t : set project title, as in '-t \"My Project\"'" ) + print( " -o : set output directory, as in '-o mydir'" ) + print( " -p : set documentation prefix, as in '-p ft2'" ) + print( "" ) + print( " --title : same as -t, as in '--title=\"My Project\"'" ) + print( " --output : same as -o, as in '--output=mydir'" ) + print( " --prefix : same as -p, as in '--prefix=ft2'" ) def main( argv ): diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py index 2cd5a3379c2..e3b95e0faa7 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/sources.py @@ -29,7 +29,7 @@ # -import fileinput, re, sys, os, string +import fileinput, re, string ################################################################ @@ -296,10 +296,10 @@ class SourceBlock: # debugging only -- not used in normal operations def dump( self ): if self.content: - print "{{{content start---" + print( "{{{content start---" ) for l in self.content: - print l - print "---content end}}}" + print( l ) + print( "---content end}}}" ) return fmt = "" @@ -307,7 +307,7 @@ class SourceBlock: fmt = repr( self.format.id ) + " " for line in self.lines: - print line + print( line ) ################################################################ diff --git a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py index 7f5ecda41ce..9f318a2a494 100644 --- a/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py +++ b/Build/source/libs/freetype2/freetype-src/src/tools/docmaker/tohtml.py @@ -406,7 +406,7 @@ class HtmlFormatter( Formatter ): return string.join( lines, '\n' ) def print_html_items( self, items ): - print self.make_html_items( items ) + print( self.make_html_items( items ) ) def print_html_field( self, field ): if field.name: @@ -414,10 +414,10 @@ class HtmlFormatter( Formatter ): + field.name + "</b></td><td>" ) - print self.make_html_items( field.items ) + print( self.make_html_items( field.items ) ) if field.name: - print "</td></tr></table>" + print( "</td></tr></table>" ) def html_source_quote( self, line, block_name = None ): result = "" @@ -468,14 +468,14 @@ class HtmlFormatter( Formatter ): return result def print_html_field_list( self, fields ): - print '<table class="fields">' + print( '<table class="fields">' ) for field in fields: - print ( '<tr><td class="val" id="' + field.name + '">' - + field.name - + '</td><td class="desc">' ) + print( '<tr><td class="val" id="' + field.name + '">' + + field.name + + '</td><td class="desc">' ) self.print_html_items( field.items ) - print "</td></tr>" - print "</table>" + print( "</td></tr>" ) + print( "</table>" ) def print_html_markup( self, markup ): table_fields = [] @@ -499,7 +499,7 @@ class HtmlFormatter( Formatter ): # formatting the index # def index_enter( self ): - print self.html_index_header + print( self.html_index_header ) self.index_items = {} def index_name_enter( self, name ): @@ -512,7 +512,7 @@ class HtmlFormatter( Formatter ): count = len( self.block_index ) rows = ( count + self.columns - 1 ) // self.columns - print '<table class="index">' + print( '<table class="index">' ) for r in range( rows ): line = "<tr>" for c in range( self.columns ): @@ -531,15 +531,15 @@ class HtmlFormatter( Formatter ): else: line = line + '<td></td>' line = line + "</tr>" - print line + print( line ) - print "</table>" + print( "</table>" ) print( index_footer_start + self.file_prefix + "toc.html" + index_footer_end ) - print self.html_footer + print( self.html_footer ) self.index_items = {} @@ -553,25 +553,25 @@ class HtmlFormatter( Formatter ): # formatting the table of contents # def toc_enter( self ): - print self.html_toc_header - print "<h1>Table of Contents</h1>" + print( self.html_toc_header ) + print( "<h1>Table of Contents</h1>" ) def toc_chapter_enter( self, chapter ): - print chapter_header + string.join( chapter.title ) + chapter_inter - print '<table class="toc">' + print( chapter_header + string.join( chapter.title ) + chapter_inter ) + print( '<table class="toc">' ) def toc_section_enter( self, section ): - print ( '<tr><td class="link">' - + '<a href="' + self.make_section_url( section ) + '">' - + section.title + '</a></td><td class="desc">' ) - print self.make_html_para( section.abstract ) + print( '<tr><td class="link">' + + '<a href="' + self.make_section_url( section ) + '">' + + section.title + '</a></td><td class="desc">' ) + print( self.make_html_para( section.abstract ) ) def toc_section_exit( self, section ): - print "</td></tr>" + print( "</td></tr>" ) def toc_chapter_exit( self, chapter ): - print "</table>" - print chapter_footer + print( "</table>" ) + print( chapter_footer ) def toc_index( self, index_filename ): print( chapter_header @@ -583,7 +583,7 @@ class HtmlFormatter( Formatter ): + self.file_prefix + "index.html" + toc_footer_end ) - print self.html_footer + print( self.html_footer ) def toc_dump( self, toc_filename = None, index_filename = None ): if toc_filename == None: @@ -598,11 +598,11 @@ class HtmlFormatter( Formatter ): # formatting sections # def section_enter( self, section ): - print self.html_header + print( self.html_header ) - print ( section_title_header1 + section.name + section_title_header2 - + section.title - + section_title_footer ) + print( section_title_header1 + section.name + section_title_header2 + + section.title + + section_title_footer ) maxwidth = 0 for b in section.blocks.values(): @@ -612,8 +612,8 @@ class HtmlFormatter( Formatter ): width = 70 # XXX magic number if maxwidth > 0: # print section synopsis - print section_synopsis_header - print '<table class="synopsis">' + print( section_synopsis_header ) + print( '<table class="synopsis">' ) columns = width // maxwidth if columns < 1: @@ -650,17 +650,17 @@ class HtmlFormatter( Formatter ): line = line + '</td>' line = line + "</tr>" - print line + print( line ) - print "</table>" - print section_synopsis_footer + print( "</table>" ) + print( section_synopsis_footer ) - print description_header - print self.make_html_items( section.description ) - print description_footer + print( description_header ) + print( self.make_html_items( section.description ) ) + print( description_footer ) def block_enter( self, block ): - print block_header + print( block_header ) # place html anchor if needed if block.name: @@ -686,28 +686,28 @@ class HtmlFormatter( Formatter ): # + " '" + block.source.filename + "'.\n" ) if header: - print ( header_location_header - + 'Defined in ' + header + '.' - + header_location_footer ) + print( header_location_header + + 'Defined in ' + header + '.' + + header_location_footer ) - print source_header + print( source_header ) for l in block.code: - print self.html_source_quote( l, block.name ) - print source_footer + print( self.html_source_quote( l, block.name ) ) + print( source_footer ) def markup_enter( self, markup, block ): if markup.tag == "description": - print description_header + print( description_header ) else: - print marker_header + markup.tag + marker_inter + print( marker_header + markup.tag + marker_inter ) self.print_html_markup( markup ) def markup_exit( self, markup, block ): if markup.tag == "description": - print description_footer + print( description_footer ) else: - print marker_footer + print( marker_footer ) def block_exit( self, block ): print( block_footer_start + self.file_prefix + "index.html" @@ -715,7 +715,7 @@ class HtmlFormatter( Formatter ): + block_footer_end ) def section_exit( self, section ): - print html_footer + print( html_footer ) def section_dump_all( self ): for section in self.sections: diff --git a/Build/source/libs/freetype2/freetype-src/src/truetype/ttgload.c b/Build/source/libs/freetype2/freetype-src/src/truetype/ttgload.c index 32ed34aba5e..39d9c3f7362 100644 --- a/Build/source/libs/freetype2/freetype-src/src/truetype/ttgload.c +++ b/Build/source/libs/freetype2/freetype-src/src/truetype/ttgload.c @@ -1219,7 +1219,7 @@ * Theoretically, a glyph's bytecode can toggle ClearType's * `backward compatibility' mode, which would allow modification * of the advance width. In reality, however, applications - * neither allow nor expect modified advance widths if sub-pixel + * neither allow nor expect modified advance widths if subpixel * rendering is active. * */ @@ -2709,6 +2709,10 @@ ( load_flags & FT_LOAD_NO_BITMAP ) == 0 && IS_DEFAULT_INSTANCE ) { + FT_Fixed x_scale = size->root.metrics.x_scale; + FT_Fixed y_scale = size->root.metrics.y_scale; + + error = load_sbit_image( size, glyph, glyph_index, load_flags ); if ( FT_ERR_EQ( error, Missing_Bitmap ) ) { @@ -2716,9 +2720,13 @@ /* if we have a bitmap-only font, return an empty glyph */ if ( !FT_IS_SCALABLE( glyph->face ) ) { - TT_Face face = (TT_Face)glyph->face; - FT_Short left_bearing = 0, top_bearing = 0; - FT_UShort advance_width = 0, advance_height = 0; + TT_Face face = (TT_Face)glyph->face; + + FT_Short left_bearing = 0; + FT_Short top_bearing = 0; + + FT_UShort advance_width = 0; + FT_UShort advance_height = 0; /* to return an empty glyph, however, we need metrics data */ @@ -2744,13 +2752,13 @@ glyph->metrics.width = 0; glyph->metrics.height = 0; - glyph->metrics.horiBearingX = left_bearing; + glyph->metrics.horiBearingX = FT_MulFix( left_bearing, x_scale ); glyph->metrics.horiBearingY = 0; - glyph->metrics.horiAdvance = advance_width; + glyph->metrics.horiAdvance = FT_MulFix( advance_width, x_scale ); glyph->metrics.vertBearingX = 0; - glyph->metrics.vertBearingY = top_bearing; - glyph->metrics.vertAdvance = advance_height; + glyph->metrics.vertBearingY = FT_MulFix( top_bearing, y_scale ); + glyph->metrics.vertAdvance = FT_MulFix( advance_height, y_scale ); glyph->format = FT_GLYPH_FORMAT_BITMAP; glyph->bitmap.pixel_mode = FT_PIXEL_MODE_MONO; @@ -2781,13 +2789,11 @@ /* sanity checks: if `xxxAdvance' in the sbit metric */ /* structure isn't set, use `linearXXXAdvance' */ if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance ) - glyph->metrics.horiAdvance = - FT_MulFix( glyph->linearHoriAdvance, - size->metrics->x_scale ); + glyph->metrics.horiAdvance = FT_MulFix( glyph->linearHoriAdvance, + x_scale ); if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance ) - glyph->metrics.vertAdvance = - FT_MulFix( glyph->linearVertAdvance, - size->metrics->y_scale ); + glyph->metrics.vertAdvance = FT_MulFix( glyph->linearVertAdvance, + y_scale ); } return FT_Err_Ok; diff --git a/Build/source/libs/freetype2/freetype-src/src/truetype/ttgxvar.c b/Build/source/libs/freetype2/freetype-src/src/truetype/ttgxvar.c index 6f456cf8c41..29ab2a4efdd 100644 --- a/Build/source/libs/freetype2/freetype-src/src/truetype/ttgxvar.c +++ b/Build/source/libs/freetype2/freetype-src/src/truetype/ttgxvar.c @@ -1733,17 +1733,13 @@ /* based on the [min,def,max] values for the axis to be [-1,0,1]. */ /* Then, if there's an `avar' table, we renormalize this range. */ - FT_TRACE5(( "%d design coordinate%s:\n", - num_coords, - num_coords == 1 ? "" : "s" )); - a = mmvar->axis; for ( i = 0; i < num_coords; i++, a++ ) { FT_Fixed coord = coords[i]; - FT_TRACE5(( " %.5f\n", coord / 65536.0 )); + FT_TRACE5(( " %d: %.5f\n", i, coord / 65536.0 )); if ( coord > a->maximum || coord < a->minimum ) { FT_TRACE1(( @@ -2043,12 +2039,15 @@ FT_TRACE2(( "loaded\n" )); - FT_TRACE5(( "number of GX style axes: %d\n", fvar_head.axisCount )); + FT_TRACE5(( "%d variation ax%s\n", + fvar_head.axisCount, + fvar_head.axisCount == 1 ? "is" : "es" )); if ( FT_NEW( face->blend ) ) goto Exit; - num_axes = fvar_head.axisCount; + num_axes = fvar_head.axisCount; + face->blend->num_axis = num_axes; } else num_axes = face->blend->num_axis; @@ -2142,6 +2141,10 @@ { GX_FVar_Axis axis_rec; +#ifdef FT_DEBUG_LEVEL_TRACE + int invalid = 0; +#endif + if ( FT_STREAM_READ_FIELDS( fvaraxis_fields, &axis_rec ) ) goto Exit; @@ -2162,22 +2165,31 @@ if ( a->minimum > a->def || a->def > a->maximum ) { - FT_TRACE2(( "TT_Get_MM_Var:" - " invalid \"%s\" axis record; disabling\n", - a->name )); - a->minimum = a->def; a->maximum = a->def; + +#ifdef FT_DEBUG_LEVEL_TRACE + invalid = 1; +#endif } - FT_TRACE5(( " \"%s\":" - " minimum=%.5f, default=%.5f, maximum=%.5f," - " flags=0x%04X\n", +#ifdef FT_DEBUG_LEVEL_TRACE + if ( i == 0 ) + FT_TRACE5(( " idx tag " + /* " XXX `XXXX'" */ + " minimum default maximum flags\n" )); + /* " XXXX.XXXXX XXXX.XXXXX XXXX.XXXXX 0xXXXX" */ + + FT_TRACE5(( " %3d `%s'" + " %10.5f %10.5f %10.5f 0x%04X%s\n", + i, a->name, a->minimum / 65536.0, a->def / 65536.0, a->maximum / 65536.0, - *axis_flags )); + *axis_flags, + invalid ? " (invalid, disabled)" : "" )); +#endif a++; axis_flags++; @@ -2202,6 +2214,10 @@ goto Exit; } + FT_TRACE5(( "%d instance%s\n", + fvar_head.instanceCount, + fvar_head.instanceCount == 1 ? "" : "s" )); + ns = mmvar->namedstyle; nsc = face->blend->normalized_stylecoords; for ( i = 0; i < fvar_head.instanceCount; i++, ns++ ) @@ -2224,6 +2240,52 @@ else ns->psid = 0xFFFF; +#ifdef FT_DEBUG_LEVEL_TRACE + { + SFNT_Service sfnt = (SFNT_Service)face->sfnt; + + FT_String* strname = NULL; + FT_String* psname = NULL; + + FT_ULong pos; + + + pos = FT_STREAM_POS(); + + if ( ns->strid != 0xFFFF ) + { + (void)sfnt->get_name( face, + (FT_UShort)ns->strid, + &strname ); + if ( strname && !ft_strcmp( strname, ".notdef" ) ) + strname = NULL; + } + + if ( ns->psid != 0xFFFF ) + { + (void)sfnt->get_name( face, + (FT_UShort)ns->psid, + &psname ); + if ( psname && !ft_strcmp( psname, ".notdef" ) ) + psname = NULL; + } + + (void)FT_STREAM_SEEK( pos ); + + FT_TRACE5(( " instance %d (%s%s%s, %s%s%s)\n", + i, + strname ? "name: `" : "", + strname ? strname : "unnamed", + strname ? "'" : "", + psname ? "PS name: `" : "", + psname ? psname : "no PS name", + psname ? "'" : "" )); + + FT_FREE( strname ); + FT_FREE( psname ); + } +#endif /* FT_DEBUG_LEVEL_TRACE */ + ft_var_to_normalized( face, num_axes, ns->coords, nsc ); nsc += num_axes; @@ -2381,11 +2443,12 @@ num_coords = mmvar->num_axis; } - FT_TRACE5(( "normalized design coordinates:\n" )); + FT_TRACE5(( "TT_Set_MM_Blend:\n" + " normalized design coordinates:\n" )); for ( i = 0; i < num_coords; i++ ) { - FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 )); + FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 )); if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L ) { FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n" @@ -2761,8 +2824,9 @@ } } - /* return value -1 indicates `no change' */ - if ( !have_diff ) + /* return value -1 indicates `no change'; */ + /* we can exit early if `normalizedcoords' is already computed */ + if ( blend->normalizedcoords && !have_diff ) return -1; if ( FT_NEW_ARRAY( normalized, mmvar->num_axis ) ) @@ -2771,6 +2835,8 @@ if ( !face->blend->avar_loaded ) ft_var_load_avar( face ); + FT_TRACE5(( "TT_Set_Var_Design:\n" + " normalized design coordinates:\n" )); ft_var_to_normalized( face, num_coords, blend->coords, normalized ); error = tt_set_mm_blend( face, mmvar->num_axis, normalized, 0 ); diff --git a/Build/source/libs/freetype2/freetype-src/src/truetype/ttinterp.c b/Build/source/libs/freetype2/freetype-src/src/truetype/ttinterp.c index d855aaaa9c6..da9b595aba0 100644 --- a/Build/source/libs/freetype2/freetype-src/src/truetype/ttinterp.c +++ b/Build/source/libs/freetype2/freetype-src/src/truetype/ttinterp.c @@ -2165,7 +2165,7 @@ val = ADD_LONG( distance, exc->threshold - exc->phase + compensation ) & -exc->period; - val += exc->phase; + val = ADD_LONG( val, exc->phase ); if ( val < 0 ) val = exc->phase; } @@ -2174,7 +2174,7 @@ val = NEG_LONG( SUB_LONG( exc->threshold - exc->phase + compensation, distance ) & -exc->period ); - val -= exc->phase; + val = SUB_LONG( val, exc->phase ); if ( val > 0 ) val = -exc->phase; } @@ -2216,7 +2216,7 @@ val = ( ADD_LONG( distance, exc->threshold - exc->phase + compensation ) / exc->period ) * exc->period; - val += exc->phase; + val = ADD_LONG( val, exc->phase ); if ( val < 0 ) val = exc->phase; } @@ -2225,7 +2225,7 @@ val = NEG_LONG( ( SUB_LONG( exc->threshold - exc->phase + compensation, distance ) / exc->period ) * exc->period ); - val -= exc->phase; + val = SUB_LONG( val, exc->phase ); if ( val > 0 ) val = -exc->phase; } @@ -2954,7 +2954,7 @@ static void Ins_CEILING( FT_Long* args ) { - args[0] = FT_PIX_CEIL( args[0] ); + args[0] = FT_PIX_CEIL_LONG( args[0] ); } @@ -3289,7 +3289,10 @@ if ( args[0] < 0 ) exc->error = FT_THROW( Bad_Argument ); else - exc->GS.loop = args[0]; + { + /* we heuristically limit the number of loops to 16 bits */ + exc->GS.loop = args[0] > 0xFFFFL ? 0xFFFFL : args[0]; + } } @@ -5782,6 +5785,7 @@ FT_F26Dot6 distance; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY FT_F26Dot6 control_value_cutin = 0; + FT_F26Dot6 delta; if ( SUBPIXEL_HINTING_INFINALITY ) @@ -5817,11 +5821,15 @@ distance = PROJECT( exc->zp1.cur + point, exc->zp0.cur + exc->GS.rp0 ); #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY + delta = SUB_LONG( distance, args[1] ); + if ( delta < 0 ) + delta = NEG_LONG( delta ); + /* subpixel hinting - make MSIRP respect CVT cut-in; */ - if ( SUBPIXEL_HINTING_INFINALITY && - exc->ignore_x_mode && - exc->GS.freeVector.x != 0 && - FT_ABS( SUB_LONG( distance, args[1] ) ) >= control_value_cutin ) + if ( SUBPIXEL_HINTING_INFINALITY && + exc->ignore_x_mode && + exc->GS.freeVector.x != 0 && + delta >= control_value_cutin ) distance = args[1]; #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ @@ -5869,16 +5877,18 @@ if ( SUBPIXEL_HINTING_INFINALITY && exc->ignore_x_mode && exc->GS.freeVector.x != 0 ) - distance = Round_None( - exc, - cur_dist, - exc->tt_metrics.compensations[0] ) - cur_dist; + distance = SUB_LONG( + Round_None( exc, + cur_dist, + exc->tt_metrics.compensations[0] ), + cur_dist ); else #endif - distance = exc->func_round( - exc, - cur_dist, - exc->tt_metrics.compensations[0] ) - cur_dist; + distance = SUB_LONG( + exc->func_round( exc, + cur_dist, + exc->tt_metrics.compensations[0] ), + cur_dist ); } else distance = 0; @@ -5978,7 +5988,14 @@ if ( ( exc->opcode & 1 ) != 0 ) /* rounding and control cut-in flag */ { - if ( FT_ABS( distance - org_dist ) > control_value_cutin ) + FT_F26Dot6 delta; + + + delta = SUB_LONG( distance, org_dist ); + if ( delta < 0 ) + delta = NEG_LONG( delta ); + + if ( delta > control_value_cutin ) distance = org_dist; #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY @@ -6176,7 +6193,7 @@ minimum_distance = exc->GS.minimum_distance; control_value_cutin = exc->GS.control_value_cutin; point = (FT_UShort)args[0]; - cvtEntry = (FT_ULong)( args[1] + 1 ); + cvtEntry = (FT_ULong)( ADD_LONG( args[1], 1 ) ); #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY if ( SUBPIXEL_HINTING_INFINALITY && @@ -6259,6 +6276,9 @@ if ( exc->GS.gep0 == exc->GS.gep1 ) { + FT_F26Dot6 delta; + + /* XXX: According to Greg Hitchcock, the following wording is */ /* the right one: */ /* */ @@ -6271,7 +6291,11 @@ /* `ttinst2.doc', version 1.66, is thus incorrect since */ /* it implies `>=' instead of `>'. */ - if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) + delta = SUB_LONG( cvt_dist, org_dist ); + if ( delta < 0 ) + delta = NEG_LONG( delta ); + + if ( delta > control_value_cutin ) cvt_dist = org_dist; } @@ -6289,7 +6313,14 @@ exc->ignore_x_mode && exc->GS.gep0 == exc->GS.gep1 ) { - if ( FT_ABS( cvt_dist - org_dist ) > control_value_cutin ) + FT_F26Dot6 delta; + + + delta = SUB_LONG( cvt_dist, org_dist ); + if ( delta < 0 ) + delta = NEG_LONG( delta ); + + if ( delta > control_value_cutin ) cvt_dist = org_dist; } #endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */ @@ -7532,8 +7563,16 @@ return; } - for ( i = 0; i < num_axes; i++ ) - args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ + if ( coords ) + { + for ( i = 0; i < num_axes; i++ ) + args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */ + } + else + { + for ( i = 0; i < num_axes; i++ ) + args[i] = 0; + } } @@ -8487,8 +8526,8 @@ LNo_Error_: FT_TRACE4(( " %d instruction%s executed\n", - ins_counter == 1 ? "" : "s", - ins_counter )); + ins_counter, + ins_counter == 1 ? "" : "s" )); return FT_Err_Ok; LErrorCodeOverflow_: diff --git a/Build/source/libs/freetype2/freetype-src/src/truetype/ttobjs.c b/Build/source/libs/freetype2/freetype-src/src/truetype/ttobjs.c index bc8086f2568..6685dc81960 100644 --- a/Build/source/libs/freetype2/freetype-src/src/truetype/ttobjs.c +++ b/Build/source/libs/freetype2/freetype-src/src/truetype/ttobjs.c @@ -147,7 +147,7 @@ { #define TRICK_NAMES_MAX_CHARACTERS 19 -#define TRICK_NAMES_COUNT 23 +#define TRICK_NAMES_COUNT 26 static const char trick_names[TRICK_NAMES_COUNT] [TRICK_NAMES_MAX_CHARACTERS + 1] = @@ -167,12 +167,15 @@ "DFGirl-W6-WIN-BF", /* dftt-h6.ttf; version 1.00, 1993 */ "DFGothic-EB", /* DynaLab Inc. 1992-1995 */ "DFGyoSho-Lt", /* DynaLab Inc. 1992-1995 */ + "DFHei-Md-HK-BF", /* maybe DynaLab Inc. */ "DFHSGothic-W5", /* DynaLab Inc. 1992-1995 */ "DFHSMincho-W3", /* DynaLab Inc. 1992-1995 */ "DFHSMincho-W7", /* DynaLab Inc. 1992-1995 */ "DFKaiSho-SB", /* dfkaisb.ttf */ "DFKaiShu", + "DFKaiShu-Md-HK-BF", /* maybe DynaLab Inc. */ "DFKai-SB", /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */ + "DFMing-Bd-HK-BF", /* maybe DynaLab Inc. */ "DLC", /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */ /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */ "DLCHayMedium", /* dftt-b5.ttf; version 1.00, 1993 */ @@ -270,7 +273,7 @@ tt_check_trickyness_sfnt_ids( TT_Face face ) { #define TRICK_SFNT_IDS_PER_FACE 3 -#define TRICK_SFNT_IDS_NUM_FACES 26 +#define TRICK_SFNT_IDS_NUM_FACES 29 static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES] [TRICK_SFNT_IDS_PER_FACE] = { @@ -299,6 +302,11 @@ { 0xCE5956E9UL, 0x0000BC85UL }, /* fpgm */ { 0x8272F416UL, 0x00000045UL } /* prep */ }, + { /* DFHei-Md-HK-BF */ + { 0x1257EB46UL, 0x00000350UL }, /* cvt */ + { 0xF699D160UL, 0x0000715FUL }, /* fpgm */ + { 0xD222F568UL, 0x000003BCUL } /* prep */ + }, { /* DFHSGothic-W5 */ { 0x1262EB4EUL, 0x00000350UL }, /* cvt */ { 0xE86A5D64UL, 0x00007940UL }, /* fpgm */ @@ -324,6 +332,16 @@ { 0xA6E78C01UL, 0x00008998UL }, /* fpgm */ { 0x13A42602UL, 0x0000007EUL } /* prep */ }, + { /* DFKaiShu-Md-HK-BF */ + { 0x11E5EAD4UL, 0x00000360UL }, /* cvt */ + { 0x9DB282B2UL, 0x0000C06EUL }, /* fpgm */ + { 0x53E6D7CAUL, 0x00000082UL } /* prep */ + }, + { /* DFMing-Bd-HK-BF */ + { 0x1243EB18UL, 0x00000350UL }, /* cvt */ + { 0xBA0A8C30UL, 0x000074ADUL }, /* fpgm */ + { 0xF3D83409UL, 0x0000037BUL } /* prep */ + }, { /* DLCLiShu */ { 0x07DCF546UL, 0x00000308UL }, /* cvt */ { 0x40FE7C90UL, 0x00008E2AUL }, /* fpgm */ diff --git a/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c b/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c index 2b8d4893c69..9dfa637a695 100644 --- a/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c +++ b/Build/source/libs/freetype2/freetype-src/src/type1/t1load.c @@ -2493,6 +2493,24 @@ type1->encoding.num_chars = loader.num_chars; } + /* some sanitizing to avoid overflows later on; */ + /* the upper limits are ad-hoc values */ + if ( priv->blue_shift > 1000 || priv->blue_shift < 0 ) + { + FT_TRACE2(( "T1_Open_Face:" + " setting unlikely BlueShift value %d to default (7)\n", + priv->blue_shift )); + priv->blue_shift = 7; + } + + if ( priv->blue_fuzz > 1000 || priv->blue_fuzz < 0 ) + { + FT_TRACE2(( "T1_Open_Face:" + " setting unlikely BlueFuzz value %d to default (1)\n", + priv->blue_fuzz )); + priv->blue_fuzz = 1; + } + Exit: t1_done_loader( &loader ); return error; |