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 🔥😄🤦🚀 #490

Closed
4 of 5 tasks
bugaevc opened this issue Aug 27, 2019 · 9 comments
Closed
4 of 5 tasks

Emoji 🔥😄🤦🚀 #490

bugaevc opened this issue Aug 27, 2019 · 9 comments

Comments

@bugaevc
Copy link
Member

bugaevc commented Aug 27, 2019

We've agreed that we want (color) emoji support in Serenity! 😄 👍

  • Implement UTF-8 support in the Painter (@bugaevc)
  • Draw (some) emoji glyphs (@awesomekling)
  • Enhance the font format to support color glyphs
  • Add a way to type these emojis
  • Verify everything works in the IRC client
@danboid
Copy link
Contributor

danboid commented Aug 27, 2019

🦄🦄🦄
💦🍆💦

@xTibor
Copy link
Contributor

xTibor commented Aug 27, 2019

Here is the Emoji spec as a friendly warning for those brave souls who wants to work on this issue: https://www.unicode.org/reports/tr51/

@bugaevc
Copy link
Member Author

bugaevc commented Aug 27, 2019

Enhance the font format to support color glyphs

We should probably share color emoji glyphs between fonts; then it makes sense not to embed them into the fonts themselves. And I think we should just store them as regular icons in /res/emoji, e.g. /res/emoji/U+1F926.png.

bugaevc added a commit to bugaevc/serenity that referenced this issue Aug 27, 2019
Utf8View wraps a StringView and implements begin() and end() that
return a Utf8CodepointIterator, which parses UTF-8-encoded Unicode
codepoints and returns them as 32-bit integers.

This is the first step towards supporting emojis in Serenity ^)
SerenityOS#490
@bugaevc bugaevc mentioned this issue Aug 27, 2019
bugaevc added a commit to bugaevc/serenity that referenced this issue Aug 28, 2019
Utf8View wraps a StringView and implements begin() and end() that
return a Utf8CodepointIterator, which parses UTF-8-encoded Unicode
codepoints and returns them as 32-bit integers.

This is the first step towards supporting emojis in Serenity ^)
SerenityOS#490
awesomekling pushed a commit that referenced this issue Aug 28, 2019
Utf8View wraps a StringView and implements begin() and end() that
return a Utf8CodepointIterator, which parses UTF-8-encoded Unicode
codepoints and returns them as 32-bit integers.

This is the first step towards supporting emojis in Serenity ^)
#490
@xTibor
Copy link
Contributor

xTibor commented Aug 29, 2019

We should probably share color emoji glyphs between fonts; then it makes sense not to embed them into the fonts themselves.

Having fallback font support and an Emoji-only font to be used as a fallback for the normal fonts would be an another way to solve this.

@bugaevc
Copy link
Member Author

bugaevc commented Aug 29, 2019

That is kind of what we're doing; but instead of making an actual emoji font we're storing the emoji set differently.

The reason is actual fonts (256 mmappable black-and-white glyphs) and the emoji set (few color PNGs we need to look up by codepoint) are different enough it makes sense to store and process them differently. We could generalize the font format to include some sort of a mapping table from codepoints to glyph offsets and to support more than simple bitmaps... but this seems to be a clearer solution so far

bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.

SerenityOS#490
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.

SerenityOS#490
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.

SerenityOS#490
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 4, 2019
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.

SerenityOS#490
@bugaevc bugaevc mentioned this issue Sep 4, 2019
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 5, 2019
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.

SerenityOS#490
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 5, 2019
bugaevc added a commit to bugaevc/serenity that referenced this issue Sep 5, 2019
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.

SerenityOS#490
awesomekling pushed a commit that referenced this issue Sep 5, 2019
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.

#490
awesomekling pushed a commit that referenced this issue Sep 5, 2019
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.

#490
@Quaker762
Copy link
Member

@bugaevc Can this issue be closed now?!

@bugaevc
Copy link
Member Author

bugaevc commented Feb 26, 2020

Maybe? We still don't have a way to type emojis, and text editor still doesn't support them

@bugaevc
Copy link
Member Author

bugaevc commented May 27, 2020

We have everything in place now 😄

@bugaevc bugaevc closed this as completed May 27, 2020
@awesomekling
Copy link
Collaborator

Hell yeah! 🤔

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

No branches or pull requests

5 participants