KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to make images out of tweets, however some of them contain Emojis . I am using PIL to render my images and the Symbola font. The text is in unicode utf-8 encoding and the Symbola font does include the emojis. Here is an abridged version of the code: from PIL import Image, ImageFont, ImageDraw text = u"\U0001f300" #CYCLONE emoji image = Image.new("RGBA", (100,100), (255,255,255)) font = ImageFont.truetype("Symbola.ttf", 60, encoding='unic') draw = ImageDraw.Draw(image) draw.text((0,0), text, (0,0,0), font=font) image.save("Test.png") image.show() This just renders and image with two rectangles instead of the emoji Would appreciate any help or ideas. Thanks! EDIT: As falsetru pointed out, this code does run in Ubuntu, however it doesn't run on Windows or on Mac. Any ideas?
Tags (comma-separated)
Save Edits
Cancel