You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized that some unicode characters output a width of 2 instead of 1 when they have the text variation modifier applied (\ufe0e), e.g.:
>'\u21a9\ufe0e''↩︎'// text>'\u21a9\ufe0f''↩️'// I cannot paste the emoji for some reason>stringWidth('\u21a9\ufe0f')2// Ok>stringWidth('\u21a9\ufe0e')2// should be 1
I took a look at the list of unicode characters that accept a variation here and it doesn't seem there is a simple rule to follow, some are full-width some are normal so I'm not sure if this can be handled correctly across platforms.
This is a display test I used to visually check some of the characters:
console.log(`\u0023\uFE0E ; text style; # (1.1) NUMBER SIGN`)console.log(`\u0023\uFE0F ; emoji style; # (1.1) NUMBER SIGN`)console.log(`\u002A\uFE0E ; text style; # (1.1) ASTERISK`)console.log(`\u002A\uFE0F ; emoji style; # (1.1) ASTERISK`)console.log(`\u0030\uFE0E ; text style; # (1.1) DIGIT ZERO`)console.log(`\u0030\uFE0F ; emoji style; # (1.1) DIGIT ZERO`)console.log(`\u0031\uFE0E ; text style; # (1.1) DIGIT ONE`)console.log(`\u0031\uFE0F ; emoji style; # (1.1) DIGIT ONE`)console.log(`\u0032\uFE0E ; text style; # (1.1) DIGIT TWO`)console.log(`\u0032\uFE0F ; emoji style; # (1.1) DIGIT TWO`)console.log(`\u0033\uFE0E ; text style; # (1.1) DIGIT THREE`)console.log(`\u0033\uFE0F ; emoji style; # (1.1) DIGIT THREE`)console.log(`\u0034\uFE0E ; text style; # (1.1) DIGIT FOUR`)console.log(`\u0034\uFE0F ; emoji style; # (1.1) DIGIT FOUR`)console.log(`\u0035\uFE0E ; text style; # (1.1) DIGIT FIVE`)console.log(`\u0035\uFE0F ; emoji style; # (1.1) DIGIT FIVE`)console.log(`\u0036\uFE0E ; text style; # (1.1) DIGIT SIX`)console.log(`\u0036\uFE0F ; emoji style; # (1.1) DIGIT SIX`)console.log(`\u0037\uFE0E ; text style; # (1.1) DIGIT SEVEN`)console.log(`\u0037\uFE0F ; emoji style; # (1.1) DIGIT SEVEN`)console.log(`\u0038\uFE0E ; text style; # (1.1) DIGIT EIGHT`)console.log(`\u0038\uFE0F ; emoji style; # (1.1) DIGIT EIGHT`)console.log(`\u0039\uFE0E ; text style; # (1.1) DIGIT NINE`)console.log(`\u0039\uFE0F ; emoji style; # (1.1) DIGIT NINE`)console.log(`\u00A9\uFE0E ; text style; # (1.1) COPYRIGHT SIGN`)console.log(`\u00A9\uFE0F ; emoji style; # (1.1) COPYRIGHT SIGN`)console.log(`\u00AE\uFE0E ; text style; # (1.1) REGISTERED SIGN`)console.log(`\u00AE\uFE0F ; emoji style; # (1.1) REGISTERED SIGN`)console.log(`\u203C\uFE0E ; text style; # (1.1) DOUBLE EXCLAMATION MARK`)console.log(`\u203C\uFE0F ; emoji style; # (1.1) DOUBLE EXCLAMATION MARK`)console.log(`\u2049\uFE0E ; text style; # (3.0) EXCLAMATION QUESTION MARK`)console.log(`\u2049\uFE0F ; emoji style; # (3.0) EXCLAMATION QUESTION MARK`)console.log(`\u2122\uFE0E ; text style; # (1.1) TRADE MARK SIGN`)console.log(`\u2122\uFE0F ; emoji style; # (1.1) TRADE MARK SIGN`)console.log(`\u2139\uFE0E ; text style; # (3.0) INFORMATION SOURCE`)console.log(`\u2139\uFE0F ; emoji style; # (3.0) INFORMATION SOURCE`)console.log(`\u2194\uFE0E ; text style; # (1.1) LEFT RIGHT ARROW`)console.log(`\u2194\uFE0F ; emoji style; # (1.1) LEFT RIGHT ARROW`)console.log(`\u2195\uFE0E ; text style; # (1.1) UP DOWN ARROW`)console.log(`\u2195\uFE0F ; emoji style; # (1.1) UP DOWN ARROW`)console.log(`\u2196\uFE0E ; text style; # (1.1) NORTH WEST ARROW`)console.log(`\u2196\uFE0F ; emoji style; # (1.1) NORTH WEST ARROW`)console.log(`\u2197\uFE0E ; text style; # (1.1) NORTH EAST ARROW`)console.log(`\u2197\uFE0F ; emoji style; # (1.1) NORTH EAST ARROW`)console.log(`\u2198\uFE0E ; text style; # (1.1) SOUTH EAST ARROW`)console.log(`\u2198\uFE0F ; emoji style; # (1.1) SOUTH EAST ARROW`)console.log(`\u2199\uFE0E ; text style; # (1.1) SOUTH WEST ARROW`)console.log(`\u2199\uFE0F ; emoji style; # (1.1) SOUTH WEST ARROW`)console.log(`\u21A9\uFE0E ; text style; # (1.1) LEFTWARDS ARROW WITH HOOK`)console.log(`\u21A9\uFE0F ; emoji style; # (1.1) LEFTWARDS ARROW WITH HOOK`)console.log(`\u21AA\uFE0E ; text style; # (1.1) RIGHTWARDS ARROW WITH HOOK`)console.log(`\u21AA\uFE0F ; emoji style; # (1.1) RIGHTWARDS ARROW WITH HOOK`)console.log(`\u231A\uFE0E ; text style; # (1.1) WATCH`)console.log(`\u231A\uFE0F ; emoji style; # (1.1) WATCH`)console.log(`\u231B\uFE0E ; text style; # (1.1) HOURGLASS`)console.log(`\u231B\uFE0F ; emoji style; # (1.1) HOURGLASS`)console.log(`\u2328\uFE0E ; text style; # (1.1) KEYBOARD`)console.log(`\u2328\uFE0F ; emoji style; # (1.1) KEYBOARD`)console.log(`\u23CF\uFE0E ; text style; # (4.0) EJECT SYMBOL`)console.log(`\u23CF\uFE0F ; emoji style; # (4.0) EJECT SYMBOL`)console.log(`\u23E9\uFE0E ; text style; # (6.0) BLACK RIGHT-POINTING DOUBLE TRIANGLE`)console.log(`\u23E9\uFE0F ; emoji style; # (6.0) BLACK RIGHT-POINTING DOUBLE TRIANGLE`)console.log(`\u23EA\uFE0E ; text style; # (6.0) BLACK LEFT-POINTING DOUBLE TRIANGLE`)console.log(`\u23EA\uFE0F ; emoji style; # (6.0) BLACK LEFT-POINTING DOUBLE TRIANGLE`)console.log(`\u23ED\uFE0E ; text style; # (6.0) BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH `)console.log(`\u23ED\uFE0F ; emoji style; # (6.0) BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH `)console.log(`\u23EE\uFE0E ; text style; # (6.0) BLACK LEFT-POINTING DOUBLE TRIANGLE WITH `)console.log(`\u23EE\uFE0F ; emoji style; # (6.0) BLACK LEFT-POINTING DOUBLE TRIANGLE WITH `)console.log(`\u23EF\uFE0E ; text style; # (6.0) BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE `)console.log(`\u23EF\uFE0F ; emoji style; # (6.0) BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE `)console.log(`\u23F1\uFE0E ; text style; # (6.0) STOPWATCH`)console.log(`\u23F1\uFE0F ; emoji style; # (6.0) STOPWATCH`)console.log(`\u23F2\uFE0E ; text style; # (6.0) TIMER CLOCK`)console.log(`\u23F2\uFE0F ; emoji style; # (6.0) TIMER CLOCK`)console.log(`\u23F3\uFE0E ; text style; # (6.0) HOURGLASS WITH FLOWING SAND`)console.log(`\u23F3\uFE0F ; emoji style; # (6.0) HOURGLASS WITH FLOWING SAND`)console.log(`\u23F8\uFE0E ; text style; # (7.0) DOUBLE VERTICAL BAR`)console.log(`\u23F8\uFE0F ; emoji style; # (7.0) DOUBLE VERTICAL BAR`)console.log(`\u23F9\uFE0E ; text style; # (7.0) BLACK SQUARE FOR STOP`)console.log(`\u23F9\uFE0F ; emoji style; # (7.0) BLACK SQUARE FOR STOP`)console.log(`\u23FA\uFE0E ; text style; # (7.0) BLACK CIRCLE FOR RECORD`)console.log(`\u23FA\uFE0F ; emoji style; # (7.0) BLACK CIRCLE FOR RECORD`)console.log(`\u24C2\uFE0E ; text style; # (1.1) CIRCLED LATIN CAPITAL LETTER M`)console.log(`\u24C2\uFE0F ; emoji style; # (1.1) CIRCLED LATIN CAPITAL LETTER M`)console.log(`\u25AA\uFE0E ; text style; # (1.1) BLACK SMALL SQUARE`)console.log(`\u25AA\uFE0F ; emoji style; # (1.1) BLACK SMALL SQUARE`)console.log(`\u25AB\uFE0E ; text style; # (1.1) WHITE SMALL SQUARE`)console.log(`\u25AB\uFE0F ; emoji style; # (1.1) WHITE SMALL SQUARE`)console.log(`\u25B6\uFE0E ; text style; # (1.1) BLACK RIGHT-POINTING TRIANGLE`)console.log(`\u25B6\uFE0F ; emoji style; # (1.1) BLACK RIGHT-POINTING TRIANGLE`)console.log(`\u25C0\uFE0E ; text style; # (1.1) BLACK LEFT-POINTING TRIANGLE`)console.log(`\u25C0\uFE0F ; emoji style; # (1.1) BLACK LEFT-POINTING TRIANGLE`)console.log(`\u25FB\uFE0E ; text style; # (3.2) WHITE MEDIUM SQUARE`)console.log(`\u25FB\uFE0F ; emoji style; # (3.2) WHITE MEDIUM SQUARE`)console.log(`\u25FC\uFE0E ; text style; # (3.2) BLACK MEDIUM SQUARE`)console.log(`\u25FC\uFE0F ; emoji style; # (3.2) BLACK MEDIUM SQUARE`)console.log(`\u25FD\uFE0E ; text style; # (3.2) WHITE MEDIUM SMALL SQUARE`)console.log(`\u25FD\uFE0F ; emoji style; # (3.2) WHITE MEDIUM SMALL SQUARE`)console.log(`\u25FE\uFE0E ; text style; # (3.2) BLACK MEDIUM SMALL SQUARE`)console.log(`\u25FE\uFE0F ; emoji style; # (3.2) BLACK MEDIUM SMALL SQUARE`)console.log(`\u2600\uFE0E ; text style; # (1.1) BLACK SUN WITH RAYS`)console.log(`\u2600\uFE0F ; emoji style; # (1.1) BLACK SUN WITH RAYS`)console.log(`\u2601\uFE0E ; text style; # (1.1) CLOUD`)console.log(`\u2601\uFE0F ; emoji style; # (1.1) CLOUD`)console.log(`\u2602\uFE0E ; text style; # (1.1) UMBRELLA`)console.log(`\u2602\uFE0F ; emoji style; # (1.1) UMBRELLA`)console.log(`\u2603\uFE0E ; text style; # (1.1) SNOWMAN`)console.log(`\u2603\uFE0F ; emoji style; # (1.1) SNOWMAN`)console.log(`\u2604\uFE0E ; text style; # (1.1) COMET`)console.log(`\u2604\uFE0F ; emoji style; # (1.1) COMET`)console.log(`\u260E\uFE0E ; text style; # (1.1) BLACK TELEPHONE`)console.log(`\u260E\uFE0F ; emoji style; # (1.1) BLACK TELEPHONE`)console.log(`\u2611\uFE0E ; text style; # (1.1) BALLOT BOX WITH CHECK`)console.log(`\u2611\uFE0F ; emoji style; # (1.1) BALLOT BOX WITH CHECK`)console.log(`\u2614\uFE0E ; text style; # (4.0) UMBRELLA WITH RAIN DROPS`)console.log(`\u2614\uFE0F ; emoji style; # (4.0) UMBRELLA WITH RAIN DROPS`)console.log(`\u2615\uFE0E ; text style; # (4.0) HOT BEVERAGE`)console.log(`\u2615\uFE0F ; emoji style; # (4.0) HOT BEVERAGE`)console.log(`\u2618\uFE0E ; text style; # (4.1) SHAMROCK`)console.log(`\u2618\uFE0F ; emoji style; # (4.1) SHAMROCK`)console.log(`\u261D\uFE0E ; text style; # (1.1) WHITE UP POINTING INDEX`)console.log(`\u261D\uFE0F ; emoji style; # (1.1) WHITE UP POINTING INDEX`)console.log(`\u2620\uFE0E ; text style; # (1.1) SKULL AND CROSSBONES`)console.log(`\u2620\uFE0F ; emoji style; # (1.1) SKULL AND CROSSBONES`)console.log(`\u2622\uFE0E ; text style; # (1.1) RADIOACTIVE SIGN`)console.log(`\u2622\uFE0F ; emoji style; # (1.1) RADIOACTIVE SIGN`)console.log(`\u2623\uFE0E ; text style; # (1.1) BIOHAZARD SIGN`)console.log(`\u2623\uFE0F ; emoji style; # (1.1) BIOHAZARD SIGN`)console.log(`\u2626\uFE0E ; text style; # (1.1) ORTHODOX CROSS`)console.log(`\u2626\uFE0F ; emoji style; # (1.1) ORTHODOX CROSS`)console.log(`\u262A\uFE0E ; text style; # (1.1) STAR AND CRESCENT`)console.log(`\u262A\uFE0F ; emoji style; # (1.1) STAR AND CRESCENT`)console.log(`\u262E\uFE0E ; text style; # (1.1) PEACE SYMBOL`)console.log(`\u262E\uFE0F ; emoji style; # (1.1) PEACE SYMBOL`)console.log(`\u262F\uFE0E ; text style; # (1.1) YIN YANG`)console.log(`\u262F\uFE0F ; emoji style; # (1.1) YIN YANG`)console.log(`\u2638\uFE0E ; text style; # (1.1) WHEEL OF DHARMA`)console.log(`\u2638\uFE0F ; emoji style; # (1.1) WHEEL OF DHARMA`)console.log(`\u2639\uFE0E ; text style; # (1.1) WHITE FROWNING FACE`)console.log(`\u2639\uFE0F ; emoji style; # (1.1) WHITE FROWNING FACE`)console.log(`\u263A\uFE0E ; text style; # (1.1) WHITE SMILING FACE`)console.log(`\u263A\uFE0F ; emoji style; # (1.1) WHITE SMILING FACE`)console.log(`\u2640\uFE0E ; text style; # (1.1) FEMALE SIGN`)console.log(`\u2640\uFE0F ; emoji style; # (1.1) FEMALE SIGN`)console.log(`\u2642\uFE0E ; text style; # (1.1) MALE SIGN`)console.log(`\u2642\uFE0F ; emoji style; # (1.1) MALE SIGN`)console.log(`\u2648\uFE0E ; text style; # (1.1) ARIES`)console.log(`\u2648\uFE0F ; emoji style; # (1.1) ARIES`)console.log(`\u2649\uFE0E ; text style; # (1.1) TAURUS`)console.log(`\u2649\uFE0F ; emoji style; # (1.1) TAURUS`)console.log(`\u264A\uFE0E ; text style; # (1.1) GEMINI`)console.log(`\u264A\uFE0F ; emoji style; # (1.1) GEMINI`)console.log(`\u264B\uFE0E ; text style; # (1.1) CANCER`)console.log(`\u264B\uFE0F ; emoji style; # (1.1) CANCER`)console.log(`\u264C\uFE0E ; text style; # (1.1) LEO`)console.log(`\u264C\uFE0F ; emoji style; # (1.1) LEO`)console.log(`\u264D\uFE0E ; text style; # (1.1) VIRGO`)console.log(`\u264D\uFE0F ; emoji style; # (1.1) VIRGO`)console.log(`\u264E\uFE0E ; text style; # (1.1) LIBRA`)console.log(`\u264E\uFE0F ; emoji style; # (1.1) LIBRA`)console.log(`\u264F\uFE0E ; text style; # (1.1) SCORPIUS`)console.log(`\u264F\uFE0F ; emoji style; # (1.1) SCORPIUS`)console.log(`\u2650\uFE0E ; text style; # (1.1) SAGITTARIUS`)console.log(`\u2650\uFE0F ; emoji style; # (1.1) SAGITTARIUS`)console.log(`\u2651\uFE0E ; text style; # (1.1) CAPRICORN`)console.log(`\u2651\uFE0F ; emoji style; # (1.1) CAPRICORN`)console.log(`\u2652\uFE0E ; text style; # (1.1) AQUARIUS`)console.log(`\u2652\uFE0F ; emoji style; # (1.1) AQUARIUS`)console.log(`\u2653\uFE0E ; text style; # (1.1) PISCES`)console.log(`\u2653\uFE0F ; emoji style; # (1.1) PISCES`)console.log(`\u265F\uFE0E ; text style; # (1.1) BLACK CHESS PAWN`)console.log(`\u265F\uFE0F ; emoji style; # (1.1) BLACK CHESS PAWN`)console.log(`\u2660\uFE0E ; text style; # (1.1) BLACK SPADE SUIT`)console.log(`\u2660\uFE0F ; emoji style; # (1.1) BLACK SPADE SUIT`)console.log(`\u2663\uFE0E ; text style; # (1.1) BLACK CLUB SUIT`)console.log(`\u2663\uFE0F ; emoji style; # (1.1) BLACK CLUB SUIT`)console.log(`\u2665\uFE0E ; text style; # (1.1) BLACK HEART SUIT`)console.log(`\u2665\uFE0F ; emoji style; # (1.1) BLACK HEART SUIT`)console.log(`\u2666\uFE0E ; text style; # (1.1) BLACK DIAMOND SUIT`)console.log(`\u2666\uFE0F ; emoji style; # (1.1) BLACK DIAMOND SUIT`)console.log(`\u2668\uFE0E ; text style; # (1.1) HOT SPRINGS`)console.log(`\u2668\uFE0F ; emoji style; # (1.1) HOT SPRINGS`)console.log(`\u267B\uFE0E ; text style; # (3.2) BLACK UNIVERSAL RECYCLING SYMBOL`)console.log(`\u267B\uFE0F ; emoji style; # (3.2) BLACK UNIVERSAL RECYCLING SYMBOL`)console.log(`\u267E\uFE0E ; text style; # (4.1) PERMANENT PAPER SIGN`)console.log(`\u267E\uFE0F ; emoji style; # (4.1) PERMANENT PAPER SIGN`)console.log(`\u267F\uFE0E ; text style; # (4.1) WHEELCHAIR SYMBOL`)console.log(`\u267F\uFE0F ; emoji style; # (4.1) WHEELCHAIR SYMBOL`)console.log(`\u2692\uFE0E ; text style; # (4.1) HAMMER AND PICK`)console.log(`\u2692\uFE0F ; emoji style; # (4.1) HAMMER AND PICK`)console.log(`\u2693\uFE0E ; text style; # (4.1) ANCHOR`)console.log(`\u2693\uFE0F ; emoji style; # (4.1) ANCHOR`)console.log(`\u2694\uFE0E ; text style; # (4.1) CROSSED SWORDS`)console.log(`\u2694\uFE0F ; emoji style; # (4.1) CROSSED SWORDS`)console.log(`\u2695\uFE0E ; text style; # (4.1) STAFF OF AESCULAPIUS`)console.log(`\u2695\uFE0F ; emoji style; # (4.1) STAFF OF AESCULAPIUS`)console.log(`\u2696\uFE0E ; text style; # (4.1) SCALES`)console.log(`\u2696\uFE0F ; emoji style; # (4.1) SCALES`)console.log(`\u2697\uFE0E ; text style; # (4.1) ALEMBIC`)console.log(`\u2697\uFE0F ; emoji style; # (4.1) ALEMBIC`)console.log(`\u2699\uFE0E ; text style; # (4.1) GEAR`)console.log(`\u2699\uFE0F ; emoji style; # (4.1) GEAR`)console.log(`\u269B\uFE0E ; text style; # (4.1) ATOM SYMBOL`)console.log(`\u269B\uFE0F ; emoji style; # (4.1) ATOM SYMBOL`)console.log(`\u269C\uFE0E ; text style; # (4.1) FLEUR-DE-LIS`)console.log(`\u269C\uFE0F ; emoji style; # (4.1) FLEUR-DE-LIS`)console.log(`\u26A0\uFE0E ; text style; # (4.0) WARNING SIGN`)console.log(`\u26A0\uFE0F ; emoji style; # (4.0) WARNING SIGN`)console.log(`\u26A1\uFE0E ; text style; # (4.0) HIGH VOLTAGE SIGN`)console.log(`\u26A1\uFE0F ; emoji style; # (4.0) HIGH VOLTAGE SIGN`)console.log(`\u26AA\uFE0E ; text style; # (4.1) MEDIUM WHITE CIRCLE`)console.log(`\u26AA\uFE0F ; emoji style; # (4.1) MEDIUM WHITE CIRCLE`)console.log(`\u26AB\uFE0E ; text style; # (4.1) MEDIUM BLACK CIRCLE`)console.log(`\u26AB\uFE0F ; emoji style; # (4.1) MEDIUM BLACK CIRCLE`)console.log(`\u26B0\uFE0E ; text style; # (4.1) COFFIN`)console.log(`\u26B0\uFE0F ; emoji style; # (4.1) COFFIN`)console.log(`\u26B1\uFE0E ; text style; # (4.1) FUNERAL URN`)console.log(`\u26B1\uFE0F ; emoji style; # (4.1) FUNERAL URN`)console.log(`\u26BD\uFE0E ; text style; # (5.2) SOCCER BALL`)console.log(`\u26BD\uFE0F ; emoji style; # (5.2) SOCCER BALL`)console.log(`\u26BE\uFE0E ; text style; # (5.2) BASEBALL`)console.log(`\u26BE\uFE0F ; emoji style; # (5.2) BASEBALL`)console.log(`\u26C4\uFE0E ; text style; # (5.2) SNOWMAN WITHOUT SNOW`)console.log(`\u26C4\uFE0F ; emoji style; # (5.2) SNOWMAN WITHOUT SNOW`)console.log(`\u26C5\uFE0E ; text style; # (5.2) SUN BEHIND CLOUD`)console.log(`\u26C5\uFE0F ; emoji style; # (5.2) SUN BEHIND CLOUD`)console.log(`\u26C8\uFE0E ; text style; # (5.2) THUNDER CLOUD AND RAIN`)console.log(`\u26C8\uFE0F ; emoji style; # (5.2) THUNDER CLOUD AND RAIN`)console.log(`\u26CF\uFE0E ; text style; # (5.2) PICK`)console.log(`\u26CF\uFE0F ; emoji style; # (5.2) PICK`)console.log(`\u26D1\uFE0E ; text style; # (5.2) HELMET WITH WHITE CROSS`)console.log(`\u26D1\uFE0F ; emoji style; # (5.2) HELMET WITH WHITE CROSS`)console.log(`\u26D3\uFE0E ; text style; # (5.2) CHAINS`)console.log(`\u26D3\uFE0F ; emoji style; # (5.2) CHAINS`)console.log(`\u26D4\uFE0E ; text style; # (5.2) NO ENTRY`)console.log(`\u26D4\uFE0F ; emoji style; # (5.2) NO ENTRY`)console.log(`\u26E9\uFE0E ; text style; # (5.2) SHINTO SHRINE`)console.log(`\u26E9\uFE0F ; emoji style; # (5.2) SHINTO SHRINE`)console.log(`\u26EA\uFE0E ; text style; # (5.2) CHURCH`)console.log(`\u26EA\uFE0F ; emoji style; # (5.2) CHURCH`)console.log(`\u26F0\uFE0E ; text style; # (5.2) MOUNTAIN`)console.log(`\u26F0\uFE0F ; emoji style; # (5.2) MOUNTAIN`)console.log(`\u26F1\uFE0E ; text style; # (5.2) UMBRELLA ON GROUND`)console.log(`\u26F1\uFE0F ; emoji style; # (5.2) UMBRELLA ON GROUND`)console.log(`\u26F2\uFE0E ; text style; # (5.2) FOUNTAIN`)console.log(`\u26F2\uFE0F ; emoji style; # (5.2) FOUNTAIN`)console.log(`\u26F3\uFE0E ; text style; # (5.2) FLAG IN HOLE`)console.log(`\u26F3\uFE0F ; emoji style; # (5.2) FLAG IN HOLE`)console.log(`\u26F4\uFE0E ; text style; # (5.2) FERRY`)console.log(`\u26F4\uFE0F ; emoji style; # (5.2) FERRY`)console.log(`\u26F5\uFE0E ; text style; # (5.2) SAILBOAT`)console.log(`\u26F5\uFE0F ; emoji style; # (5.2) SAILBOAT`)console.log(`\u26F7\uFE0E ; text style; # (5.2) SKIER`)console.log(`\u26F7\uFE0F ; emoji style; # (5.2) SKIER`)console.log(`\u26F8\uFE0E ; text style; # (5.2) ICE SKATE`)console.log(`\u26F8\uFE0F ; emoji style; # (5.2) ICE SKATE`)console.log(`\u26F9\uFE0E ; text style; # (5.2) PERSON WITH BALL`)console.log(`\u26F9\uFE0F ; emoji style; # (5.2) PERSON WITH BALL`)console.log(`\u26FA\uFE0E ; text style; # (5.2) TENT`)console.log(`\u26FA\uFE0F ; emoji style; # (5.2) TENT`)console.log(`\u26FD\uFE0E ; text style; # (5.2) FUEL PUMP`)console.log(`\u26FD\uFE0F ; emoji style; # (5.2) FUEL PUMP`)console.log(`\u2702\uFE0E ; text style; # (1.1) BLACK SCISSORS`)console.log(`\u2702\uFE0F ; emoji style; # (1.1) BLACK SCISSORS`)console.log(`\u2708\uFE0E ; text style; # (1.1) AIRPLANE`)console.log(`\u2708\uFE0F ; emoji style; # (1.1) AIRPLANE`)console.log(`\u2709\uFE0E ; text style; # (1.1) ENVELOPE`)console.log(`\u2709\uFE0F ; emoji style; # (1.1) ENVELOPE`)console.log(`\u270C\uFE0E ; text style; # (1.1) VICTORY HAND`)console.log(`\u270C\uFE0F ; emoji style; # (1.1) VICTORY HAND`)console.log(`\u270D\uFE0E ; text style; # (1.1) WRITING HAND`)console.log(`\u270D\uFE0F ; emoji style; # (1.1) WRITING HAND`)console.log(`\u270F\uFE0E ; text style; # (1.1) PENCIL`)console.log(`\u270F\uFE0F ; emoji style; # (1.1) PENCIL`)console.log(`\u2712\uFE0E ; text style; # (1.1) BLACK NIB`)console.log(`\u2712\uFE0F ; emoji style; # (1.1) BLACK NIB`)console.log(`\u2714\uFE0E ; text style; # (1.1) HEAVY CHECK MARK`)console.log(`\u2714\uFE0F ; emoji style; # (1.1) HEAVY CHECK MARK`)console.log(`\u2716\uFE0E ; text style; # (1.1) HEAVY MULTIPLICATION X`)console.log(`\u2716\uFE0F ; emoji style; # (1.1) HEAVY MULTIPLICATION X`)console.log(`\u271D\uFE0E ; text style; # (1.1) LATIN CROSS`)console.log(`\u271D\uFE0F ; emoji style; # (1.1) LATIN CROSS`)console.log(`\u2721\uFE0E ; text style; # (1.1) STAR OF DAVID`)console.log(`\u2721\uFE0F ; emoji style; # (1.1) STAR OF DAVID`)console.log(`\u2733\uFE0E ; text style; # (1.1) EIGHT SPOKED ASTERISK`)console.log(`\u2733\uFE0F ; emoji style; # (1.1) EIGHT SPOKED ASTERISK`)console.log(`\u2734\uFE0E ; text style; # (1.1) EIGHT POINTED BLACK STAR`)console.log(`\u2734\uFE0F ; emoji style; # (1.1) EIGHT POINTED BLACK STAR`)console.log(`\u2744\uFE0E ; text style; # (1.1) SNOWFLAKE`)console.log(`\u2744\uFE0F ; emoji style; # (1.1) SNOWFLAKE`)console.log(`\u2747\uFE0E ; text style; # (1.1) SPARKLE`)console.log(`\u2747\uFE0F ; emoji style; # (1.1) SPARKLE`)console.log(`\u2753\uFE0E ; text style; # (6.0) BLACK QUESTION MARK ORNAMENT`)console.log(`\u2753\uFE0F ; emoji style; # (6.0) BLACK QUESTION MARK ORNAMENT`)console.log(`\u2757\uFE0E ; text style; # (5.2) HEAVY EXCLAMATION MARK SYMBOL`)console.log(`\u2757\uFE0F ; emoji style; # (5.2) HEAVY EXCLAMATION MARK SYMBOL`)console.log(`\u2763\uFE0E ; text style; # (1.1) HEAVY HEART EXCLAMATION MARK ORNAMENT`)console.log(`\u2763\uFE0F ; emoji style; # (1.1) HEAVY HEART EXCLAMATION MARK ORNAMENT`)console.log(`\u2764\uFE0E ; text style; # (1.1) HEAVY BLACK HEART`)console.log(`\u2764\uFE0F ; emoji style; # (1.1) HEAVY BLACK HEART`)console.log(`\u27A1\uFE0E ; text style; # (1.1) BLACK RIGHTWARDS ARROW`)console.log(`\u27A1\uFE0F ; emoji style; # (1.1) BLACK RIGHTWARDS ARROW`)console.log(`\u2934\uFE0E ; text style; # (3.2) ARROW POINTING RIGHTWARDS THEN CURVING `)console.log(`\u2934\uFE0F ; emoji style; # (3.2) ARROW POINTING RIGHTWARDS THEN CURVING `)console.log(`\u2935\uFE0E ; text style; # (3.2) ARROW POINTING RIGHTWARDS THEN CURVING `)console.log(`\u2935\uFE0F ; emoji style; # (3.2) ARROW POINTING RIGHTWARDS THEN CURVING `)console.log(`\u2B05\uFE0E ; text style; # (4.0) LEFTWARDS BLACK ARROW`)console.log(`\u2B05\uFE0F ; emoji style; # (4.0) LEFTWARDS BLACK ARROW`)console.log(`\u2B06\uFE0E ; text style; # (4.0) UPWARDS BLACK ARROW`)console.log(`\u2B06\uFE0F ; emoji style; # (4.0) UPWARDS BLACK ARROW`)console.log(`\u2B07\uFE0E ; text style; # (4.0) DOWNWARDS BLACK ARROW`)console.log(`\u2B07\uFE0F ; emoji style; # (4.0) DOWNWARDS BLACK ARROW`)console.log(`\u2B1B\uFE0E ; text style; # (5.1) BLACK LARGE SQUARE`)console.log(`\u2B1B\uFE0F ; emoji style; # (5.1) BLACK LARGE SQUARE`)console.log(`\u2B1C\uFE0E ; text style; # (5.1) WHITE LARGE SQUARE`)console.log(`\u2B1C\uFE0F ; emoji style; # (5.1) WHITE LARGE SQUARE`)console.log(`\u2B50\uFE0E ; text style; # (5.1) WHITE MEDIUM STAR`)console.log(`\u2B50\uFE0F ; emoji style; # (5.1) WHITE MEDIUM STAR`)console.log(`\u2B55\uFE0E ; text style; # (5.2) HEAVY LARGE CIRCLE`)console.log(`\u2B55\uFE0F ; emoji style; # (5.2) HEAVY LARGE CIRCLE`)console.log(`\u3030\uFE0E ; text style; # (1.1) WAVY DASH`)console.log(`\u3030\uFE0F ; emoji style; # (1.1) WAVY DASH`)console.log(`\u303D\uFE0E ; text style; # (3.2) PART ALTERNATION MARK`)console.log(`\u303D\uFE0F ; emoji style; # (3.2) PART ALTERNATION MARK`)console.log(`\u3297\uFE0E ; text style; # (1.1) CIRCLED IDEOGRAPH CONGRATULATION`)console.log(`\u3297\uFE0F ; emoji style; # (1.1) CIRCLED IDEOGRAPH CONGRATULATION`)console.log(`\u3299\uFE0E ; text style; # (1.1) CIRCLED IDEOGRAPH SECRET`)console.log(`\u3299\uFE0F ; emoji style; # (1.1) CIRCLED IDEOGRAPH SECRET`)
The text was updated successfully, but these errors were encountered:
Hello,
I realized that some unicode characters output a width of 2 instead of 1 when they have the text variation modifier applied (
\ufe0e
), e.g.:I took a look at the list of unicode characters that accept a variation here and it doesn't seem there is a simple rule to follow, some are full-width some are normal so I'm not sure if this can be handled correctly across platforms.
This is a display test I used to visually check some of the characters:
The text was updated successfully, but these errors were encountered: