[autofit] Improve Arabic hinting. Problem reported by Titus Nemeth <tn@tntypography.eu> (by using ttfautohint). * src/autofit/afblue.dat: Add neutral blue zone for the tatweel character. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
diff --git a/ChangeLog b/ChangeLog
index 6d167f8..de55ffa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-08-06 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve Arabic hinting.
+
+ Problem reported by Titus Nemeth <tn@tntypography.eu> (by using
+ ttfautohint).
+
+ * src/autofit/afblue.dat: Add neutral blue zone for the tatweel
+ character.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
2015-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Clean up types.
diff --git a/src/autofit/afblue.c b/src/autofit/afblue.c
index e2b2451..62da0f2 100644
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -30,6 +30,8 @@
'\0',
'\xD8', '\xAA', '\xD8', '\xAB', '\xD8', '\xB7', '\xD8', '\xB8', '\xD9', '\x83', /* ت ث ط ظ ك */
'\0',
+ '\xD9', '\x80', /* ـ */
+ '\0',
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */
'\0',
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */
@@ -139,9 +141,10 @@
af_blue_stringsets[] =
{
/* */
- { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
- { AF_BLUE_STRING_ARABIC_JOIN, 0 },
- { AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_ARABIC_BOTTOM, 0 },
+ { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL },
+ { AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 },
{ AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
diff --git a/src/autofit/afblue.dat b/src/autofit/afblue.dat
index fd5684e..8facfec 100644
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -69,8 +69,15 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_ARABIC_TOP
"ا إ ل ك ط ظ"
- AF_BLUE_STRING_ARABIC_JOIN
+ AF_BLUE_STRING_ARABIC_BOTTOM
"ت ث ط ظ ك"
+ // We don't necessarily have access to medial forms via Unicode in case
+ // Arabic presentational forms are missing. The only character that is
+ // guaranteed to have the same vertical position with joining (this is,
+ // non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both
+ // round and flat curves.
+ AF_BLUE_STRING_ARABIC_JOIN
+ "ـ"
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
"БВЕПЗОСЭ"
@@ -289,9 +296,10 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
AF_BLUE_STRINGSET_ARAB
- { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
- { AF_BLUE_STRING_ARABIC_JOIN, 0 }
- { AF_BLUE_STRING_MAX, 0 }
+ { AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_ARABIC_BOTTOM, 0 }
+ { AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }
+ { AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_CYRL
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
diff --git a/src/autofit/afblue.h b/src/autofit/afblue.h
index 94e33a9..2080e31 100644
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -75,38 +75,39 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_String_
{
AF_BLUE_STRING_ARABIC_TOP = 0,
- AF_BLUE_STRING_ARABIC_JOIN = 13,
- AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 24,
- AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 41,
- AF_BLUE_STRING_CYRILLIC_SMALL = 58,
- AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 75,
- AF_BLUE_STRING_DEVANAGARI_BASE = 82,
- AF_BLUE_STRING_DEVANAGARI_TOP = 107,
- AF_BLUE_STRING_DEVANAGARI_HEAD = 132,
- AF_BLUE_STRING_DEVANAGARI_BOTTOM = 157,
- AF_BLUE_STRING_GREEK_CAPITAL_TOP = 164,
- AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 179,
- AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 192,
- AF_BLUE_STRING_GREEK_SMALL = 205,
- AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 222,
- AF_BLUE_STRING_HEBREW_TOP = 239,
- AF_BLUE_STRING_HEBREW_BOTTOM = 256,
- AF_BLUE_STRING_HEBREW_DESCENDER = 269,
- AF_BLUE_STRING_LATIN_CAPITAL_TOP = 280,
- AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 289,
- AF_BLUE_STRING_LATIN_SMALL_F_TOP = 298,
- AF_BLUE_STRING_LATIN_SMALL = 306,
- AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 314,
- AF_BLUE_STRING_TELUGU_TOP = 320,
- AF_BLUE_STRING_TELUGU_BOTTOM = 342,
- AF_BLUE_STRING_THAI_TOP = 364,
- AF_BLUE_STRING_THAI_BOTTOM = 383,
- AF_BLUE_STRING_THAI_ASCENDER = 405,
- AF_BLUE_STRING_THAI_LARGE_ASCENDER = 415,
- AF_BLUE_STRING_THAI_DESCENDER = 425,
- AF_BLUE_STRING_THAI_LARGE_DESCENDER = 438,
- AF_BLUE_STRING_THAI_DIGIT_TOP = 445,
- af_blue_1_1 = 454,
+ AF_BLUE_STRING_ARABIC_BOTTOM = 13,
+ AF_BLUE_STRING_ARABIC_JOIN = 24,
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 27,
+ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 44,
+ AF_BLUE_STRING_CYRILLIC_SMALL = 61,
+ AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 78,
+ AF_BLUE_STRING_DEVANAGARI_BASE = 85,
+ AF_BLUE_STRING_DEVANAGARI_TOP = 110,
+ AF_BLUE_STRING_DEVANAGARI_HEAD = 135,
+ AF_BLUE_STRING_DEVANAGARI_BOTTOM = 160,
+ AF_BLUE_STRING_GREEK_CAPITAL_TOP = 167,
+ AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 182,
+ AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 195,
+ AF_BLUE_STRING_GREEK_SMALL = 208,
+ AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 225,
+ AF_BLUE_STRING_HEBREW_TOP = 242,
+ AF_BLUE_STRING_HEBREW_BOTTOM = 259,
+ AF_BLUE_STRING_HEBREW_DESCENDER = 272,
+ AF_BLUE_STRING_LATIN_CAPITAL_TOP = 283,
+ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 292,
+ AF_BLUE_STRING_LATIN_SMALL_F_TOP = 301,
+ AF_BLUE_STRING_LATIN_SMALL = 309,
+ AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 317,
+ AF_BLUE_STRING_TELUGU_TOP = 323,
+ AF_BLUE_STRING_TELUGU_BOTTOM = 345,
+ AF_BLUE_STRING_THAI_TOP = 367,
+ AF_BLUE_STRING_THAI_BOTTOM = 386,
+ AF_BLUE_STRING_THAI_ASCENDER = 408,
+ AF_BLUE_STRING_THAI_LARGE_ASCENDER = 418,
+ AF_BLUE_STRING_THAI_DESCENDER = 428,
+ AF_BLUE_STRING_THAI_LARGE_DESCENDER = 441,
+ AF_BLUE_STRING_THAI_DIGIT_TOP = 448,
+ af_blue_1_1 = 457,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153,
@@ -165,14 +166,14 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_Stringset_
{
AF_BLUE_STRINGSET_ARAB = 0,
- AF_BLUE_STRINGSET_CYRL = 3,
- AF_BLUE_STRINGSET_DEVA = 9,
- AF_BLUE_STRINGSET_GREK = 15,
- AF_BLUE_STRINGSET_HEBR = 22,
- AF_BLUE_STRINGSET_LATN = 26,
- AF_BLUE_STRINGSET_TELU = 33,
- AF_BLUE_STRINGSET_THAI = 36,
- af_blue_2_1 = 44,
+ AF_BLUE_STRINGSET_CYRL = 4,
+ AF_BLUE_STRINGSET_DEVA = 10,
+ AF_BLUE_STRINGSET_GREK = 16,
+ AF_BLUE_STRINGSET_HEBR = 23,
+ AF_BLUE_STRINGSET_LATN = 27,
+ AF_BLUE_STRINGSET_TELU = 34,
+ AF_BLUE_STRINGSET_THAI = 37,
+ af_blue_2_1 = 45,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,