From 7f325b6c80513c89abb052eaca4953a0f96c94b7 Mon Sep 17 00:00:00 2001 From: David Corbett Date: Sat, 14 Sep 2024 11:19:04 -0400 Subject: [PATCH] [Unicode 16] Update the Indic table --- src/gen-indic-table.py | 1 + src/hb-ot-shaper-indic-table.cc | 28 +++++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py index 4ef970265..2c8abcca6 100755 --- a/src/gen-indic-table.py +++ b/src/gen-indic-table.py @@ -34,6 +34,7 @@ ALLOWED_BLOCKS = [ 'Devanagari Extended', 'Myanmar Extended-B', 'Myanmar Extended-A', + 'Myanmar Extended-C', ] files = [open (x, encoding='utf-8') for x in sys.argv[1:]] diff --git a/src/hb-ot-shaper-indic-table.cc b/src/hb-ot-shaper-indic-table.cc index d9899a633..adea32efd 100644 --- a/src/hb-ot-shaper-indic-table.cc +++ b/src/hb-ot-shaper-indic-table.cc @@ -6,12 +6,12 @@ * * on files with these headers: * - * # IndicSyllabicCategory-15.1.0.txt - * # Date: 2023-01-05 - * # IndicPositionalCategory-15.1.0.txt - * # Date: 2023-01-05 - * # Blocks-15.1.0.txt - * # Date: 2023-07-28, 15:47:20 GMT + * # IndicSyllabicCategory-16.0.0.txt + * # Date: 2024-04-30, 21:48:21 GMT + * # IndicPositionalCategory-16.0.0.txt + * # Date: 2024-04-30, 21:48:21 GMT + * # Blocks-16.0.0.txt + * # Date: 2024-02-02 */ #include "hb.hh" @@ -89,7 +89,7 @@ static_assert (OT_VPst == M_Cat(VPst), ""); #define _OT_MW OT_MW /* 2 chars; MW */ #define _OT_MY OT_MY /* 3 chars; MY */ #define _OT_N OT_N /* 17 chars; N */ -#define _OT_GB OT_PLACEHOLDER /* 165 chars; PLACEHOLDER */ +#define _OT_GB OT_PLACEHOLDER /* 185 chars; PLACEHOLDER */ #define _OT_PT OT_PT /* 8 chars; PT */ #define _OT_R OT_Ra /* 14 chars; Ra */ #define _OT_Rf OT_Repha /* 1 chars; Repha */ @@ -112,7 +112,7 @@ static_assert (OT_VPst == M_Cat(VPst), ""); #define _POS_A POS_AFTER_MAIN /* 3 chars; AFTER_MAIN */ #define _POS_AP POS_AFTER_POST /* 50 chars; AFTER_POST */ #define _POS_AS POS_AFTER_SUB /* 51 chars; AFTER_SUB */ -#define _POS_C POS_BASE_C /* 833 chars; BASE_C */ +#define _POS_C POS_BASE_C /* 853 chars; BASE_C */ #define _POS_BS POS_BEFORE_SUB /* 25 chars; BEFORE_SUB */ #define _POS_B POS_BELOW_C /* 13 chars; BELOW_C */ #define _POS_X POS_END /* 71 chars; END */ @@ -458,7 +458,16 @@ static const uint16_t indic_table[] = { /* 11338 */ _(X,X), _(X,X), _(X,X), _(N,X), _(N,X), _(X,X), _(X,X), _(X,X), -}; /* Table items: 1728; occupancy: 71% */ +#define indic_offset_0x116d0u 1728 + + + /* Myanmar Extended-C */ + + /* 116D0 */ _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), + /* 116D8 */ _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(GB,C), + /* 116E0 */ _(GB,C), _(GB,C), _(GB,C), _(GB,C), _(X,X), _(X,X), _(X,X), _(X,X), + +}; /* Table items: 1752; occupancy: 71% */ uint16_t hb_indic_get_categories (hb_codepoint_t u) @@ -498,6 +507,7 @@ hb_indic_get_categories (hb_codepoint_t u) case 0x11u: if (hb_in_range (u, 0x11300u, 0x11307u)) return indic_table[u - 0x11300u + indic_offset_0x11300u]; if (hb_in_range (u, 0x11338u, 0x1133Fu)) return indic_table[u - 0x11338u + indic_offset_0x11338u]; + if (hb_in_range (u, 0x116D0u, 0x116E7u)) return indic_table[u - 0x116D0u + indic_offset_0x116d0u]; break; default: