Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix accounting for Variation Selector 16 #97

Merged
merged 11 commits into from
Nov 13, 2023
Merged

Bugfix accounting for Variation Selector 16 #97

merged 11 commits into from
Nov 13, 2023

Conversation

jquast
Copy link
Owner

@jquast jquast commented Nov 7, 2023

Closes #96

  • Add new table, VS16_NARROW_TO_WIDE. It has only one version, "9.0.0". This defines a set of characters that are otherwise Narrow, like '0', that become wide when combined with U+FE0F, "VARIATION SELECTOR 16".

  • change wcwidth.wcswidth() function, now tracks "last measured character", and, on U+FE0F, checks that character in table VS16_NARROW_TO_WIDE, and, if matching, adds 1 to the measured width.

  • add verify-table-integrity.py, this is an unrelated file from previous work in Bugfixes for zero-width characters #91 that should have been included there.

  • new tests: The latest list of 'emoji-zwj-sequences.txt' and 'emoji-variation-sequences.txt' are fetched by update-tables.py and placed in 'tests/' folder, and now used by automatic tests in test_emoji_zwj.py, this is helpful to ensure 100% compatibility with all latest known emoji sequences

  • fix issue with codecov.io token

Note: A single "9.0.0" version is used because of ambiguity in legacy releases of the emoji variation sequences files. So ambiguous, that very few terminals get it right! Details are documented in update-tables.py and I will share results from 'ucs-detect' project shortly.

I believe that U+FE0F is something of a "fixup" for early emojis. I don't expect any new U+FE0F sequences to be published, no changes since release 10.0

Closes #96

- Add new table, `VS16_NARROW_TO_WIDE`. It has only one version,
  "9.0.0". This defines a set of characters that are otherwise Narrow,
  like '0', that become wide when combined with `U+FE0F`, "VARIATION
  SELECTOR 16".

- `wcwidth.wcswidth()` function now tracks "last measured character",
  and, on U+FE0F, checks that character in table VS16_NARROW_TO_WIDE,
  and, if matching, adds 1 to the measured width.

- add `verify-table-integrity.py`, this is an unrelated file from
  previous work in #91 that should have been included there.

- The latest list of 'emoji-zwj-sequences.txt' and
  'emoji-variation-sequences.txt' are fetched by update-tables.py and
  placed in 'tests/' folder, and now used by automatic tests in
  test_emoji_zwj.py, this is helpful to ensure 100% compatibility with
  all latest known emoji sequences

Note: A single "9.0.0" version is used because of ambiguity in legacy
releases of the emoji variation sequences files. So ambiguous, that very
few terminals get it right! Details are documented in update-tables.py
and I will share results from 'ucs-detect' project shortly.

I believe that U+FE0F is something of a "fixup" for early emojis. I
don't expect any new U+FE0F sequences to be published, no changes since
release 10.0
@jquast jquast marked this pull request as ready for review November 7, 2023 17:54

This comment was marked as outdated.

@jquast
Copy link
Owner Author

jquast commented Nov 8, 2023

This is tested with experimental branch of ucs-detect, sharing draft results shows 100% support for VS-16 as implemented in this branch, for ExtraTermQt, kitty, and zoc, while 91% support in iTerm2 and 88% in cool-retro-term, I think those two are in the area of ambiguity I have documented about.

@jquast
Copy link
Owner Author

jquast commented Nov 13, 2023

Testing results published for this branch at URL https://ucs-detect.readthedocs.io/results.html

7 of 25 Terminals have VS-16 support: Konsole, iTerm2, Kovid Goyle's kitty, Terminal.exe, Zoc, ExtratermQt, and cool-retro-term and 2 have partial support, cmd.exe and ConsoleZ

@jquast jquast merged commit 42e7af8 into master Nov 13, 2023
42 checks passed
@jquast jquast deleted the jq/bugfix-vs16 branch November 13, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wcswidth incorrect for heart emoji, ❤️ ("\u2764\ufe0f")
1 participant