element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.34k stars 711 forks source link

Reactions: use twemoji #198

Open manuroe opened 5 years ago

manuroe commented 5 years ago

There was a discussion about using twemoji instead of native emojis to break fragmentations but I cannot find a clear conclusion.

BillCarsonFr commented 5 years ago

A compatible twemoji font for android is around 8mo, which is a big addition to the apk if embedded.

We could add an option to download it if needed (that can be disabled in user preference). If we download it, we will need the font to be served somewhere (need a bit of investigation regarding security implications)

We could also rely on androids Downloadable Fonts, but it will only work for android devices with google play services installed. In this case Goggle Play services is doing the download and sharing the font with other apps that need it (avoiding the need to dl x times the same font)

And an other point, in order to use that font in any text view, we need to have a mechanism to parse all texts and replace emojis with a span with the compatible font (EmojiCompat does it for devices gwith google services). It can impact performances and need more investigation

EchedelleLR commented 3 years ago

I have seen apps like Tusky allowing you to download and use Twemoji for replacing System Emojis without relying on Google Play Services. (Raw LineageOS Phone)

EchedelleLR commented 3 years ago

Screenshot_20201102-163332 Screenshot_20201102-163316

As you can see, after downloading and applying, the emojis in the keyboard (not fedimojis but coming from the keyboard so are unicode real characters) are replaced by Twemojis in the written text (not showed in keyboard level but in the message written).