cheeaun / phanpy

A minimalistic opinionated Mastodon web client
https://phanpy.social
MIT License
1.03k stars 97 forks source link

Missing unicode simbol shown only on phanpy #476

Open eliocamp opened 6 months ago

eliocamp commented 6 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to to https://mastodon.online/@danirabbit/112191286964479278
  2. See blue, pink and white hearts.
  3. Go to https://phanpy.social/#/mastodon.social/s/112191287236876403
  4. See a mess of invalid unicode symbols.

Expected behavior

The correct emojis should be shown

Screenshots

Correctly-looking post in the user's instance:

image

Correctly-looking post in mastodon.social client:

image

Post as it looks on phanpy:

image

Desktop (please complete the following information):

wakest commented 6 months ago

don't have the solution to this issues, but heres how it looks in Phanpy dev on newest Firefox on macOS

image
cheeaun commented 6 months ago

Phanpy uses OS native emojis, so it's likely that your OS doesn't support them yet (specifically the included emoji font). This is a known common problem with emojis — that's why a lot of web apps (but not mobile apps 🤔) replace them with images (emoji iconsets) 😅.

Some analysis:

I'm aware of ways to fix this but despite emojis looking simple, they are quite complicated and require annual maintenance (there are always new emojis every year, coinciding with new OS releases 😩) — also one of the reasons why Phanpy doesn't include a (non-custom) emoji picker (as of now) 🙏

eliocamp commented 6 months ago

I thought that could be the issue but then I didn't understand why the mastodon.social client showed the correct emojis. Is it using some other font rendering thing that doesn't rely on th system's emoji font?

cheeaun commented 6 months ago

@eliocamp the client replaces the unicode character with an image.

Looking at the blue heart icon design, I suspect it's Twemoji https://emojipedia.org/twitter/twemoji-15.0.1/light-blue-heart

Fastidious commented 5 months ago

This is how it shows in Gnome, no issues:

image