Skip to content

Use CLDR names in emoji list#8422

Open
MDLC01 wants to merge 1 commit into
typst:mainfrom
MDLC01:emoji-list-names
Open

Use CLDR names in emoji list#8422
MDLC01 wants to merge 1 commit into
typst:mainfrom
MDLC01:emoji-list-names

Conversation

@MDLC01
Copy link
Copy Markdown
Collaborator

@MDLC01 MDLC01 commented Jun 3, 2026

Closes #8340.

Honestly, the status quo is quite bad for the emoji list; even the imperfect solution proposed in this PR is better. Emoji haven't been given much love in Codex either, but I would like to get to it at some point, starting with flags.

Here is how the title of a symbol flyout is determined now:

  1. If the symbol value has a CLDR short name listed in emoji-zwj-sequences.txt, use that name.
  2. Otherwise, if the first codepoint has a Unicode name in unicode_names2, use that name.
  3. Else, don't show anything.

I would like to get rid of 3., but sadly unicode_names2 has not been updated to Unicode 17.0. I will make a PR there soon, but I am not convinced a new version will be released in time (the last commit was 9 months ago, and there are open PRs from almost a year ago). This is only an issue for a couple symbols, so it's probably fine.

Regarding 1., as explained in #8340, ICU4X does not expose CLDR short names for now. I opted for the easiest solution: use the emoji-zwj-sequences.txt file (added to typst-dev-assets in typst/typst-dev-assets#30), which contains most names we care about. This not the most satisfying solution, but it is barely distinguishable from an ideal solution to the end user, which is what matters in the end.

Marking as a draft until I can figure out whether it's possible to get unicode_names2 to update to Unicode 17.0. Done.

@MDLC01 MDLC01 marked this pull request as draft June 3, 2026 16:51
@MDLC01
Copy link
Copy Markdown
Collaborator Author

MDLC01 commented Jun 3, 2026

I opened progval/unicode_names2#57

@MDLC01 MDLC01 force-pushed the emoji-list-names branch from bca5d40 to 3def629 Compare June 4, 2026 11:54
@MDLC01
Copy link
Copy Markdown
Collaborator Author

MDLC01 commented Jun 4, 2026

unicode_names2 version 3.1.0 supports Unicode 17.0

@MDLC01 MDLC01 marked this pull request as ready for review June 4, 2026 11:55
@laurmaedje laurmaedje added waiting-on-review This PR is waiting to be reviewed. docs Improvements or additions to documentation's content. labels Jun 4, 2026
@MDLC01 MDLC01 force-pushed the emoji-list-names branch from 3def629 to d0e11eb Compare June 4, 2026 18:15
@MDLC01 MDLC01 force-pushed the emoji-list-names branch from d0e11eb to e40cf67 Compare June 4, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation's content. waiting-on-review This PR is waiting to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CLDR emoji names in emoji list

2 participants