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

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

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

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

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

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

* src/autofit/afstyles.h: Update Sinhala data; in particular, use
AF_WRITING_SYSTEM_LATIN.
This commit is contained in:
Werner Lemberg 2016-02-29 09:12:35 +01:00
parent f216947813
commit 5c7646d226
7 changed files with 91 additions and 38 deletions

View File

@ -1,3 +1,23 @@
2016-02-29 Werner Lemberg <wl@gnu.org>
[autofit] Add blue-zone support for Sinhala script.
This essentially moves the Sinhala script from the `Indic' hinter to
the `Latin' hinter.
* src/autofit/afblue.dat: Add blue zone data for Sinhala.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
* src/autofit/afscript.h: Add Sinhala standard character and move data
out of AF_CONFIG_OPTION_INDIC block.
* src/autofit/afranges.c: Move Sinhala data out of
AF_CONFIG_OPTION_INDIC block.
* src/autofit/afstyles.h: Update Sinhala data; in particular, use
AF_WRITING_SYSTEM_LATIN.
2016-02-27 Werner Lemberg <wl@gnu.org>
[autofit] Properly handle spikes pointing to the x-axis.
@ -42,7 +62,7 @@
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
* src/autofit/afscript.h: Add Tamli standard character and move data
* src/autofit/afscript.h: Add Tamil standard character and move data
out of AF_CONFIG_OPTION_INDIC block.
* src/autofit/afranges.c: Move Tamil data out of

View File

@ -140,6 +140,12 @@
'\0',
'\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89', /* ဉ ည ဥ ဩ ဨ ၂ ၅ ၉ */
'\0',
'\xE0', '\xB6', '\x89', ' ', '\xE0', '\xB6', '\x9A', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\xB4', ' ', '\xE0', '\xB6', '\xBA', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB7', '\x86', /* ඉ ක ඝ ඳ ප ය ල ෆ */
'\0',
'\xE0', '\xB6', '\x91', ' ', '\xE0', '\xB6', '\x94', ' ', '\xE0', '\xB6', '\x9D', ' ', '\xE0', '\xB6', '\xA2', ' ', '\xE0', '\xB6', '\xA7', ' ', '\xE0', '\xB6', '\xAE', ' ', '\xE0', '\xB6', '\xB0', ' ', '\xE0', '\xB6', '\xBB', /* එ ඔ ඝ ජ ට ථ ධ ර */
'\0',
'\xE0', '\xB6', '\xAF', ' ', '\xE0', '\xB6', '\xB3', ' ', '\xE0', '\xB6', '\x8B', ' ', '\xE0', '\xB6', '\xBD', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x96', ' ', '\xE0', '\xB6', '\xAD', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xB6', '\xE0', '\xB7', '\x94', ' ', '\xE0', '\xB6', '\xAF', '\xE0', '\xB7', '\x94', /* ද ඳ උ ල තූ තු බු දු */
'\0',
'\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x92', ' ', '\xE0', '\xAE', '\x93', ' ', '\xE0', '\xAE', '\xB1', ' ', '\xE0', '\xAE', '\x88', ' ', '\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9A', /* உ ஒ ஓ ற ஈ க ங ச */
'\0',
'\xE0', '\xAE', '\x95', ' ', '\xE0', '\xAE', '\x9A', ' ', '\xE0', '\xAE', '\xB2', ' ', '\xE0', '\xAE', '\xB6', ' ', '\xE0', '\xAE', '\x89', ' ', '\xE0', '\xAE', '\x99', ' ', '\xE0', '\xAE', '\x9F', ' ', '\xE0', '\xAE', '\xAA', /* க ச ல ஶ உ ங ட ப */
@ -304,6 +310,10 @@
{ AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_SINHALA_BOTTOM, 0 },
{ AF_BLUE_STRING_SINHALA_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
{ AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
{ AF_BLUE_STRING_TAMIL_BOTTOM, 0 },
{ AF_BLUE_STRING_MAX, 0 },

View File

@ -214,6 +214,13 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
AF_BLUE_STRING_MYANMAR_DESCENDER
"ဉ ည ဥ ဩ ဨ ၂ ၅ ၉"
AF_BLUE_STRING_SINHALA_TOP
"ඉ ක ඝ ඳ ප ය ල ෆ"
AF_BLUE_STRING_SINHALA_BOTTOM
"එ ඔ ඝ ජ ට ථ ධ ර"
AF_BLUE_STRING_SINHALA_DESCENDER
"ද ඳ උ ල තූ තු බු දු"
AF_BLUE_STRING_TAMIL_TOP
"உ ஒ ஓ ற ஈ க ங ச"
AF_BLUE_STRING_TAMIL_BOTTOM
@ -527,6 +534,12 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_SINH
{ AF_BLUE_STRING_SINHALA_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_SINHALA_BOTTOM, 0 }
{ AF_BLUE_STRING_SINHALA_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
AF_BLUE_STRINGSET_TAML
{ AF_BLUE_STRING_TAMIL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
{ AF_BLUE_STRING_TAMIL_BOTTOM, 0 }

View File

@ -134,18 +134,21 @@ FT_BEGIN_HEADER
AF_BLUE_STRING_MYANMAR_BOTTOM = 1316,
AF_BLUE_STRING_MYANMAR_ASCENDER = 1348,
AF_BLUE_STRING_MYANMAR_DESCENDER = 1376,
AF_BLUE_STRING_TAMIL_TOP = 1408,
AF_BLUE_STRING_TAMIL_BOTTOM = 1440,
AF_BLUE_STRING_TELUGU_TOP = 1472,
AF_BLUE_STRING_TELUGU_BOTTOM = 1500,
AF_BLUE_STRING_THAI_TOP = 1528,
AF_BLUE_STRING_THAI_BOTTOM = 1552,
AF_BLUE_STRING_THAI_ASCENDER = 1580,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 1592,
AF_BLUE_STRING_THAI_DESCENDER = 1604,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 1620,
AF_BLUE_STRING_THAI_DIGIT_TOP = 1628,
af_blue_1_1 = 1639,
AF_BLUE_STRING_SINHALA_TOP = 1408,
AF_BLUE_STRING_SINHALA_BOTTOM = 1440,
AF_BLUE_STRING_SINHALA_DESCENDER = 1472,
AF_BLUE_STRING_TAMIL_TOP = 1516,
AF_BLUE_STRING_TAMIL_BOTTOM = 1548,
AF_BLUE_STRING_TELUGU_TOP = 1580,
AF_BLUE_STRING_TELUGU_BOTTOM = 1608,
AF_BLUE_STRING_THAI_TOP = 1636,
AF_BLUE_STRING_THAI_BOTTOM = 1660,
AF_BLUE_STRING_THAI_ASCENDER = 1688,
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 1700,
AF_BLUE_STRING_THAI_DESCENDER = 1712,
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 1728,
AF_BLUE_STRING_THAI_DIGIT_TOP = 1736,
af_blue_1_1 = 1747,
#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,
@ -219,10 +222,11 @@ FT_BEGIN_HEADER
AF_BLUE_STRINGSET_LATP = 64,
AF_BLUE_STRINGSET_MLYM = 71,
AF_BLUE_STRINGSET_MYMR = 74,
AF_BLUE_STRINGSET_TAML = 79,
AF_BLUE_STRINGSET_TELU = 82,
AF_BLUE_STRINGSET_THAI = 85,
af_blue_2_1 = 93,
AF_BLUE_STRINGSET_SINH = 79,
AF_BLUE_STRINGSET_TAML = 83,
AF_BLUE_STRINGSET_TELU = 86,
AF_BLUE_STRINGSET_THAI = 89,
af_blue_2_1 = 97,
#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

@ -406,6 +406,20 @@
};
const AF_Script_UniRangeRec af_sinh_uniranges[] =
{
AF_UNIRANGE_REC( 0x0D80UL, 0x0DFFUL ), /* Sinhala */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_sinh_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0DCAUL, 0x0DCAUL ),
AF_UNIRANGE_REC( 0x0DD2UL, 0x0DD6UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_taml_uniranges[] =
{
AF_UNIRANGE_REC( 0x0B80UL, 0x0BFFUL ), /* Tamil */
@ -521,20 +535,6 @@
};
const AF_Script_UniRangeRec af_sinh_uniranges[] =
{
AF_UNIRANGE_REC( 0x0D80UL, 0x0DFFUL ), /* Sinhala */
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_sinh_nonbase_uniranges[] =
{
AF_UNIRANGE_REC( 0x0DCAUL, 0x0DCAUL ),
AF_UNIRANGE_REC( 0x0DD2UL, 0x0DD6UL ),
AF_UNIRANGE_REC( 0UL, 0UL )
};
const AF_Script_UniRangeRec af_sund_uniranges[] =
{
AF_UNIRANGE_REC( 0x1B80UL, 0x1BBFUL ), /* Sundanese */

View File

@ -129,6 +129,12 @@
HINTING_BOTTOM_TO_TOP,
"" )
SCRIPT( sinh, SINH,
"Sinhala",
HB_SCRIPT_SINHALA,
HINTING_BOTTOM_TO_TOP,
"\xE0\xB6\xA7" ) /* ට */
/* only digit zero has a simple (round) shape in the Tamil script */
SCRIPT( taml, TAML,
"Tamil",
@ -175,12 +181,6 @@
HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( sinh, SINH,
"Sinhala",
HB_SCRIPT_SINHALA,
HINTING_BOTTOM_TO_TOP,
"o" ) /* XXX */
SCRIPT( sund, SUND,
"Sundanese",
HB_SCRIPT_SUNDANESE,

View File

@ -189,6 +189,13 @@
(AF_Blue_Stringset)0,
AF_COVERAGE_DEFAULT )
STYLE( sinh_dflt, SINH_DFLT,
"Sinhala default style",
AF_WRITING_SYSTEM_LATIN,
AF_SCRIPT_SINH,
AF_BLUE_STRINGSET_SINH,
AF_COVERAGE_DEFAULT )
STYLE( taml_dflt, TAML_DFLT,
"Tamil default style",
AF_WRITING_SYSTEM_LATIN,
@ -226,7 +233,6 @@
STYLE_DEFAULT_INDIC( guru, GURU, "Gurmukhi" )
STYLE_DEFAULT_INDIC( limb, LIMB, "Limbu" )
STYLE_DEFAULT_INDIC( orya, ORYA, "Oriya" )
STYLE_DEFAULT_INDIC( sinh, SINH, "Sinhala" )
STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )