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

Feature Request: Emoji support? #878

Closed
Vivinn-c opened this issue Oct 25, 2024 · 7 comments · Fixed by #882
Closed

Feature Request: Emoji support? #878

Vivinn-c opened this issue Oct 25, 2024 · 7 comments · Fixed by #882

Comments

@Vivinn-c
Copy link

Hey! I've been using memegen for a while now, and I've always wanted a feature to be added. Is it possible to support emojis when creating memes? Thanks!

@jacebrowning jacebrowning changed the title Feature Request:Emoji support? Feature Request: Emoji support? Oct 25, 2024
@jacebrowning
Copy link
Owner

It comes down to which unicode characters are supported by a particular font.

For example, works with Impact: https://api.memegen.link/images/fry/unicode_test:_☺.webp?font=impact

You'd likely have to do some testing to see which of the available fonts have what you need.

@Vivinn-c
Copy link
Author

Hmm, looks like noto sans color emojis might be good for handling emojis

@jacebrowning
Copy link
Owner

I tried adding that font in #880 but it doesn't seem to be working: https://memegen-pr-880.herokuapp.com/images/fry/test_%F0%9F%98%AC.png?font=emoji

Any ideas?

@Vivinn-c
Copy link
Author

Vivinn-c commented Oct 27, 2024

Hmm, looks like Pillow doesn't support noto emoji, hmm
python-pillow/Pillow#3346 (comment)

Ignore this comment

@Vivinn-c
Copy link
Author

Vivinn-c commented Oct 27, 2024

Looks like using Segoe UI Emoji works best

embedded_color=False
image
embedded_color=True
image

The only issue currently is using embedded_color could sometimes do smth weird

@Vivinn-c
Copy link
Author

The cons of adding segiumj.ttf is that it may cause the outline to shift slightly out of alignment, if embedded_color is set to True.

@Vivinn-c
Copy link
Author

Vivinn-c commented Nov 8, 2024

Looks like memgen can process emojis without eexternal font support by using Pilmoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants