ref: c9c33f202ece24390e696a8d91d44f1f6a61a8ed
parent: 1050aa9df084feb90c4bece79c7e90451a641e58
author: Werner Lemberg <[email protected]>
date: Sat Oct 18 07:01:14 EDT 2014
[autofit] Add blue-zone support for Telugu. This essentially moves the Telugu script from the `Indic' hinter to the `Latin' hinter. Note that this is a first shot and quite certainly needs refinements. * src/autofit/afblue.dat: Add blue zone data for Telugu. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Telugu standard characters and move data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afranges.c: Move Telugu data out of AF_CONFIG_OPTION_INDIC block. * src/autofit/afstyles.h: Update Telugu data; in particular, use AF_WRITING_SYSTEM_LATIN.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2014-10-18 Werner Lemberg <[email protected]>
+
+ [autofit] Add blue-zone support for Telugu.
+
+ This essentially moves the Telugu script from the `Indic' hinter to
+ the `Latin' hinter.
+
+ Note that this is a first shot and quite certainly needs
+ refinements.
+
+ * src/autofit/afblue.dat: Add blue zone data for Telugu.
+
+ * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+ * src/autofit/afscript.h: Add Telugu standard characters and move
+ data out of AF_CONFIG_OPTION_INDIC block.
+
+ * src/autofit/afranges.c: Move Telugu data out of
+ AF_CONFIG_OPTION_INDIC block.
+
+ * src/autofit/afstyles.h: Update Telugu data; in particular, use
+ AF_WRITING_SYSTEM_LATIN.
+
2014-10-18 David Wimsey <[email protected]>
[cmake] Add iOS build support.
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -67,6 +67,10 @@
'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */
'\0',
'p', 'q', 'g', 'j', 'y', /* pqgjy */
+ '\0',
+ '\xE0', '\xB0', '\x87', '\xE0', '\xB0', '\x8C', '\xE0', '\xB0', '\x99', '\xE0', '\xB0', '\x9E', '\xE0', '\xB0', '\xA3', '\xE0', '\xB0', '\xB1', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */
+ '\0',
+ '\xE0', '\xB0', '\x85', '\xE0', '\xB0', '\x95', '\xE0', '\xB0', '\x9A', '\xE0', '\xB0', '\xB0', '\xE0', '\xB0', '\xBD', '\xE0', '\xB1', '\xA8', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */
#ifdef AF_CONFIG_OPTION_CJK
'\0',
'\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */
@@ -153,6 +157,9 @@
{ AF_BLUE_STRING_LATIN_SMALL, 0 },
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 },
{ AF_BLUE_STRING_MAX, 0 },
+ { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
+ { AF_BLUE_STRING_TELUGU_BOTTOM, 0 },
+ { AF_BLUE_STRING_MAX, 0 },
#ifdef AF_CONFIG_OPTION_CJK
{ AF_BLUE_STRING_CJK_TOP, AF_BLUE_PROPERTY_CJK_TOP },
{ AF_BLUE_STRING_CJK_BOTTOM, 0 },
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -119,6 +119,14 @@
AF_BLUE_STRING_LATIN_SMALL_DESCENDER
"pqgjy"
+ // we separate the letters with spaces to avoid ligatures;
+ // this is just for convenience to simplify reading
+ AF_BLUE_STRING_TELUGU_TOP
+ "ఇ ఌ ఙ ఞ ణ ఱ ౯"
+
+ AF_BLUE_STRING_TELUGU_BOTTOM
+ "అ క చ ర ఽ ౨ ౬"
+
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRING_CJK_TOP
@@ -305,6 +313,11 @@
{ AF_BLUE_STRING_LATIN_SMALL, 0 }
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
{ AF_BLUE_STRING_MAX, 0 }
+
+ AF_BLUE_STRINGSET_TELU
+ { AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
+ { AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
+ { AF_BLUE_STRING_MAX, 0 }
#ifdef AF_CONFIG_OPTION_CJK
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -95,7 +95,9 @@
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 274,
AF_BLUE_STRING_LATIN_SMALL = 282,
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 290,
- af_blue_1_1 = 295,
+ AF_BLUE_STRING_TELUGU_TOP = 296,
+ AF_BLUE_STRING_TELUGU_BOTTOM = 318,
+ af_blue_1_1 = 339,
#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,
@@ -158,7 +160,8 @@
AF_BLUE_STRINGSET_GREK = 12,
AF_BLUE_STRINGSET_HEBR = 19,
AF_BLUE_STRINGSET_LATN = 23,
- af_blue_2_1 = 30,
+ AF_BLUE_STRINGSET_TELU = 30,
+ af_blue_2_1 = 33,
#ifdef AF_CONFIG_OPTION_CJK
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
af_blue_2_1_1 = af_blue_2_1 + 2,
--- a/src/autofit/afranges.c
+++ b/src/autofit/afranges.c
@@ -92,6 +92,12 @@
AF_UNIRANGE_REC( 0UL, 0UL )
};
+ const AF_Script_UniRangeRec af_telu_uniranges[] =
+ {
+ AF_UNIRANGE_REC( 0x0C00UL, 0x0C7FUL ), /* Telugu */
+ AF_UNIRANGE_REC( 0UL, 0UL )
+ };
+
#ifdef AF_CONFIG_OPTION_INDIC
const AF_Script_UniRangeRec af_beng_uniranges[] =
@@ -157,12 +163,6 @@
const AF_Script_UniRangeRec af_taml_uniranges[] =
{
AF_UNIRANGE_REC( 0x0B80UL, 0x0BFFUL ), /* Tamil */
- AF_UNIRANGE_REC( 0UL, 0UL )
- };
-
- const AF_Script_UniRangeRec af_telu_uniranges[] =
- {
- AF_UNIRANGE_REC( 0x0C00UL, 0x0C7FUL ), /* Telugu */
AF_UNIRANGE_REC( 0UL, 0UL )
};
--- a/src/autofit/afscript.h
+++ b/src/autofit/afscript.h
@@ -56,6 +56,12 @@
HB_SCRIPT_INVALID,
0x0, 0x0, 0x0 )
+ /* there are no simple forms for letters; we thus use two digit shapes */
+ SCRIPT( telu, TELU,
+ "Telugu",
+ HB_SCRIPT_TELUGU,
+ 0xC66, 0xC67, 0x0 ) /* ౦ ౧ */
+
#ifdef AF_CONFIG_OPTION_INDIC
SCRIPT( beng, BENG,
@@ -111,11 +117,6 @@
SCRIPT( taml, TAML,
"Tamil",
HB_SCRIPT_TAMIL,
- 'o', 0x0, 0x0 ) /* XXX */
-
- SCRIPT( telu, TELU,
- "Telugu",
- HB_SCRIPT_TELUGU,
'o', 0x0, 0x0 ) /* XXX */
SCRIPT( tibt, TIBT,
--- a/src/autofit/afstyles.h
+++ b/src/autofit/afstyles.h
@@ -115,6 +115,13 @@
(AF_Blue_Stringset)0,
AF_COVERAGE_DEFAULT )
+ STYLE( telu_dflt, TELU_DFLT,
+ "Telugu default style",
+ AF_WRITING_SYSTEM_LATIN,
+ AF_SCRIPT_TELU,
+ AF_BLUE_STRINGSET_TELU,
+ AF_COVERAGE_DEFAULT )
+
#ifdef AF_CONFIG_OPTION_INDIC
/* no blue stringset support for the Indic writing system yet */
@@ -138,7 +145,6 @@
STYLE_DEFAULT_INDIC( sund, SUND, "Sundanese" )
STYLE_DEFAULT_INDIC( sylo, SYLO, "Syloti Nagri" )
STYLE_DEFAULT_INDIC( taml, TAML, "Tamil" )
- STYLE_DEFAULT_INDIC( telu, TELU, "Telugu" )
STYLE_DEFAULT_INDIC( tibt, TIBT, "Tibetan" )
#endif /* AF_CONFIG_OPTION_INDIC */