Allow U+20F0 in USE clusters

This commit is contained in:
David Corbett 2017-11-02 10:59:25 -04:00 committed by Behdad Esfahbod
parent f93c6f8bfa
commit 87f0ad183c
4 changed files with 26 additions and 13 deletions

View File

@ -44,6 +44,7 @@ defaults = ('Other', 'Not_Applicable', 'Cn', 'No_Block')
# TODO Characters that are not in Unicode Indic files, but used in USE # TODO Characters that are not in Unicode Indic files, but used in USE
data[0][0x034F] = defaults[0] data[0][0x034F] = defaults[0]
data[0][0x2060] = defaults[0] data[0][0x2060] = defaults[0]
data[0][0x20F0] = defaults[0]
for u in range (0xFE00, 0xFE0F + 1): for u in range (0xFE00, 0xFE0F + 1):
data[0][u] = defaults[0] data[0][u] = defaults[0]
@ -303,6 +304,9 @@ def map_to_use(data):
# TODO: https://github.com/behdad/harfbuzz/issues/525 # TODO: https://github.com/behdad/harfbuzz/issues/525
if U == 0x1A7F: UISC = Consonant_Final; UIPC = Bottom if U == 0x1A7F: UISC = Consonant_Final; UIPC = Bottom
# TODO: https://github.com/behdad/harfbuzz/pull/609
if U == 0x20F0: UISC = Cantillation_Mark; UIPC = Top
values = [k for k,v in items if v(U,UISC,UGC)] values = [k for k,v in items if v(U,UISC,UGC)]
assert len(values) == 1, "%s %s %s %s" % (hex(U), UISC, UGC, values) assert len(values) == 1, "%s %s %s %s" % (hex(U), UISC, UGC, values)
USE = values[0] USE = values[0]

View File

@ -348,7 +348,14 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 2070 */ O, O, O, O, FM, O, O, O, O, O, O, O, O, O, O, O, /* 2070 */ O, O, O, O, FM, O, O, O, O, O, O, O, O, O, O, O,
/* 2080 */ O, O, FM, FM, FM, O, O, O, /* 2080 */ O, O, FM, FM, FM, O, O, O,
#define use_offset_0xa800u 2616 #define use_offset_0x20f0u 2616
/* Combining Diacritical Marks for Symbols */
/* 20F0 */ VMAbv, O, O, O, O, O, O, O,
#define use_offset_0xa800u 2624
/* Syloti Nagri */ /* Syloti Nagri */
@ -435,7 +442,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* AAE0 */ B, B, B, B, B, B, B, B, B, B, B, VPre, VBlw, VAbv, VPre, VPst, /* AAE0 */ B, B, B, B, B, B, B, B, B, B, B, VPre, VBlw, VAbv, VPre, VPst,
/* AAF0 */ O, O, O, O, O, VMPst, H, O, /* AAF0 */ O, O, O, O, O, VMPst, H, O,
#define use_offset_0xabc0u 3376 #define use_offset_0xabc0u 3384
/* Meetei Mayek */ /* Meetei Mayek */
@ -445,14 +452,14 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* ABE0 */ B, B, B, VPst, VPst, VAbv, VPst, VPst, VBlw, VPst, VPst, O, VMPst, VBlw, O, O, /* ABE0 */ B, B, B, VPst, VPst, VAbv, VPst, VPst, VBlw, VPst, VPst, O, VMPst, VBlw, O, O,
/* ABF0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, /* ABF0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
#define use_offset_0xfe00u 3440 #define use_offset_0xfe00u 3448
/* Variation Selectors */ /* Variation Selectors */
/* FE00 */ VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, /* FE00 */ VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS, VS,
#define use_offset_0x10a00u 3456 #define use_offset_0x10a00u 3464
/* Kharoshthi */ /* Kharoshthi */
@ -463,7 +470,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 10A30 */ B, B, B, B, O, O, O, O, CMAbv, CMBlw, CMBlw, O, O, O, O, H, /* 10A30 */ B, B, B, B, O, O, O, O, CMAbv, CMBlw, CMBlw, O, O, O, O, H,
/* 10A40 */ B, B, B, B, B, B, B, B, /* 10A40 */ B, B, B, B, B, B, B, B,
#define use_offset_0x11000u 3528 #define use_offset_0x11000u 3536
/* Brahmi */ /* Brahmi */
@ -484,7 +491,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, /* 110A0 */ B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B,
/* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw, O, O, O, O, O, /* 110B0 */ VPst, VPre, VPst, VBlw, VBlw, VAbv, VAbv, VPst, VPst, H, CMBlw, O, O, O, O, O,
#define use_offset_0x11100u 3720 #define use_offset_0x11100u 3728
/* Chakma */ /* Chakma */
@ -522,7 +529,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw, /* 11220 */ B, B, B, B, B, B, B, B, B, B, B, B, VPst, VPst, VPst, VBlw,
/* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O, O, VMAbv, O, /* 11230 */ VAbv, VAbv, VAbv, VAbv, VMAbv, H, CMAbv, CMAbv, O, O, O, O, O, O, VMAbv, O,
#define use_offset_0x11280u 4040 #define use_offset_0x11280u 4048
/* Multani */ /* Multani */
@ -550,7 +557,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O, /* 11360 */ B, B, VPst, VPst, O, O, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
/* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O, /* 11370 */ VMAbv, VMAbv, VMAbv, VMAbv, VMAbv, O, O, O,
#define use_offset_0x11400u 4288 #define use_offset_0x11400u 4296
/* Newa */ /* Newa */
@ -573,7 +580,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 114C0 */ VMAbv, VMPst, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O, /* 114C0 */ VMAbv, VMPst, H, CMBlw, B, O, O, O, O, O, O, O, O, O, O, O,
/* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, /* 114D0 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
#define use_offset_0x11580u 4512 #define use_offset_0x11580u 4520
/* Siddham */ /* Siddham */
@ -616,7 +623,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VAbv, O, O, O, O, /* 11720 */ VPst, VPst, VAbv, VAbv, VBlw, VBlw, VPre, VAbv, VBlw, VAbv, VAbv, VAbv, O, O, O, O,
/* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O, /* 11730 */ B, B, B, B, B, B, B, B, B, B, B, B, O, O, O, O,
#define use_offset_0x11a00u 4960 #define use_offset_0x11a00u 4968
/* Zanabazar Square */ /* Zanabazar Square */
@ -635,7 +642,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11A80 */ B, B, B, B, O, O, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, /* 11A80 */ B, B, B, B, O, O, R, R, R, R, FBlw, FBlw, FBlw, FBlw, FBlw, FBlw,
/* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O, O, O, O, O, O, /* 11A90 */ FBlw, FBlw, FBlw, FBlw, FBlw, FBlw, VMAbv, VMPst, CMAbv, H, O, O, O, O, O, O,
#define use_offset_0x11c00u 5120 #define use_offset_0x11c00u 5128
/* Bhaiksuki */ /* Bhaiksuki */
@ -656,7 +663,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB, /* 11CA0 */ SUB, SUB, SUB, SUB, SUB, SUB, SUB, SUB, O, SUB, SUB, SUB, SUB, SUB, SUB, SUB,
/* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O, /* 11CB0 */ VBlw, VPre, VBlw, VAbv, VPst, VMAbv, VMAbv, O,
#define use_offset_0x11d00u 5304 #define use_offset_0x11d00u 5312
/* Masaram Gondi */ /* Masaram Gondi */
@ -668,7 +675,7 @@ static const USE_TABLE_ELEMENT_TYPE use_table[] = {
/* 11D40 */ VMAbv, VMAbv, CMBlw, VAbv, VBlw, H, R, MBlw, O, O, O, O, O, O, O, O, /* 11D40 */ VMAbv, VMAbv, CMBlw, VAbv, VBlw, H, R, MBlw, O, O, O, O, O, O, O, O,
/* 11D50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O, /* 11D50 */ B, B, B, B, B, B, B, B, B, B, O, O, O, O, O, O,
}; /* Table items: 5400; occupancy: 73% */ }; /* Table items: 5408; occupancy: 73% */
USE_TABLE_ELEMENT_TYPE USE_TABLE_ELEMENT_TYPE
hb_use_get_categories (hb_codepoint_t u) hb_use_get_categories (hb_codepoint_t u)
@ -694,6 +701,7 @@ hb_use_get_categories (hb_codepoint_t u)
case 0x2u: case 0x2u:
if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u]; if (hb_in_range<hb_codepoint_t> (u, 0x2008u, 0x2017u)) return use_table[u - 0x2008u + use_offset_0x2008u];
if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u]; if (hb_in_range<hb_codepoint_t> (u, 0x2060u, 0x2087u)) return use_table[u - 0x2060u + use_offset_0x2060u];
if (hb_in_range<hb_codepoint_t> (u, 0x20F0u, 0x20F7u)) return use_table[u - 0x20F0u + use_offset_0x20f0u];
if (unlikely (u == 0x25CCu)) return GB; if (unlikely (u == 0x25CCu)) return GB;
break; break;

View File

@ -2,3 +2,4 @@ fonts/sha1sum/96490dd2ff81233b335a650e7eb660e0e7b2eeea.ttf::U+AA00,U+AA2D,U+AA29
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA34,U+AA36:[raMedial_cham_pre=0+400|a_cham=0+1121|waMedial_cham=0@-32,0+0] fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA34,U+AA36:[raMedial_cham_pre=0+400|a_cham=0+1121|waMedial_cham=0@-32,0+0]
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA33:[a_cham=0+1121|laMedial_cham=0@-32,0+0|yaMedial_cham=0+542] fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA33:[a_cham=0+1121|laMedial_cham=0@-32,0+0|yaMedial_cham=0+542]
fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA36:[a_cham=0+1121|laMedial_waMedial_cham=0@43,0+0] fonts/sha1sum/e68a88939e0f06e34d2bc911f09b70890289c8fd.ttf::U+AA00,U+AA35,U+AA36:[a_cham=0+1121|laMedial_waMedial_cham=0@43,0+0]
fonts/sha1sum/074a5ae6b19de8f29772fdd5df2d3d833f81f5e6.ttf:--no-glyph-names:U+11320,U+20F0,U+11367:[3=0+502|1=0@33,0+0|4=0@300,8+0]