[indic] Move manual code out of generated table

This commit is contained in:
Behdad Esfahbod 2017-10-02 09:03:16 -04:00
parent da4866f717
commit 819cc36049
2 changed files with 5 additions and 7 deletions

View File

@ -422,13 +422,6 @@ hb_indic_get_categories (hb_codepoint_t u)
if (hb_in_range<hb_codepoint_t> (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u]; if (hb_in_range<hb_codepoint_t> (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u];
break; break;
case 0x11u:
// According to ScriptExtensions.txt, these Grantha marks may also be used in Tamil,
// so the Indic shaper needs to know their categories.
if (unlikely (u == 0x11303)) return _(Vs,R);
if (unlikely (u == 0x1133c)) return _(N,B);
break;
default: default:
break; break;
} }

View File

@ -209,6 +209,11 @@ set_indic_properties (hb_glyph_info_t &info)
pos = POS_ABOVE_C; pos = POS_ABOVE_C;
} }
/* According to ScriptExtensions.txt, these Grantha marks may also be used in Tamil,
* so the Indic shaper needs to know their categories. */
else if (unlikely (u == 0x11303u)) cat = OT_SM;
else if (unlikely (u == 0x1133cu)) cat = OT_N;
else if (unlikely (u == 0x0980u)) cat = OT_PLACEHOLDER; /* https://github.com/behdad/harfbuzz/issues/538 */ else if (unlikely (u == 0x0980u)) cat = OT_PLACEHOLDER; /* https://github.com/behdad/harfbuzz/issues/538 */
else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */ else if (unlikely (u == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */
else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u))) else if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x2010u, 0x2011u)))