deltachat-desktop icon indicating copy to clipboard operation
deltachat-desktop copied to clipboard

support new emojis

Open Simon-Laux opened this issue 2 years ago • 7 comments

we are still at 2019 emoji in the meantime unicode released two new versions and is now at a version from 2021. https://www.unicode.org/emoji/charts/emoji-versions.html

When updating our users would get access to the following new emojis: image

This issue has two parts:

  • [ ] Displaying them: Update google-noto-emoji font
  • [ ] Letting the user pick them: emoji picker emoji definition needs to be updated.

I assume on iOS the emojis are dependent on system version, so only dc-android might want to update it's emoji set as well. (ping @r10s @Hocuri @adbenitez)

Simon-Laux avatar Mar 09 '22 21:03 Simon-Laux

Would it be a problem to use a different version of this font in Nixpkgs? I could reduce the package size by using the noto-emoji font packaged in Nixpkgs.

dotlambda avatar Mar 10 '22 00:03 dotlambda

Would it be a problem to use a different version of this font in Nixpkgs? I could reduce the package size by using the noto-emoji font packaged in Nixpkgs.

I don't think so as long as it is newer and more up to date

Simon-Laux avatar Mar 10 '22 14:03 Simon-Laux

Is there any way we could use iOS emojis on non-Apple platform versions of DeltaChat? e.g. by supplying the Apple Emoji font extracted from MacOS or Telegram?

Darthagnon avatar Mar 11 '22 13:03 Darthagnon

Is there any way we could use iOS emojis on non-Apple platform versions of DeltaChat? e.g. by supplying the Apple Emoji font extracted from MacOS or Telegram?

you could theoretically extract the emoji font from apple and install it on your system, delta chat should pick it up.

I don't want to look into legals with redistributing that font packaged in DC, though.

Simon-Laux avatar Mar 11 '22 15:03 Simon-Laux

I need to do more research, as Apple Color Emoji is not compatible with Windows by default, and my attempts at conversion have failed so far. Does DeltaChat use system fonts or some sort of .woff web fonts? Telegram uses some sort of webview and probably a web version of Apple Color Emoji; no idea how they wrangle the license for it, but that's best left to crazy end users like me lol EDIT: Telegram uses Apple Color Emoji in webp format; there were discussions in Telegram-FOSS fork to replace Apple Emoji with alternatives, e.g. Noto, EmojiOne/Joypixels, OpenMoji

Darthagnon avatar Mar 11 '22 16:03 Darthagnon

deltachat uses system fonts, you can also inject custom css at runtime via custom user themes: https://github.com/deltachat/deltachat-desktop/blob/master/docs/THEMES.md

you can look at https://github.com/deltachat/deltachat-desktop/search?q=%22apple+color+emoji%22 to see which classes you'd need to overwrite. Or just get the font somehow installed as "Apple Color Emoji" system font.

maybe you could acquire the apple emoji font online or check the telegram files on your system for it.

Other options for emoji besides noto would be:

  • https://openmoji.org/
  • https://twemoji.twitter.com/

we could actually integrate those, but the problem with those emoji fonts is that they add about >10mb each to the package size, that's probably also the reason why telegram implements downloading them in the selection. we don't connect to servers to download stuff by default (besides the experimental mapbox integration for location streaming) so that might not be a thing we can do. But maybe we can change that policy a bit in the future, because we would have other uses for fetching external data (but I would still make them opt-in, so deltachat does not send nor fetch any data to servers without user consent):

  • checking online for new updates (maybe with auto updater, if not pulled from an store, but I don't want to maintain such an auto updater)
  • offering the user to download dictionaries for spellchecking
  • offering the user to download additional emojis sets

Simon-Laux avatar Mar 11 '22 16:03 Simon-Laux

we don't connect to servers to download stuff by default

Not downloading external data is a very good policy! Please don't change it! at least for my use cases, a File >> Select dialog for a separately downloaded emoji pack would be better (less risk of the inevitable 404). I've updated my earlier comment, as I've managed to located Telegram's Apple Emoji files. I'll take a look and see what I can do.

Darthagnon avatar Mar 11 '22 18:03 Darthagnon

@Darthagnon Soon you can easily change the used emoji font with the theming system, I also wrote a mini guide on how to do it: https://github.com/deltachat/deltachat-desktop/blob/2e783fd04e66b1b1c7ac5e5a9f5bbcdd5a89e842/docs/THEMES.md#guide-changing-the-emoji-font

Simon-Laux avatar Feb 22 '23 11:02 Simon-Laux