From 819cc360499a5f136325b5a1a18098ebc2aee081 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 2 Oct 2017 09:03:16 -0400 Subject: [PATCH] [indic] Move manual code out of generated table --- src/hb-ot-shape-complex-indic-table.cc | 7 ------- src/hb-ot-shape-complex-indic.cc | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-shape-complex-indic-table.cc b/src/hb-ot-shape-complex-indic-table.cc index 3bf5285e6..f0f4dc3be 100644 --- a/src/hb-ot-shape-complex-indic-table.cc +++ b/src/hb-ot-shape-complex-indic-table.cc @@ -422,13 +422,6 @@ hb_indic_get_categories (hb_codepoint_t u) if (hb_in_range (u, 0xAA60u, 0xAA7Fu)) return indic_table[u - 0xAA60u + indic_offset_0xaa60u]; 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: break; } diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 5acaadb5b..c8640cc56 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -209,6 +209,11 @@ set_indic_properties (hb_glyph_info_t &info) 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 == 0x17C6u)) cat = OT_N; /* Khmer Bindu doesn't like to be repositioned. */ else if (unlikely (hb_in_range (u, 0x2010u, 0x2011u)))