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

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

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

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

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

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

* src/autofit/afstyles.h: Update Bengali data; in particular, use
AF_WRITING_SYSTEM_LATIN.
This commit is contained in:
Werner Lemberg 2015-12-15 17:53:46 +01:00
parent a512b0fe7a
commit 02451c7917
7 changed files with 154 additions and 94 deletions

View File

@ -1,3 +1,23 @@
2015-12-15 Werner Lemberg <wl@gnu.org>
[autofit] Add blue-zone support for Bengali script.
This essentially moves the Bengali script from the `Indic' hinter to
the `Latin' hinter.
* src/autofit/afblue.dat: Add blue zone data for Bengali.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
* src/autofit/afscript.h: Add Bengali standard characters and move
data out of AF_CONFIG_OPTION_INDIC block.
* src/autofit/afranges.c: Move Bengali data out of
AF_CONFIG_OPTION_INDIC block.
* src/autofit/afstyles.h: Update Bengali data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2015-12-14 Ben Wagner <bungeman@gmail.com>
[bdf] Remove dead code (#46625).

View File

@ -32,6 +32,12 @@
'\0',
'\xD9', '\x80', /* ـ */
'\0',
'\xE0', '\xA6', '\x85', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xAD', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* অ ড ত ন ব ভ ল ক */
'\0',
'\xE0', '\xA6', '\x87', ' ', '\xE0', '\xA6', '\x9F', ' ', '\xE0', '\xA6', '\xA0', ' ', '\xE0', '\xA6', '\xBF', ' ', '\xE0', '\xA7', '\x80', ' ', '\xE0', '\xA7', '\x88', ' ', '\xE0', '\xA7', '\x97', ' ', /* ই ট ঠ ি ী ৈ ৗ */
'\0',
'\xE0', '\xA6', '\x93', ' ', '\xE0', '\xA6', '\x8F', ' ', '\xE0', '\xA6', '\xA1', ' ', '\xE0', '\xA6', '\xA4', ' ', '\xE0', '\xA6', '\xA8', ' ', '\xE0', '\xA6', '\xAC', ' ', '\xE0', '\xA6', '\xB2', ' ', '\xE0', '\xA6', '\x95', /* ও এ ড ত ন ব ল ক */
'\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', /* Б В Е Ш З О С Э */
@ -197,6 +203,13 @@
{ AF_BLUE_STRING_ARABIC_BOTTOM, 0 },
{ AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_NEUTRAL |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
{ AF_BLUE_STRING_BENGALI_BASE, 0 },
{ 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 |

View File

@ -86,6 +86,13 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_ARABIC_JOIN
"ـ"
AF_BLUE_STRING_BENGALI_BASE
"অ ড ত ন ব ভ ল ক"
AF_BLUE_STRING_BENGALI_TOP
"ই ট ঠ ি ী ৈ ৗ "
AF_BLUE_STRING_BENGALI_HEAD
"ও এ ড ত ন ব ল ক"
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
В Е П З О С Э"
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
@ -388,6 +395,15 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_BENG
{ AF_BLUE_STRING_BENGALI_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_BENGALI_HEAD, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_BENGALI_BASE, AF_BLUE_PROPERTY_LATIN_TOP |
AF_BLUE_PROPERTY_LATIN_NEUTRAL |
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
{ AF_BLUE_STRING_BENGALI_BASE, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_CYRL
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 }

View File

@ -80,63 +80,66 @@ FT_BEGIN_HEADER
AF_BLUE_STRING_ARABIC_TOP = 0,
AF_BLUE_STRING_ARABIC_BOTTOM = 18,
AF_BLUE_STRING_ARABIC_JOIN = 33,
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 36,
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 60,
AF_BLUE_STRING_CYRILLIC_SMALL = 84,
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 108,
AF_BLUE_STRING_DEVANAGARI_BASE = 117,
AF_BLUE_STRING_DEVANAGARI_TOP = 149,
AF_BLUE_STRING_DEVANAGARI_HEAD = 181,
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 213,
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 221,
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 242,
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 260,
AF_BLUE_STRING_GREEK_SMALL = 278,
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 302,
AF_BLUE_STRING_HEBREW_TOP = 326,
AF_BLUE_STRING_HEBREW_BOTTOM = 350,
AF_BLUE_STRING_HEBREW_DESCENDER = 368,
AF_BLUE_STRING_KHMER_TOP = 383,
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 407,
AF_BLUE_STRING_KHMER_BOTTOM = 447,
AF_BLUE_STRING_KHMER_DESCENDER = 479,
AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 513,
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 600,
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 608,
AF_BLUE_STRING_LAO_TOP = 616,
AF_BLUE_STRING_LAO_BOTTOM = 648,
AF_BLUE_STRING_LAO_ASCENDER = 680,
AF_BLUE_STRING_LAO_LARGE_ASCENDER = 696,
AF_BLUE_STRING_LAO_DESCENDER = 708,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 732,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 748,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 764,
AF_BLUE_STRING_LATIN_SMALL = 778,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 792,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 802,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 822,
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 842,
AF_BLUE_STRING_LATIN_SUBS_SMALL = 862,
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 898,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 918,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 949,
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 978,
AF_BLUE_STRING_LATIN_SUPS_SMALL = 1004,
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 1029,
AF_BLUE_STRING_MYANMAR_TOP = 1040,
AF_BLUE_STRING_MYANMAR_BOTTOM = 1072,
AF_BLUE_STRING_MYANMAR_ASCENDER = 1104,
AF_BLUE_STRING_MYANMAR_DESCENDER = 1132,
AF_BLUE_STRING_TELUGU_TOP = 1164,
AF_BLUE_STRING_TELUGU_BOTTOM = 1192,
AF_BLUE_STRING_THAI_TOP = 1220,
AF_BLUE_STRING_THAI_BOTTOM = 1244,
AF_BLUE_STRING_THAI_ASCENDER = 1272,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 1284,
AF_BLUE_STRING_THAI_DESCENDER = 1296,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 1312,
AF_BLUE_STRING_THAI_DIGIT_TOP = 1320,
af_blue_1_1 = 1331,
AF_BLUE_STRING_BENGALI_BASE = 36,
AF_BLUE_STRING_BENGALI_TOP = 68,
AF_BLUE_STRING_BENGALI_HEAD = 97,
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 129,
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 153,
AF_BLUE_STRING_CYRILLIC_SMALL = 177,
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 201,
AF_BLUE_STRING_DEVANAGARI_BASE = 210,
AF_BLUE_STRING_DEVANAGARI_TOP = 242,
AF_BLUE_STRING_DEVANAGARI_HEAD = 274,
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 306,
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 314,
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 335,
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 353,
AF_BLUE_STRING_GREEK_SMALL = 371,
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 395,
AF_BLUE_STRING_HEBREW_TOP = 419,
AF_BLUE_STRING_HEBREW_BOTTOM = 443,
AF_BLUE_STRING_HEBREW_DESCENDER = 461,
AF_BLUE_STRING_KHMER_TOP = 476,
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 500,
AF_BLUE_STRING_KHMER_BOTTOM = 540,
AF_BLUE_STRING_KHMER_DESCENDER = 572,
AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 606,
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 693,
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 701,
AF_BLUE_STRING_LAO_TOP = 709,
AF_BLUE_STRING_LAO_BOTTOM = 741,
AF_BLUE_STRING_LAO_ASCENDER = 773,
AF_BLUE_STRING_LAO_LARGE_ASCENDER = 789,
AF_BLUE_STRING_LAO_DESCENDER = 801,
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 825,
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 841,
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 857,
AF_BLUE_STRING_LATIN_SMALL = 871,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 885,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 895,
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 915,
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 935,
AF_BLUE_STRING_LATIN_SUBS_SMALL = 955,
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 991,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 1011,
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 1042,
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 1071,
AF_BLUE_STRING_LATIN_SUPS_SMALL = 1097,
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 1122,
AF_BLUE_STRING_MYANMAR_TOP = 1133,
AF_BLUE_STRING_MYANMAR_BOTTOM = 1165,
AF_BLUE_STRING_MYANMAR_ASCENDER = 1197,
AF_BLUE_STRING_MYANMAR_DESCENDER = 1225,
AF_BLUE_STRING_TELUGU_TOP = 1257,
AF_BLUE_STRING_TELUGU_BOTTOM = 1285,
AF_BLUE_STRING_THAI_TOP = 1313,
AF_BLUE_STRING_THAI_BOTTOM = 1337,
AF_BLUE_STRING_THAI_ASCENDER = 1365,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 1377,
AF_BLUE_STRING_THAI_DESCENDER = 1389,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 1405,
AF_BLUE_STRING_THAI_DIGIT_TOP = 1413,
af_blue_1_1 = 1424,
#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,
@ -196,20 +199,21 @@ FT_BEGIN_HEADER
typedef enum AF_Blue_Stringset_
{
AF_BLUE_STRINGSET_ARAB = 0,
AF_BLUE_STRINGSET_CYRL = 4,
AF_BLUE_STRINGSET_DEVA = 10,
AF_BLUE_STRINGSET_GREK = 16,
AF_BLUE_STRINGSET_HEBR = 23,
AF_BLUE_STRINGSET_KHMR = 27,
AF_BLUE_STRINGSET_KHMS = 33,
AF_BLUE_STRINGSET_LAO = 36,
AF_BLUE_STRINGSET_LATN = 42,
AF_BLUE_STRINGSET_LATB = 49,
AF_BLUE_STRINGSET_LATP = 56,
AF_BLUE_STRINGSET_MYMR = 63,
AF_BLUE_STRINGSET_TELU = 68,
AF_BLUE_STRINGSET_THAI = 71,
af_blue_2_1 = 79,
AF_BLUE_STRINGSET_BENG = 4,
AF_BLUE_STRINGSET_CYRL = 9,
AF_BLUE_STRINGSET_DEVA = 15,
AF_BLUE_STRINGSET_GREK = 21,
AF_BLUE_STRINGSET_HEBR = 28,
AF_BLUE_STRINGSET_KHMR = 32,
AF_BLUE_STRINGSET_KHMS = 38,
AF_BLUE_STRINGSET_LAO = 41,
AF_BLUE_STRINGSET_LATN = 47,
AF_BLUE_STRINGSET_LATB = 54,
AF_BLUE_STRINGSET_LATP = 61,
AF_BLUE_STRINGSET_MYMR = 68,
AF_BLUE_STRINGSET_TELU = 73,
AF_BLUE_STRINGSET_THAI = 76,
af_blue_2_1 = 84,
#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

@ -91,6 +91,23 @@
};
const AF_Script_UniRangeRec af_beng_uniranges[] =
{
AF_UNIRANGE_REC( 0x0980UL, 0x09FFUL ), /* Bengali */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_beng_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0981UL, 0x0981UL ),
AF_UNIRANGE_REC( 0x09BCUL, 0x09BCUL ),
AF_UNIRANGE_REC( 0x09C1UL, 0x09C4UL ),
AF_UNIRANGE_REC( 0x09CDUL, 0x09CDUL ),
AF_UNIRANGE_REC( 0x09E2UL, 0x09E3UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_cyrl_uniranges[] =
{
AF_UNIRANGE_REC( 0x0400UL, 0x04FFUL ), /* Cyrillic */
@ -389,23 +406,6 @@
#ifdef AF_CONFIG_OPTION_INDIC
const AF_Script_UniRangeRec af_beng_uniranges[] =
{
AF_UNIRANGE_REC( 0x0980UL, 0x09FFUL ), /* Bengali */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_beng_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0981UL, 0x0981UL ),
AF_UNIRANGE_REC( 0x09BCUL, 0x09BCUL ),
AF_UNIRANGE_REC( 0x09C1UL, 0x09C4UL ),
AF_UNIRANGE_REC( 0x09CDUL, 0x09CDUL ),
AF_UNIRANGE_REC( 0x09E2UL, 0x09E3UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_gujr_uniranges[] =
{
AF_UNIRANGE_REC( 0x0A80UL, 0x0AFFUL ), /* Gujarati */

View File

@ -35,6 +35,12 @@
HB_SCRIPT_ARABIC,
"\xD9\x84 \xD8\xAD \xD9\x80" ) /* ل ح ـ */
/* there are no simple forms for letters; we thus use two digit shapes */
SCRIPT( beng, BENG,
"Bengali",
HB_SCRIPT_BENGALI,
"\xE0\xA7\xA6 \xE0\xA7\xAA" ) /* */
SCRIPT( cyrl, CYRL,
"Cyrillic",
HB_SCRIPT_CYRILLIC,
@ -110,11 +116,6 @@
#ifdef AF_CONFIG_OPTION_INDIC
SCRIPT( beng, BENG,
"Bengali",
HB_SCRIPT_BENGALI,
"o" ) /* XXX */
SCRIPT( gujr, GUJR,
"Gujarati",
HB_SCRIPT_GUJARATI,

View File

@ -90,6 +90,13 @@
AF_BLUE_STRINGSET_ARAB,
AF_COVERAGE_DEFAULT )
STYLE( beng_dflt, BENG_DFLT,
"Bengali default style",
AF_WRITING_SYSTEM_LATIN,
AF_SCRIPT_BENG,
AF_BLUE_STRINGSET_BENG,
AF_COVERAGE_DEFAULT )
META_STYLE_LATIN( cyrl, CYRL, "Cyrillic" )
STYLE( deva_dflt, DEVA_DFLT,
@ -194,7 +201,6 @@
(AF_Blue_Stringset)0, \
AF_COVERAGE_DEFAULT )
STYLE_DEFAULT_INDIC( beng, BENG, "Bengali" )
STYLE_DEFAULT_INDIC( gujr, GUJR, "Gujarati" )
STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" )
STYLE_DEFAULT_INDIC( knda, KNDA, "Kannada" )