Skip to content

Commit

Permalink
Partially regenerate codepoint widths from Emoji 13.0 (#5934)
Browse files Browse the repository at this point in the history
This removes all glyphs from the emoji list that do not default to
"emoji presentation" (EPres). It removes all local overrides, but retains
the comments about the emoji we left out that are Microsoft-specific.

This brings us fully in line with the most popular Terminals on OS X,
except that we squash our emoji down to fit in one cell and they let
them hang over the edges and damage other characters. Oh well.

## Detailed Description of the Pull Request / Additional comments

Late Friday evening, I tested my emoji test file on iTerm2. In so doing, I realized
that @j4james and @leonMSFT were right the entire time in #5914: Emoji
that require `U+FE0F` must not be double-width by default.

I finally banged up a powershell script that parses the UCD and emits a codepoint
width table. Once checked in, this will be definitive.

Refs #900, #5914.
Fixes #5941.

(cherry picked from commit ba1a298)
  • Loading branch information
DHowett-MSFT authored and DHowett committed May 17, 2020
1 parent bae91ce commit 0dfe1be
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 144 deletions.
5 changes: 3 additions & 2 deletions .github/actions/spell-check/whitelist/whitelist.txt
Expand Up @@ -710,6 +710,7 @@ Elems
elif
elseif
emacs
Emoji
Emojis
emptybox
enabledelayedexpansion
Expand All @@ -729,6 +730,7 @@ ENUMLOGFONTEX
enumranges
envvar
eol
EPres
ERASEBKGND
errno
errorlevel
Expand Down Expand Up @@ -1671,7 +1673,6 @@ OUTPATHROOT
Outptr
Ov
OVERLAPPEDWINDOW
OVR
OWNDC
OWNERDRAWFIXED
packageuwp
Expand Down Expand Up @@ -2433,6 +2434,7 @@ uap
uapadmin
ubuntu
ucd
UCD
uch
UCHAR
ucs
Expand Down Expand Up @@ -2632,7 +2634,6 @@ wfdopen
WFill
wfopen
wfstream
WGL
WHelper
whitelisting
WIDTHSCROLL
Expand Down

2 comments on commit 0dfe1be

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • adb
To accept these changes, run the following commands
remove_obsolete_words=$(mktemp)
echo '#!/usr/bin/perl -ni
my $re=join "|", qw('"
Emoji
Emojis
HREF
OUTPATHROOT
textblock
usr
vpack
"');
next if /^($re)(?:$| .*)/;
print;' > $remove_obsolete_words
chmod +x $remove_obsolete_words
for file in .github/actions/spell-check/whitelist/alphabet.txt .github/actions/spell-check/whitelist/web.txt .github/actions/spell-check/whitelist/whitelist.txt; do $remove_obsolete_words $file; done
rm $remove_obsolete_words
(
echo "
adb
href
"
) | sort -u -f | perl -ne 'next unless /./; print' > new_whitelist.txt && mv new_whitelist.txt '.github/actions/spell-check/whitelist/0dfe1bed1e9bf7bcf2cfadda2ece045a6bff3b8e.txt'
✏️ Contributor please read this
  • If the items listed above are names, please add them to .github/actions/spell-check/dictionary/names.txt.
  • If they're APIs, you can add them to a file in .github/actions/spell-check/dictionary/.
  • If they're just things you're using, please add them to an appropriate file in .github/actions/spell-check/whitelist/.
  • If you need to use a specific token in one place and it shouldn't generally be used, you can
    add an item in an appropriate file in .github/actions/spell-check/patterns/.

See the README.md in each directory for more information.

⚠️ Reviewers

At present, the action that triggered this message will not show its ❌ in this PR unless the branch is within this repository.
Thus, you should make sure that this comment has been addressed before encouraging the merge bot to merge this PR.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • adb
To accept these changes, run the following commands
remove_obsolete_words=$(mktemp)
echo '#!/usr/bin/perl -ni
my $re=join "|", qw('"
Emoji
Emojis
HREF
OUTPATHROOT
textblock
usr
vpack
"');
next if /^($re)(?:$| .*)/;
print;' > $remove_obsolete_words
chmod +x $remove_obsolete_words
for file in .github/actions/spell-check/whitelist/alphabet.txt .github/actions/spell-check/whitelist/web.txt .github/actions/spell-check/whitelist/whitelist.txt; do $remove_obsolete_words $file; done
rm $remove_obsolete_words
(
echo "
adb
href
"
) | sort -u -f | perl -ne 'next unless /./; print' > new_whitelist.txt && mv new_whitelist.txt '.github/actions/spell-check/whitelist/0dfe1bed1e9bf7bcf2cfadda2ece045a6bff3b8e.txt'
✏️ Contributor please read this
  • If the items listed above are names, please add them to .github/actions/spell-check/dictionary/names.txt.
  • If they're APIs, you can add them to a file in .github/actions/spell-check/dictionary/.
  • If they're just things you're using, please add them to an appropriate file in .github/actions/spell-check/whitelist/.
  • If you need to use a specific token in one place and it shouldn't generally be used, you can
    add an item in an appropriate file in .github/actions/spell-check/patterns/.

See the README.md in each directory for more information.

⚠️ Reviewers

At present, the action that triggered this message will not show its ❌ in this PR unless the branch is within this repository.
Thus, you should make sure that this comment has been addressed before encouraging the merge bot to merge this PR.

Please sign in to comment.