[autofit] Add blue-zone support for Gujarati script.

This essentially moves the Gujarati script from the `Indic' hinter to
the `Latin' hinter.

* src/autofit/afblue.dat: Add blue zone data for Gujarati.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/afscript.h: Add Gujarati standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.

* src/autofit/afranges.c: Move Gujarati data out of
AF_CONFIG_OPTION_INDIC block.

* src/autofit/afstyles.h: Update Gujarati data; in particular, use
AF_WRITING_SYSTEM_LATIN.
This commit is contained in:
Werner Lemberg 2016-04-25 21:18:24 +02:00
parent d9fb2175c4
commit 22167629d1
7 changed files with 162 additions and 93 deletions

View File

@ -1,3 +1,23 @@
2016-04-25 Werner Lemberg <wl@gnu.org>
[autofit] Add blue-zone support for Gujarati script.
This essentially moves the Gujarati script from the `Indic' hinter to
the `Latin' hinter.
* src/autofit/afblue.dat: Add blue zone data for Gujarati.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
* src/autofit/afscript.h: Add Gujarati standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.
* src/autofit/afranges.c: Move Gujarati data out of
AF_CONFIG_OPTION_INDIC block.
* src/autofit/afstyles.h: Update Gujarati data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-04-24 Werner Lemberg <wl@gnu.org>
Minor.

View File

@ -84,6 +84,16 @@
'\0',
'\xCE', '\xB2', ' ', '\xCE', '\xB3', ' ', '\xCE', '\xB7', ' ', '\xCE', '\xBC', ' ', '\xCF', '\x81', ' ', '\xCF', '\x86', ' ', '\xCF', '\x87', ' ', '\xCF', '\x88', /* β γ η μ ρ φ χ ψ */
'\0',
'\xE0', '\xAA', '\xA4', ' ', '\xE0', '\xAA', '\xA8', ' ', '\xE0', '\xAA', '\x8B', ' ', '\xE0', '\xAA', '\x8C', ' ', '\xE0', '\xAA', '\x9B', ' ', '\xE0', '\xAA', '\x9F', ' ', '\xE0', '\xAA', '\xB0', ' ', '\xE0', '\xAB', '\xA6', /* ત ન ઋ ઌ છ ટ ર */
'\0',
'\xE0', '\xAA', '\x96', ' ', '\xE0', '\xAA', '\x97', ' ', '\xE0', '\xAA', '\x98', ' ', '\xE0', '\xAA', '\x9E', ' ', '\xE0', '\xAA', '\x87', ' ', '\xE0', '\xAA', '\x88', ' ', '\xE0', '\xAA', '\xA0', ' ', '\xE0', '\xAA', '\x9C', /* ખ ગ ઘ ઞ ઇ ઈ ઠ જ */
'\0',
'\xE0', '\xAA', '\x88', ' ', '\xE0', '\xAA', '\x8A', ' ', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAB', '\x80', ' ', '\xE0', '\xAA', '\xB2', '\xE0', '\xAB', '\x80', ' ', '\xE0', '\xAA', '\xB6', '\xE0', '\xAB', '\x8D', '\xE0', '\xAA', '\x9A', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAA', '\x9C', '\xE0', '\xAA', '\xBF', ' ', '\xE0', '\xAA', '\xB8', '\xE0', '\xAB', '\x80', /* ઈ ઊ િ ી લી શ્ચિ જિ સી */
'\0',
'\xE0', '\xAB', '\x81', ' ', '\xE0', '\xAB', '\x83', ' ', '\xE0', '\xAB', '\x84', ' ', '\xE0', '\xAA', '\x96', '\xE0', '\xAB', '\x81', ' ', '\xE0', '\xAA', '\x9B', '\xE0', '\xAB', '\x83', ' ', '\xE0', '\xAA', '\x9B', '\xE0', '\xAB', '\x84', /* ુ ૃ ૄ ખુ છૃ છૄ */
'\0',
'\xE0', '\xAB', '\xA6', ' ', '\xE0', '\xAB', '\xA7', ' ', '\xE0', '\xAB', '\xA8', ' ', '\xE0', '\xAB', '\xA9', ' ', '\xE0', '\xAB', '\xAD', /* ૧ ૨ ૩ ૭ */
'\0',
'\xD7', '\x91', ' ', '\xD7', '\x93', ' ', '\xD7', '\x94', ' ', '\xD7', '\x97', ' ', '\xD7', '\x9A', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', /* ב ד ה ח ך כ ם ס */
'\0',
'\xD7', '\x91', ' ', '\xD7', '\x98', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', ' ', '\xD7', '\xA6', /* ב ט כ ם ס צ */
@ -285,6 +295,13 @@
{ AF_BLUE_STRING_GREEK_SMALL, 0 },
{ AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_GUJARATI_BOTTOM, 0 },
{ AF_BLUE_STRING_GUJARATI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_GUJARATI_DESCENDER, 0 },
{ AF_BLUE_STRING_GUJARATI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_LONG },
{ AF_BLUE_STRING_HEBREW_BOTTOM, 0 },

View File

@ -148,6 +148,17 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_GREEK_SMALL_DESCENDER
γ η μ ρ φ χ ψ"
AF_BLUE_STRING_GUJARATI_TOP
"ત ન ઋ ઌ છ ટ ર "
AF_BLUE_STRING_GUJARATI_BOTTOM
"ખ ગ ઘ ઞ ઇ ઈ ઠ જ"
AF_BLUE_STRING_GUJARATI_ASCENDER
"ઈ ઊ િ ી લી શ્ચિ જિ સી"
AF_BLUE_STRING_GUJARATI_DESCENDER
"ુ ૃ ૄ ખુ છૃ છૄ"
AF_BLUE_STRING_GUJARATI_DIGIT_TOP
" ૧ ૨ ૩ ૭"
AF_BLUE_STRING_HEBREW_TOP
"ב ד ה ח ך כ ם ס"
AF_BLUE_STRING_HEBREW_BOTTOM
@ -497,6 +508,15 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_GUJR
{ AF_BLUE_STRING_GUJARATI_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
{ AF_BLUE_STRING_GUJARATI_BOTTOM, 0 }
{ AF_BLUE_STRING_GUJARATI_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_GUJARATI_DESCENDER, 0 }
{ AF_BLUE_STRING_GUJARATI_DIGIT_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_HEBR
{ AF_BLUE_STRING_HEBREW_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_LONG }

View File

@ -106,59 +106,64 @@ FT_BEGIN_HEADER
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 672,
AF_BLUE_STRING_GREEK_SMALL = 690,
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 714,
AF_BLUE_STRING_HEBREW_TOP = 738,
AF_BLUE_STRING_HEBREW_BOTTOM = 762,
AF_BLUE_STRING_HEBREW_DESCENDER = 780,
AF_BLUE_STRING_KANNADA_TOP = 795,
AF_BLUE_STRING_KANNADA_BOTTOM = 839,
AF_BLUE_STRING_KHMER_TOP = 871,
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 895,
AF_BLUE_STRING_KHMER_BOTTOM = 935,
AF_BLUE_STRING_KHMER_DESCENDER = 967,
AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 1001,
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 1088,
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 1096,
AF_BLUE_STRING_LAO_TOP = 1104,
AF_BLUE_STRING_LAO_BOTTOM = 1136,
AF_BLUE_STRING_LAO_ASCENDER = 1168,
AF_BLUE_STRING_LAO_LARGE_ASCENDER = 1184,
AF_BLUE_STRING_LAO_DESCENDER = 1196,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 1220,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 1236,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 1252,
AF_BLUE_STRING_LATIN_SMALL = 1266,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 1280,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 1290,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 1310,
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 1330,
AF_BLUE_STRING_LATIN_SUBS_SMALL = 1350,
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 1386,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 1406,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 1437,
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 1466,
AF_BLUE_STRING_LATIN_SUPS_SMALL = 1492,
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 1517,
AF_BLUE_STRING_MALAYALAM_TOP = 1528,
AF_BLUE_STRING_MALAYALAM_BOTTOM = 1572,
AF_BLUE_STRING_MYANMAR_TOP = 1604,
AF_BLUE_STRING_MYANMAR_BOTTOM = 1636,
AF_BLUE_STRING_MYANMAR_ASCENDER = 1668,
AF_BLUE_STRING_MYANMAR_DESCENDER = 1696,
AF_BLUE_STRING_SINHALA_TOP = 1728,
AF_BLUE_STRING_SINHALA_BOTTOM = 1760,
AF_BLUE_STRING_SINHALA_DESCENDER = 1792,
AF_BLUE_STRING_TAMIL_TOP = 1836,
AF_BLUE_STRING_TAMIL_BOTTOM = 1868,
AF_BLUE_STRING_TELUGU_TOP = 1900,
AF_BLUE_STRING_TELUGU_BOTTOM = 1928,
AF_BLUE_STRING_THAI_TOP = 1956,
AF_BLUE_STRING_THAI_BOTTOM = 1980,
AF_BLUE_STRING_THAI_ASCENDER = 2008,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2020,
AF_BLUE_STRING_THAI_DESCENDER = 2032,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2048,
AF_BLUE_STRING_THAI_DIGIT_TOP = 2056,
af_blue_1_1 = 2067,
AF_BLUE_STRING_GUJARATI_TOP = 738,
AF_BLUE_STRING_GUJARATI_BOTTOM = 770,
AF_BLUE_STRING_GUJARATI_ASCENDER = 802,
AF_BLUE_STRING_GUJARATI_DESCENDER = 852,
AF_BLUE_STRING_GUJARATI_DIGIT_TOP = 885,
AF_BLUE_STRING_HEBREW_TOP = 905,
AF_BLUE_STRING_HEBREW_BOTTOM = 929,
AF_BLUE_STRING_HEBREW_DESCENDER = 947,
AF_BLUE_STRING_KANNADA_TOP = 962,
AF_BLUE_STRING_KANNADA_BOTTOM = 1006,
AF_BLUE_STRING_KHMER_TOP = 1038,
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 1062,
AF_BLUE_STRING_KHMER_BOTTOM = 1102,
AF_BLUE_STRING_KHMER_DESCENDER = 1134,
AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 1168,
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 1255,
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 1263,
AF_BLUE_STRING_LAO_TOP = 1271,
AF_BLUE_STRING_LAO_BOTTOM = 1303,
AF_BLUE_STRING_LAO_ASCENDER = 1335,
AF_BLUE_STRING_LAO_LARGE_ASCENDER = 1351,
AF_BLUE_STRING_LAO_DESCENDER = 1363,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 1387,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 1403,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 1419,
AF_BLUE_STRING_LATIN_SMALL = 1433,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 1447,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 1457,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 1477,
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 1497,
AF_BLUE_STRING_LATIN_SUBS_SMALL = 1517,
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 1553,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 1573,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 1604,
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 1633,
AF_BLUE_STRING_LATIN_SUPS_SMALL = 1659,
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 1684,
AF_BLUE_STRING_MALAYALAM_TOP = 1695,
AF_BLUE_STRING_MALAYALAM_BOTTOM = 1739,
AF_BLUE_STRING_MYANMAR_TOP = 1771,
AF_BLUE_STRING_MYANMAR_BOTTOM = 1803,
AF_BLUE_STRING_MYANMAR_ASCENDER = 1835,
AF_BLUE_STRING_MYANMAR_DESCENDER = 1863,
AF_BLUE_STRING_SINHALA_TOP = 1895,
AF_BLUE_STRING_SINHALA_BOTTOM = 1927,
AF_BLUE_STRING_SINHALA_DESCENDER = 1959,
AF_BLUE_STRING_TAMIL_TOP = 2003,
AF_BLUE_STRING_TAMIL_BOTTOM = 2035,
AF_BLUE_STRING_TELUGU_TOP = 2067,
AF_BLUE_STRING_TELUGU_BOTTOM = 2095,
AF_BLUE_STRING_THAI_TOP = 2123,
AF_BLUE_STRING_THAI_BOTTOM = 2147,
AF_BLUE_STRING_THAI_ASCENDER = 2175,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 2187,
AF_BLUE_STRING_THAI_DESCENDER = 2199,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 2215,
AF_BLUE_STRING_THAI_DIGIT_TOP = 2223,
af_blue_1_1 = 2234,
#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,
@ -224,22 +229,23 @@ FT_BEGIN_HEADER
AF_BLUE_STRINGSET_GEOR = 21,
AF_BLUE_STRINGSET_GEOK = 26,
AF_BLUE_STRINGSET_GREK = 33,
AF_BLUE_STRINGSET_HEBR = 40,
AF_BLUE_STRINGSET_KNDA = 44,
AF_BLUE_STRINGSET_KHMR = 47,
AF_BLUE_STRINGSET_KHMS = 53,
AF_BLUE_STRINGSET_LAO = 56,
AF_BLUE_STRINGSET_LATN = 62,
AF_BLUE_STRINGSET_LATB = 69,
AF_BLUE_STRINGSET_LATP = 76,
AF_BLUE_STRINGSET_MLYM = 83,
AF_BLUE_STRINGSET_MYMR = 86,
AF_BLUE_STRINGSET_NONE = 91,
AF_BLUE_STRINGSET_SINH = 92,
AF_BLUE_STRINGSET_TAML = 96,
AF_BLUE_STRINGSET_TELU = 99,
AF_BLUE_STRINGSET_THAI = 102,
af_blue_2_1 = 110,
AF_BLUE_STRINGSET_GUJR = 40,
AF_BLUE_STRINGSET_HEBR = 46,
AF_BLUE_STRINGSET_KNDA = 50,
AF_BLUE_STRINGSET_KHMR = 53,
AF_BLUE_STRINGSET_KHMS = 59,
AF_BLUE_STRINGSET_LAO = 62,
AF_BLUE_STRINGSET_LATN = 68,
AF_BLUE_STRINGSET_LATB = 75,
AF_BLUE_STRINGSET_LATP = 82,
AF_BLUE_STRINGSET_MLYM = 89,
AF_BLUE_STRINGSET_MYMR = 92,
AF_BLUE_STRINGSET_NONE = 97,
AF_BLUE_STRINGSET_SINH = 98,
AF_BLUE_STRINGSET_TAML = 102,
AF_BLUE_STRINGSET_TELU = 105,
AF_BLUE_STRINGSET_THAI = 108,
af_blue_2_1 = 116,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,

View File

@ -208,6 +208,23 @@
};
const AF_Script_UniRangeRec af_gujr_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_gujr_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A81UL, 0x0A82UL ),
AF_UNIRANGE_REC( 0x0ABCUL, 0x0ABCUL ),
AF_UNIRANGE_REC( 0x0AC1UL, 0x0AC8UL ),
AF_UNIRANGE_REC( 0x0ACDUL, 0x0ACDUL ),
AF_UNIRANGE_REC( 0x0AE2UL, 0x0AE3UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_hebr_uniranges[] =
{
AF_UNIRANGE_REC( 0x0590UL, 0x05FFUL ), /* Hebrew */
@ -498,23 +515,6 @@
#ifdef AF_CONFIG_OPTION_INDIC
const AF_Script_UniRangeRec af_gujr_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_gujr_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A81UL, 0x0A82UL ),
AF_UNIRANGE_REC( 0x0ABCUL, 0x0ABCUL ),
AF_UNIRANGE_REC( 0x0AC1UL, 0x0AC8UL ),
AF_UNIRANGE_REC( 0x0ACDUL, 0x0ACDUL ),
AF_UNIRANGE_REC( 0x0AE2UL, 0x0AE3UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_guru_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A00UL, 0x0A7FUL ), /* Gurmukhi */

View File

@ -73,6 +73,12 @@
HINTING_BOTTOM_TO_TOP,
"\xCE\xBF \xCE\x9F" ) /* ο Ο */
SCRIPT( gujr, GUJR,
"Gujarati",
HB_SCRIPT_GUJARATI,
HINTING_BOTTOM_TO_TOP,
"\xE0\xAA\x9F \xE0\xAB\xA6" ) /* ટ */
SCRIPT( hebr, HEBR,
"Hebrew",
HB_SCRIPT_HEBREW,
@ -169,12 +175,6 @@
#ifdef AF_CONFIG_OPTION_INDIC
SCRIPT( gujr, GUJR,
"Gujarati",
HB_SCRIPT_GUJARATI,
HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( guru, GURU,
"Gurmukhi",
HB_SCRIPT_GURMUKHI,

View File

@ -122,6 +122,13 @@
META_STYLE_LATIN( grek, GREK, "Greek" )
STYLE( gujr_dflt, GUJR_DFLT,
"Gujarati default style",
AF_WRITING_SYSTEM_LATIN,
AF_SCRIPT_GUJR,
AF_BLUE_STRINGSET_GUJR,
AF_COVERAGE_DEFAULT )
STYLE( hebr_dflt, HEBR_DFLT,
"Hebrew default style",
AF_WRITING_SYSTEM_LATIN,
@ -243,7 +250,6 @@
(AF_Blue_Stringset)0, \
AF_COVERAGE_DEFAULT )
STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" )
STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" )
STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )