Skip to content

Commit cf91d2c

Browse files
committed
Still not sure about this, WIP
1 parent f00fba5 commit cf91d2c

File tree

6 files changed

+127
-97
lines changed

6 files changed

+127
-97
lines changed

bin/update-tables.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,18 @@ def fetch_table_vs15_data() -> UnicodeTableRenderCtx:
492492
# perform culling on any values that are already understood as 'narrow'
493493
# without the variation-15 selector
494494
wide_table = wide_tables[unicode_version].as_value_ranges()
495+
for ucs in table[unicode_version].values:
496+
if _bisearch(ucs, wide_table):
497+
print(f'EXCLUDE {hex(ucs)} from VS15: it is wide!')
498+
495499
table[unicode_version].values = {
496500
ucs for ucs in table[unicode_version].values
497-
if _bisearch(ucs, wide_table)
501+
if not _bisearch(ucs, wide_table)
498502
}
503+
# assert False
504+
# if 0x03297 in table[unicode_version].values:
505+
# if 0x03297 in table[unicode_version].values.remove(0x03297)
506+
#
499507

500508
return UnicodeTableRenderCtx('VS15_WIDE_TO_NARROW', table)
501509

wcwidth/table_vs15.py

Lines changed: 114 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,125 @@
11
"""
22
Exports VS15_WIDE_TO_NARROW table keyed by supporting unicode version level.
33
4-
This code generated by wcwidth/bin/update-tables.py on 2024-02-14 19:59:22 UTC.
4+
This code generated by wcwidth/bin/update-tables.py on 2024-03-15 14:05:54 UTC.
55
"""
66
VS15_WIDE_TO_NARROW = {
77
'9.0.0': (
88
# Source: 9.0.0
99
# Date: 2023-02-01, 02:22:54 GMT
1010
#
11-
(0x0231a, 0x0231b,), # Watch ..Hourglass
12-
(0x023e9, 0x023ec,), # Black Right-pointing Dou..Black Down-pointing Doub
13-
(0x023f0, 0x023f0,), # Alarm Clock
14-
(0x023f3, 0x023f3,), # Hourglass With Flowing Sand
15-
(0x025fd, 0x025fe,), # White Medium Small Squar..Black Medium Small Squar
16-
(0x02614, 0x02615,), # Umbrella With Rain Drops..Hot Beverage
17-
(0x02648, 0x02653,), # Aries ..Pisces
18-
(0x0267f, 0x0267f,), # Wheelchair Symbol
19-
(0x02693, 0x02693,), # Anchor
20-
(0x026a1, 0x026a1,), # High Voltage Sign
21-
(0x026aa, 0x026ab,), # Medium White Circle ..Medium Black Circle
22-
(0x026bd, 0x026be,), # Soccer Ball ..Baseball
23-
(0x026c4, 0x026c5,), # Snowman Without Snow ..Sun Behind Cloud
24-
(0x026ce, 0x026ce,), # Ophiuchus
25-
(0x026d4, 0x026d4,), # No Entry
26-
(0x026ea, 0x026ea,), # Church
27-
(0x026f2, 0x026f3,), # Fountain ..Flag In Hole
28-
(0x026f5, 0x026f5,), # Sailboat
29-
(0x026fa, 0x026fa,), # Tent
30-
(0x026fd, 0x026fd,), # Fuel Pump
31-
(0x02705, 0x02705,), # White Heavy Check Mark
32-
(0x0270a, 0x0270b,), # Raised Fist ..Raised Hand
33-
(0x02728, 0x02728,), # Sparkles
34-
(0x0274c, 0x0274c,), # Cross Mark
35-
(0x0274e, 0x0274e,), # Negative Squared Cross Mark
36-
(0x02753, 0x02755,), # Black Question Mark Orna..White Exclamation Mark O
37-
(0x02757, 0x02757,), # Heavy Exclamation Mark Symbol
38-
(0x02795, 0x02797,), # Heavy Plus Sign ..Heavy Division Sign
39-
(0x027b0, 0x027b0,), # Curly Loop
40-
(0x027bf, 0x027bf,), # Double Curly Loop
41-
(0x02b1b, 0x02b1c,), # Black Large Square ..White Large Square
42-
(0x02b50, 0x02b50,), # White Medium Star
43-
(0x02b55, 0x02b55,), # Heavy Large Circle
44-
(0x03030, 0x03030,), # Wavy Dash
45-
(0x0303d, 0x0303d,), # Part Alternation Mark
46-
(0x03297, 0x03297,), # Circled Ideograph Congratulation
47-
(0x03299, 0x03299,), # Circled Ideograph Secret
48-
(0x1f004, 0x1f004,), # Mahjong Tile Red Dragon
49-
(0x1f202, 0x1f202,), # Squared Katakana Sa
50-
(0x1f21a, 0x1f21a,), # Squared Cjk Unified Ideograph-7121
51-
(0x1f22f, 0x1f22f,), # Squared Cjk Unified Ideograph-6307
52-
(0x1f237, 0x1f237,), # Squared Cjk Unified Ideograph-6708
53-
(0x1f30d, 0x1f30f,), # Earth Globe Europe-afric..Earth Globe Asia-austral
54-
(0x1f315, 0x1f315,), # Full Moon Symbol
55-
(0x1f31c, 0x1f31c,), # Last Quarter Moon With Face
56-
(0x1f378, 0x1f378,), # Cocktail Glass
57-
(0x1f393, 0x1f393,), # Graduation Cap
58-
(0x1f3a7, 0x1f3a7,), # Headphone
59-
(0x1f3ac, 0x1f3ae,), # Clapper Board ..Video Game
60-
(0x1f3c2, 0x1f3c2,), # Snowboarder
61-
(0x1f3c4, 0x1f3c4,), # Surfer
62-
(0x1f3c6, 0x1f3c6,), # Trophy
63-
(0x1f3ca, 0x1f3ca,), # Swimmer
64-
(0x1f3e0, 0x1f3e0,), # House Building
65-
(0x1f3ed, 0x1f3ed,), # Factory
66-
(0x1f408, 0x1f408,), # Cat
67-
(0x1f415, 0x1f415,), # Dog
68-
(0x1f41f, 0x1f41f,), # Fish
69-
(0x1f426, 0x1f426,), # Bird
70-
(0x1f442, 0x1f442,), # Ear
71-
(0x1f446, 0x1f449,), # White Up Pointing Backha..White Right Pointing Bac
72-
(0x1f44d, 0x1f44e,), # Thumbs Up Sign ..Thumbs Down Sign
73-
(0x1f453, 0x1f453,), # Eyeglasses
74-
(0x1f46a, 0x1f46a,), # Family
75-
(0x1f47d, 0x1f47d,), # Extraterrestrial Alien
76-
(0x1f4a3, 0x1f4a3,), # Bomb
77-
(0x1f4b0, 0x1f4b0,), # Money Bag
78-
(0x1f4b3, 0x1f4b3,), # Credit Card
79-
(0x1f4bb, 0x1f4bb,), # Personal Computer
80-
(0x1f4bf, 0x1f4bf,), # Optical Disc
81-
(0x1f4cb, 0x1f4cb,), # Clipboard
82-
(0x1f4da, 0x1f4da,), # Books
83-
(0x1f4df, 0x1f4df,), # Pager
84-
(0x1f4e4, 0x1f4e6,), # Outbox Tray ..Package
85-
(0x1f4ea, 0x1f4ed,), # Closed Mailbox With Lowe..Open Mailbox With Lowere
86-
(0x1f4f7, 0x1f4f7,), # Camera
87-
(0x1f4f9, 0x1f4fb,), # Video Camera ..Radio
88-
(0x1f508, 0x1f508,), # Speaker
89-
(0x1f50d, 0x1f50d,), # Left-pointing Magnifying Glass
90-
(0x1f512, 0x1f513,), # Lock ..Open Lock
91-
(0x1f550, 0x1f567,), # Clock Face One Oclock ..Clock Face Twelve-thirty
92-
(0x1f610, 0x1f610,), # Neutral Face
93-
(0x1f687, 0x1f687,), # Metro
94-
(0x1f68d, 0x1f68d,), # Oncoming Bus
95-
(0x1f691, 0x1f691,), # Ambulance
96-
(0x1f694, 0x1f694,), # Oncoming Police Car
97-
(0x1f698, 0x1f698,), # Oncoming Automobile
98-
(0x1f6ad, 0x1f6ad,), # No Smoking Symbol
99-
(0x1f6b2, 0x1f6b2,), # Bicycle
100-
(0x1f6b9, 0x1f6ba,), # Mens Symbol ..Womens Symbol
101-
(0x1f6bc, 0x1f6bc,), # Baby Symbol
11+
(0x00023, 0x00023,), # Number Sign
12+
(0x0002a, 0x0002a,), # Asterisk
13+
(0x00030, 0x00039,), # Digit Zero ..Digit Nine
14+
(0x000a9, 0x000a9,), # Copyright Sign
15+
(0x000ae, 0x000ae,), # Registered Sign
16+
(0x0203c, 0x0203c,), # Double Exclamation Mark
17+
(0x02049, 0x02049,), # Exclamation Question Mark
18+
(0x02122, 0x02122,), # Trade Mark Sign
19+
(0x02139, 0x02139,), # Information Source
20+
(0x02194, 0x02199,), # Left Right Arrow ..South West Arrow
21+
(0x021a9, 0x021aa,), # Leftwards Arrow With Hoo..Rightwards Arrow With Ho
22+
(0x02328, 0x02328,), # Keyboard
23+
(0x023cf, 0x023cf,), # Eject Symbol
24+
(0x023ed, 0x023ef,), # Black Right-pointing Dou..Black Right-pointing Tri
25+
(0x023f1, 0x023f2,), # Stopwatch ..Timer Clock
26+
(0x023f8, 0x023fa,), # Double Vertical Bar ..Black Circle For Record
27+
(0x024c2, 0x024c2,), # Circled Latin Capital Letter M
28+
(0x025aa, 0x025ab,), # Black Small Square ..White Small Square
29+
(0x025b6, 0x025b6,), # Black Right-pointing Triangle
30+
(0x025c0, 0x025c0,), # Black Left-pointing Triangle
31+
(0x025fb, 0x025fc,), # White Medium Square ..Black Medium Square
32+
(0x02600, 0x02604,), # Black Sun With Rays ..Comet
33+
(0x0260e, 0x0260e,), # Black Telephone
34+
(0x02611, 0x02611,), # Ballot Box With Check
35+
(0x02618, 0x02618,), # Shamrock
36+
(0x0261d, 0x0261d,), # White Up Pointing Index
37+
(0x02620, 0x02620,), # Skull And Crossbones
38+
(0x02622, 0x02623,), # Radioactive Sign ..Biohazard Sign
39+
(0x02626, 0x02626,), # Orthodox Cross
40+
(0x0262a, 0x0262a,), # Star And Crescent
41+
(0x0262e, 0x0262f,), # Peace Symbol ..Yin Yang
42+
(0x02638, 0x0263a,), # Wheel Of Dharma ..White Smiling Face
43+
(0x02640, 0x02640,), # Female Sign
44+
(0x02642, 0x02642,), # Male Sign
45+
(0x0265f, 0x02660,), # Black Chess Pawn ..Black Spade Suit
46+
(0x02663, 0x02663,), # Black Club Suit
47+
(0x02665, 0x02666,), # Black Heart Suit ..Black Diamond Suit
48+
(0x02668, 0x02668,), # Hot Springs
49+
(0x0267b, 0x0267b,), # Black Universal Recycling Symbol
50+
(0x0267e, 0x0267e,), # Permanent Paper Sign
51+
(0x02692, 0x02692,), # Hammer And Pick
52+
(0x02694, 0x02697,), # Crossed Swords ..Alembic
53+
(0x02699, 0x02699,), # Gear
54+
(0x0269b, 0x0269c,), # Atom Symbol ..Fleur-de-lis
55+
(0x026a0, 0x026a0,), # Warning Sign
56+
(0x026a7, 0x026a7,), # Male With Stroke And Male And Female Sign
57+
(0x026b0, 0x026b1,), # Coffin ..Funeral Urn
58+
(0x026c8, 0x026c8,), # Thunder Cloud And Rain
59+
(0x026cf, 0x026cf,), # Pick
60+
(0x026d1, 0x026d1,), # Helmet With White Cross
61+
(0x026d3, 0x026d3,), # Chains
62+
(0x026e9, 0x026e9,), # Shinto Shrine
63+
(0x026f0, 0x026f1,), # Mountain ..Umbrella On Ground
64+
(0x026f4, 0x026f4,), # Ferry
65+
(0x026f7, 0x026f9,), # Skier ..Person With Ball
66+
(0x02702, 0x02702,), # Black Scissors
67+
(0x02708, 0x02709,), # Airplane ..Envelope
68+
(0x0270c, 0x0270d,), # Victory Hand ..Writing Hand
69+
(0x0270f, 0x0270f,), # Pencil
70+
(0x02712, 0x02712,), # Black Nib
71+
(0x02714, 0x02714,), # Heavy Check Mark
72+
(0x02716, 0x02716,), # Heavy Multiplication X
73+
(0x0271d, 0x0271d,), # Latin Cross
74+
(0x02721, 0x02721,), # Star Of David
75+
(0x02733, 0x02734,), # Eight Spoked Asterisk ..Eight Pointed Black Star
76+
(0x02744, 0x02744,), # Snowflake
77+
(0x02747, 0x02747,), # Sparkle
78+
(0x02763, 0x02764,), # Heavy Heart Exclamation ..Heavy Black Heart
79+
(0x027a1, 0x027a1,), # Black Rightwards Arrow
80+
(0x02934, 0x02935,), # Arrow Pointing Rightward..Arrow Pointing Rightward
81+
(0x02b05, 0x02b07,), # Leftwards Black Arrow ..Downwards Black Arrow
82+
(0x1f170, 0x1f171,), # Negative Squared Latin C..Negative Squared Latin C
83+
(0x1f17e, 0x1f17f,), # Negative Squared Latin C..Negative Squared Latin C
84+
(0x1f321, 0x1f321,), # Thermometer
85+
(0x1f324, 0x1f32c,), # White Sun With Small Clo..Wind Blowing Face
86+
(0x1f336, 0x1f336,), # Hot Pepper
87+
(0x1f37d, 0x1f37d,), # Fork And Knife With Plate
88+
(0x1f396, 0x1f397,), # Military Medal ..Reminder Ribbon
89+
(0x1f399, 0x1f39b,), # Studio Microphone ..Control Knobs
90+
(0x1f39e, 0x1f39f,), # Film Frames ..Admission Tickets
91+
(0x1f3cb, 0x1f3ce,), # Weight Lifter ..Racing Car
92+
(0x1f3d4, 0x1f3df,), # Snow Capped Mountain ..Stadium
93+
(0x1f3f3, 0x1f3f3,), # Waving White Flag
94+
(0x1f3f5, 0x1f3f5,), # Rosette
95+
(0x1f3f7, 0x1f3f7,), # Label
96+
(0x1f43f, 0x1f43f,), # Chipmunk
97+
(0x1f441, 0x1f441,), # Eye
98+
(0x1f4fd, 0x1f4fd,), # Film Projector
99+
(0x1f549, 0x1f54a,), # Om Symbol ..Dove Of Peace
100+
(0x1f56f, 0x1f570,), # Candle ..Mantelpiece Clock
101+
(0x1f573, 0x1f579,), # Hole ..Joystick
102+
(0x1f587, 0x1f587,), # Linked Paperclips
103+
(0x1f58a, 0x1f58d,), # Lower Left Ballpoint Pen..Lower Left Crayon
104+
(0x1f590, 0x1f590,), # Raised Hand With Fingers Splayed
105+
(0x1f5a5, 0x1f5a5,), # Desktop Computer
106+
(0x1f5a8, 0x1f5a8,), # Printer
107+
(0x1f5b1, 0x1f5b2,), # Three Button Mouse ..Trackball
108+
(0x1f5bc, 0x1f5bc,), # Frame With Picture
109+
(0x1f5c2, 0x1f5c4,), # Card Index Dividers ..File Cabinet
110+
(0x1f5d1, 0x1f5d3,), # Wastebasket ..Spiral Calendar Pad
111+
(0x1f5dc, 0x1f5de,), # Compression ..Rolled-up Newspaper
112+
(0x1f5e1, 0x1f5e1,), # Dagger Knife
113+
(0x1f5e3, 0x1f5e3,), # Speaking Head In Silhouette
114+
(0x1f5e8, 0x1f5e8,), # Left Speech Bubble
115+
(0x1f5ef, 0x1f5ef,), # Right Anger Bubble
116+
(0x1f5f3, 0x1f5f3,), # Ballot Box With Ballot
117+
(0x1f5fa, 0x1f5fa,), # World Map
118+
(0x1f6cb, 0x1f6cb,), # Couch And Lamp
119+
(0x1f6cd, 0x1f6cf,), # Shopping Bags ..Bed
120+
(0x1f6e0, 0x1f6e5,), # Hammer And Wrench ..Motor Boat
121+
(0x1f6e9, 0x1f6e9,), # Small Airplane
122+
(0x1f6f0, 0x1f6f0,), # Satellite
123+
(0x1f6f3, 0x1f6f3,), # Passenger Ship
102124
),
103125
}

wcwidth/table_vs16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Exports VS16_NARROW_TO_WIDE table keyed by supporting unicode version level.
33
4-
This code generated by wcwidth/bin/update-tables.py on 2023-11-07 16:43:49 UTC.
4+
This code generated by wcwidth/bin/update-tables.py on 2024-03-15 14:05:54 UTC.
55
"""
66
VS16_NARROW_TO_WIDE = {
77
'9.0.0': (

wcwidth/table_wide.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Exports WIDE_EASTASIAN table keyed by supporting unicode version level.
33
4-
This code generated by wcwidth/bin/update-tables.py on 2024-01-06 01:39:49 UTC.
4+
This code generated by wcwidth/bin/update-tables.py on 2024-03-15 14:05:54 UTC.
55
"""
66
WIDE_EASTASIAN = {
77
'4.1.0': (

wcwidth/table_zero.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Exports ZERO_WIDTH table keyed by supporting unicode version level.
33
4-
This code generated by wcwidth/bin/update-tables.py on 2024-01-04 07:14:52 UTC.
4+
This code generated by wcwidth/bin/update-tables.py on 2024-03-15 14:05:54 UTC.
55
"""
66
ZERO_WIDTH = {
77
'4.1.0': (

wcwidth/unicode_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Exports function list_versions() for unicode version level support.
33
4-
This code generated by wcwidth/bin/update-tables.py on 2023-09-14 15:45:33 UTC.
4+
This code generated by wcwidth/bin/update-tables.py on 2024-03-15 14:05:54 UTC.
55
"""
66

77

0 commit comments

Comments
 (0)