Skip to content

Commit 6d72a32

Browse files
committed
3rdparty: upgrade widecharwidth
1 parent 45be29b commit 6d72a32

File tree

2 files changed

+71
-59
lines changed

2 files changed

+71
-59
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"home": "https://github.com/ridiculousfish/widecharwidth",
33
"license": "Public domain",
4-
"version": "Unicode 16",
4+
"version": "Unicode 17",
55
"author": "ridiculousfish"
66
}

src/3rdparty/widecharwidth/widechar_width_c.h

Lines changed: 70 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* widechar_width_c.h for Unicode 16.0.0
2+
* widechar_width_c.h for Unicode 17.0.0
33
* See https://github.com/ridiculousfish/widecharwidth/
44
*
55
* SHA1 file hashes:
@@ -11,11 +11,11 @@
1111
* The other hashes are simple `sha1sum` style hashes.
1212
* )
1313
*
14-
* generate.py: 2747bb9402d8eeeca8e566ff947f14308511ecb1
15-
* template.js: 18cc8767663f4e3f1e2c2d50a317a1eefc6260cc
16-
* UnicodeData.txt: 91df83276154240bcedef82a09bde77aa182cf8d
17-
* EastAsianWidth.txt: 0885c0fc1c21eb58954a3bfb785d78559b361d92
18-
* emoji-data.txt: 1df2f8329dd9f5c238674807de736f316c6b9d87
14+
* generate.py: b35da43f176cc0d5880c67356ebb064048c5bac4
15+
* template.js: 1985fb56796d6d9627f9c5290d5dee9f9364bcf4
16+
* UnicodeData.txt: 50dffef1b7d1f97b72e4c2adceb9b2245f0f34ba
17+
* EastAsianWidth.txt: 2cadc5034b6206ad84b75898a1d4186bb38fc12b
18+
* emoji-data.txt: 3d123e12f70f63e609c4281ce83dfdd9ac7443d2
1919
*/
2020

2121
#ifndef WIDECHAR_WIDTH_H
@@ -224,7 +224,8 @@ static const struct widechar_range widechar_combining_table[] = {
224224
{0x01A55, 0x01A5E},
225225
{0x01A60, 0x01A7C},
226226
{0x01A7F, 0x01A7F},
227-
{0x01AB0, 0x01ACE},
227+
{0x01AB0, 0x01ADD},
228+
{0x01AE0, 0x01AEB},
228229
{0x01B00, 0x01B04},
229230
{0x01B34, 0x01B44},
230231
{0x01B6B, 0x01B73},
@@ -290,7 +291,7 @@ static const struct widechar_range widechar_combining_table[] = {
290291
{0x10D24, 0x10D27},
291292
{0x10D69, 0x10D6D},
292293
{0x10EAB, 0x10EAC},
293-
{0x10EFC, 0x10EFF},
294+
{0x10EFA, 0x10EFF},
294295
{0x10F46, 0x10F50},
295296
{0x10F82, 0x10F85},
296297
{0x11000, 0x11002},
@@ -352,6 +353,7 @@ static const struct widechar_range widechar_combining_table[] = {
352353
{0x11A47, 0x11A47},
353354
{0x11A51, 0x11A5B},
354355
{0x11A8A, 0x11A99},
356+
{0x11B60, 0x11B67},
355357
{0x11C2F, 0x11C36},
356358
{0x11C38, 0x11C3F},
357359
{0x11C92, 0x11CA7},
@@ -406,6 +408,10 @@ static const struct widechar_range widechar_combining_table[] = {
406408
{0x1E2EC, 0x1E2EF},
407409
{0x1E4EC, 0x1E4EF},
408410
{0x1E5EE, 0x1E5EF},
411+
{0x1E6E3, 0x1E6E3},
412+
{0x1E6E6, 0x1E6E6},
413+
{0x1E6EE, 0x1E6EF},
414+
{0x1E6F5, 0x1E6F5},
409415
{0x1E8D0, 0x1E8D6},
410416
{0x1E944, 0x1E94A},
411417
{0xE0100, 0xE01EF}
@@ -446,10 +452,10 @@ static const struct widechar_range widechar_doublewide_table[] = {
446452
{0x0FF01, 0x0FF60},
447453
{0x0FFE0, 0x0FFE6},
448454
{0x16FE0, 0x16FE4},
449-
{0x16FF0, 0x16FF1},
450-
{0x17000, 0x187F7},
451-
{0x18800, 0x18CD5},
452-
{0x18CFF, 0x18D08},
455+
{0x16FF0, 0x16FF6},
456+
{0x17000, 0x18CD5},
457+
{0x18CFF, 0x18D1E},
458+
{0x18D80, 0x18DF2},
453459
{0x1AFF0, 0x1AFF3},
454460
{0x1AFF5, 0x1AFFB},
455461
{0x1AFFD, 0x1AFFE},
@@ -473,7 +479,7 @@ static const struct widechar_range widechar_doublewide_table[] = {
473479
{0x1F57A, 0x1F57A},
474480
{0x1F5A4, 0x1F5A4},
475481
{0x1F6D1, 0x1F6D2},
476-
{0x1F6D5, 0x1F6D7},
482+
{0x1F6D5, 0x1F6D8},
477483
{0x1F6DC, 0x1F6DF},
478484
{0x1F6F4, 0x1F6FC},
479485
{0x1F7E0, 0x1F7EB},
@@ -485,11 +491,12 @@ static const struct widechar_range widechar_doublewide_table[] = {
485491
{0x1F985, 0x1F9BF},
486492
{0x1F9C1, 0x1F9FF},
487493
{0x1FA70, 0x1FA7C},
488-
{0x1FA80, 0x1FA89},
489-
{0x1FA8F, 0x1FAC6},
490-
{0x1FACE, 0x1FADC},
491-
{0x1FADF, 0x1FAE9},
492-
{0x1FAF0, 0x1FAF8},
494+
{0x1FA80, 0x1FA8A},
495+
{0x1FA8E, 0x1FAC6},
496+
{0x1FAC8, 0x1FAC8},
497+
{0x1FACD, 0x1FADC},
498+
{0x1FADF, 0x1FAEA},
499+
{0x1FAEF, 0x1FAF8},
493500
{0x20000, 0x2FFFD},
494501
{0x30000, 0x3FFFD}
495502
};
@@ -700,7 +707,6 @@ static const struct widechar_range widechar_unassigned_table[] = {
700707
{0x0085C, 0x0085D},
701708
{0x0085F, 0x0085F},
702709
{0x0086B, 0x0086F},
703-
{0x0088F, 0x0088F},
704710
{0x00892, 0x00896},
705711
{0x00984, 0x00984},
706712
{0x0098D, 0x0098E},
@@ -784,7 +790,7 @@ static const struct widechar_range widechar_unassigned_table[] = {
784790
{0x00C49, 0x00C49},
785791
{0x00C4E, 0x00C54},
786792
{0x00C57, 0x00C57},
787-
{0x00C5B, 0x00C5C},
793+
{0x00C5B, 0x00C5B},
788794
{0x00C5E, 0x00C5F},
789795
{0x00C64, 0x00C65},
790796
{0x00C70, 0x00C76},
@@ -796,7 +802,7 @@ static const struct widechar_range widechar_unassigned_table[] = {
796802
{0x00CC5, 0x00CC5},
797803
{0x00CC9, 0x00CC9},
798804
{0x00CCE, 0x00CD4},
799-
{0x00CD7, 0x00CDC},
805+
{0x00CD7, 0x00CDB},
800806
{0x00CDF, 0x00CDF},
801807
{0x00CE4, 0x00CE5},
802808
{0x00CF0, 0x00CF0},
@@ -892,7 +898,8 @@ static const struct widechar_range widechar_unassigned_table[] = {
892898
{0x01A8A, 0x01A8F},
893899
{0x01A9A, 0x01A9F},
894900
{0x01AAE, 0x01AAF},
895-
{0x01ACF, 0x01AFF},
901+
{0x01ADE, 0x01ADF},
902+
{0x01AEC, 0x01AFF},
896903
{0x01B4D, 0x01B4D},
897904
{0x01BF4, 0x01BFB},
898905
{0x01C38, 0x01C3A},
@@ -921,13 +928,12 @@ static const struct widechar_range widechar_unassigned_table[] = {
921928
{0x02072, 0x02073},
922929
{0x0208F, 0x0208F},
923930
{0x0209D, 0x0209F},
924-
{0x020C1, 0x020CF},
931+
{0x020C2, 0x020CF},
925932
{0x020F1, 0x020FF},
926933
{0x0218C, 0x0218F},
927934
{0x0242A, 0x0243F},
928935
{0x0244B, 0x0245F},
929936
{0x02B74, 0x02B75},
930-
{0x02B96, 0x02B96},
931937
{0x02CF4, 0x02CF8},
932938
{0x02D26, 0x02D26},
933939
{0x02D28, 0x02D2C},
@@ -960,10 +966,7 @@ static const struct widechar_range widechar_unassigned_table[] = {
960966
{0x0A4C7, 0x0A4CF},
961967
{0x0A62C, 0x0A63F},
962968
{0x0A6F8, 0x0A6FF},
963-
{0x0A7CE, 0x0A7CF},
964-
{0x0A7D2, 0x0A7D2},
965-
{0x0A7D4, 0x0A7D4},
966-
{0x0A7DD, 0x0A7F1},
969+
{0x0A7DD, 0x0A7F0},
967970
{0x0A82D, 0x0A82F},
968971
{0x0A83A, 0x0A83F},
969972
{0x0A878, 0x0A87F},
@@ -1000,9 +1003,6 @@ static const struct widechar_range widechar_unassigned_table[] = {
10001003
{0x0FB3F, 0x0FB3F},
10011004
{0x0FB42, 0x0FB42},
10021005
{0x0FB45, 0x0FB45},
1003-
{0x0FBC3, 0x0FBD2},
1004-
{0x0FD90, 0x0FD91},
1005-
{0x0FDC8, 0x0FDCE},
10061006
{0x0FE1A, 0x0FE1F},
10071007
{0x0FE53, 0x0FE53},
10081008
{0x0FE67, 0x0FE67},
@@ -1072,7 +1072,7 @@ static const struct widechar_range widechar_unassigned_table[] = {
10721072
{0x108F6, 0x108FA},
10731073
{0x1091C, 0x1091E},
10741074
{0x1093A, 0x1093E},
1075-
{0x10940, 0x1097F},
1075+
{0x1095A, 0x1097F},
10761076
{0x109B8, 0x109BB},
10771077
{0x109D0, 0x109D1},
10781078
{0x10A04, 0x10A04},
@@ -1104,7 +1104,8 @@ static const struct widechar_range widechar_unassigned_table[] = {
11041104
{0x10EAA, 0x10EAA},
11051105
{0x10EAE, 0x10EAF},
11061106
{0x10EB2, 0x10EC1},
1107-
{0x10EC5, 0x10EFB},
1107+
{0x10EC8, 0x10ECF},
1108+
{0x10ED9, 0x10EF9},
11081109
{0x10F28, 0x10F2F},
11091110
{0x10F5A, 0x10F6F},
11101111
{0x10F8A, 0x10FAF},
@@ -1187,7 +1188,8 @@ static const struct widechar_range widechar_unassigned_table[] = {
11871188
{0x11A48, 0x11A4F},
11881189
{0x11AA3, 0x11AAF},
11891190
{0x11AF9, 0x11AFF},
1190-
{0x11B0A, 0x11BBF},
1191+
{0x11B0A, 0x11B5F},
1192+
{0x11B68, 0x11BBF},
11911193
{0x11BE2, 0x11BEF},
11921194
{0x11BFA, 0x11BFF},
11931195
{0x11C09, 0x11C09},
@@ -1209,7 +1211,9 @@ static const struct widechar_range widechar_unassigned_table[] = {
12091211
{0x11D8F, 0x11D8F},
12101212
{0x11D92, 0x11D92},
12111213
{0x11D99, 0x11D9F},
1212-
{0x11DAA, 0x11EDF},
1214+
{0x11DAA, 0x11DAF},
1215+
{0x11DDC, 0x11DDF},
1216+
{0x11DEA, 0x11EDF},
12131217
{0x11EF9, 0x11EFF},
12141218
{0x11F11, 0x11F11},
12151219
{0x11F3B, 0x11F3D},
@@ -1238,17 +1242,19 @@ static const struct widechar_range widechar_unassigned_table[] = {
12381242
{0x16B78, 0x16B7C},
12391243
{0x16B90, 0x16D3F},
12401244
{0x16D7A, 0x16E3F},
1241-
{0x16E9B, 0x16EFF},
1245+
{0x16E9B, 0x16E9F},
1246+
{0x16EB9, 0x16EBA},
1247+
{0x16ED4, 0x16EFF},
12421248
{0x16F4B, 0x16F4E},
12431249
{0x16F88, 0x16F8E},
12441250
{0x16FA0, 0x16FDF},
12451251
{0x16FE5, 0x16FEF},
1246-
{0x16FF2, 0x16FFF},
1247-
{0x17001, 0x187F6},
1248-
{0x187F8, 0x187FF},
1252+
{0x16FF7, 0x16FFF},
1253+
{0x17001, 0x187FE},
12491254
{0x18CD6, 0x18CFE},
1250-
{0x18D01, 0x18D07},
1251-
{0x18D09, 0x1AFEF},
1255+
{0x18D01, 0x18D1D},
1256+
{0x18D1F, 0x18D7F},
1257+
{0x18DF3, 0x1AFEF},
12521258
{0x1AFF4, 0x1AFF4},
12531259
{0x1AFFC, 0x1AFFC},
12541260
{0x1AFFF, 0x1AFFF},
@@ -1263,8 +1269,10 @@ static const struct widechar_range widechar_unassigned_table[] = {
12631269
{0x1BC89, 0x1BC8F},
12641270
{0x1BC9A, 0x1BC9B},
12651271
{0x1BCA4, 0x1CBFF},
1266-
{0x1CCFA, 0x1CCFF},
1267-
{0x1CEB4, 0x1CEFF},
1272+
{0x1CCFD, 0x1CCFF},
1273+
{0x1CEB4, 0x1CEB9},
1274+
{0x1CED1, 0x1CEDF},
1275+
{0x1CEF1, 0x1CEFF},
12681276
{0x1CF2E, 0x1CF2F},
12691277
{0x1CF47, 0x1CF4F},
12701278
{0x1CFC4, 0x1CFFF},
@@ -1317,7 +1325,10 @@ static const struct widechar_range widechar_unassigned_table[] = {
13171325
{0x1E300, 0x1E4CF},
13181326
{0x1E4FA, 0x1E5CF},
13191327
{0x1E5FB, 0x1E5FE},
1320-
{0x1E600, 0x1E7DF},
1328+
{0x1E600, 0x1E6BF},
1329+
{0x1E6DF, 0x1E6DF},
1330+
{0x1E6F6, 0x1E6FD},
1331+
{0x1E700, 0x1E7DF},
13211332
{0x1E7E7, 0x1E7E7},
13221333
{0x1E7EC, 0x1E7EC},
13231334
{0x1E7EF, 0x1E7EF},
@@ -1375,10 +1386,9 @@ static const struct widechar_range widechar_unassigned_table[] = {
13751386
{0x1F249, 0x1F24F},
13761387
{0x1F252, 0x1F25F},
13771388
{0x1F266, 0x1F2FF},
1378-
{0x1F6D8, 0x1F6DB},
1389+
{0x1F6D9, 0x1F6DB},
13791390
{0x1F6ED, 0x1F6EF},
13801391
{0x1F6FD, 0x1F6FF},
1381-
{0x1F777, 0x1F77A},
13821392
{0x1F7DA, 0x1F7DF},
13831393
{0x1F7EC, 0x1F7EF},
13841394
{0x1F7F1, 0x1F7FF},
@@ -1388,25 +1398,26 @@ static const struct widechar_range widechar_unassigned_table[] = {
13881398
{0x1F888, 0x1F88F},
13891399
{0x1F8AE, 0x1F8AF},
13901400
{0x1F8BC, 0x1F8BF},
1391-
{0x1F8C2, 0x1F8FF},
1392-
{0x1FA54, 0x1FA5F},
1401+
{0x1F8C2, 0x1F8CF},
1402+
{0x1F8D9, 0x1F8FF},
1403+
{0x1FA58, 0x1FA5F},
13931404
{0x1FA6E, 0x1FA6F},
13941405
{0x1FA7D, 0x1FA7F},
1395-
{0x1FA8A, 0x1FA8E},
1396-
{0x1FAC7, 0x1FACD},
1406+
{0x1FA8B, 0x1FA8D},
1407+
{0x1FAC7, 0x1FAC7},
1408+
{0x1FAC9, 0x1FACC},
13971409
{0x1FADD, 0x1FADE},
1398-
{0x1FAEA, 0x1FAEF},
1410+
{0x1FAEB, 0x1FAEE},
13991411
{0x1FAF9, 0x1FAFF},
14001412
{0x1FB93, 0x1FB93},
1401-
{0x1FBFA, 0x1FFFD},
1413+
{0x1FBFB, 0x1FFFD},
14021414
{0x20001, 0x2A6DE},
14031415
{0x2A6E0, 0x2A6FF},
1404-
{0x2A701, 0x2B738},
1405-
{0x2B73A, 0x2B73F},
1416+
{0x2A701, 0x2B73E},
14061417
{0x2B741, 0x2B81C},
14071418
{0x2B81E, 0x2B81F},
1408-
{0x2B821, 0x2CEA0},
1409-
{0x2CEA2, 0x2CEAF},
1419+
{0x2B821, 0x2CEAC},
1420+
{0x2CEAE, 0x2CEAF},
14101421
{0x2CEB1, 0x2EBDF},
14111422
{0x2EBE1, 0x2EBEF},
14121423
{0x2EBF1, 0x2EE5C},
@@ -1415,7 +1426,8 @@ static const struct widechar_range widechar_unassigned_table[] = {
14151426
{0x30001, 0x31349},
14161427
{0x3134B, 0x3134F},
14171428
{0x31351, 0x323AE},
1418-
{0x323B0, 0x3FFFD},
1429+
{0x323B1, 0x33478},
1430+
{0x3347A, 0x3FFFD},
14191431
{0x40000, 0x4FFFD},
14201432
{0x50000, 0x5FFFD},
14211433
{0x60000, 0x6FFFD},
@@ -1527,7 +1539,7 @@ static const struct widechar_range widechar_widened_table[] = {
15271539
static inline bool widechar_in_table(const struct widechar_range* arr, size_t len, uint32_t c) {
15281540

15291541
size_t lo=0;
1530-
size_t hi=(size_t)len;
1542+
size_t hi=len;
15311543

15321544
if(c < arr[0].lo) return(0);
15331545
if(c > arr[len-1].hi) return(0);

0 commit comments

Comments
 (0)