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

Emoji Variation selectors #25

Open
T0mstone opened this issue Jan 4, 2025 · 3 comments
Open

Emoji Variation selectors #25

T0mstone opened this issue Jan 4, 2025 · 3 comments
Labels
multi-character symbols This requires multi-code point symbols

Comments

@T0mstone
Copy link
Collaborator

T0mstone commented Jan 4, 2025

Some symbols have both a text style and an emoji style. These can be explicitly selected with Variation Selectors 15 and 16 (U+FE0E and U+FE0F), respectively.

Without these, there are currently (as of 35c18a1) the following duplicates between sym and emoji:

  • sym.hash, emoji.hash
  • sym.ast.basic, emoji.ast
  • sym.copyright, emoji.copyright
  • sym.trademark, emoji.tm
  • sym.trademark.registered, emoji.reg
  • sym.excl.{double, quest}, emoji.excl.{double, quest}
  • sym.arrow.{l.r, t.b, tl, tr, bl, br, {l, r}.hook, {l, r, t, b}.filled, {t, b}.curve}, emoji.arrow.{l.r, t.b, tl, tr, bl, br, {l, r}.hook, {l, r, t, b}.filled, {t, b}.curve}
  • sym.square.filled.big, emoji.square.black
  • sym.square.filled.{tiny, small, medium}, emoji.square.black.{tiny, small, medium}
  • sym.square.stroked.big, emoji.square.white
  • sym.square.stroked.{tiny, small, medium}, emoji.square.white.{tiny, small, medium}
  • sym.triangle.filled.{l, r}, emoji.triangle.{l, r}
  • sym.ballot.check, emoji.ballot.check
  • sym.suit.{spade, club, heart, diamond}.filled, emoji.suit.{spade, club, heart, diamond}
  • sym.checkmark.heavy, emoji.checkmark.heavy
  • sym.dash.wave.double, emoji.dash.wave.double

I haven't looked into which of the styles is the default for each of them, but we should probably give variation selectors to both sides to avoid ambiguity.

Prior work: #21, #23.

@MDLC01 MDLC01 added the multi-character symbols This requires multi-code point symbols label Jan 4, 2025
@T0mstone T0mstone changed the title Variation selectors Emoji Variation selectors Jan 21, 2025
This was referenced Jan 21, 2025
@MDLC01
Copy link
Collaborator

MDLC01 commented Feb 12, 2025

Note that this is currently blocked by Typst not supporting variation selectors in math, as was already mentioned in multiple instances.

@mkorje on Discord:

because its multiple characters and so ends up going through the normal text layout

@mkorje on Discord:

we need to then allow styling of a char in math to return possibly multiple characters. And also need to add the code to perform the glyph substitution somewhat manually (in line with everything else in math as it doesn't go through the shaper)

Some of the necessary changes are included in #20.

@Enivex
Copy link
Collaborator

Enivex commented Feb 12, 2025

Note that this is currently blocked by Typst not supporting variation selectors in math

Arguably that's only a blocker for support in math. It doesn't prevent them from being used in regular text

@EpicEricEE
Copy link

Maybe it's also worth mentioning that variation selectors currently don't seem to work at the end of a line (typst/typst#5319). While this isn't much of a blocker, I suppose that the end of a line is were emojis are commonly placed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multi-character symbols This requires multi-code point symbols
Projects
None yet
Development

No branches or pull requests

4 participants