jacebrowning / memegen

The free and open source API to generate memes.
https://memegen.link
MIT License
1.37k stars 192 forks source link

Feature Request: Emoji support? #878

Open Vivinn-c opened 4 weeks ago

Vivinn-c commented 4 weeks ago

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 commented 4 weeks ago

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 commented 4 weeks ago

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

jacebrowning commented 3 weeks ago

I tried adding that font in https://github.com/jacebrowning/memegen/pull/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 commented 3 weeks ago

~Hmm, looks like Pillow doesn't support noto emoji, hmm https://github.com/python-pillow/Pillow/issues/3346#issuecomment-612139601~ Ignore this comment

Vivinn-c commented 3 weeks ago

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 commented 3 weeks ago

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 commented 2 weeks ago

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