I am trying to insert emoji into an image using pillow library but the result is not what I want.
I want the emoji look exactly the same as it looks in iphone, but the result is a black and white ugly emoji.
this is my code:
from PIL import Image, ImageDraw, ImageFont
back_ground_color = (255, 255, 255)
font_color = (0, 0, 0)
unicode_text = u"\U0001f618"
im = Image.new("RGB", (200, 200), back_ground_color)
draw = ImageDraw.Draw(im)
unicode_font = ImageFont.truetype("Symbola.ttf", 36)
draw.text((80, 80), unicode_text, font=unicode_font, fill=font_color)
im.show()
and below is the reult:

So what am i doing wrong?
Pillow 8.0.0 has now been released by adding support for COLR fonts.
Source: https://github.com/python-pillow/Pillow/pull/4955
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With