'How to load colorful emojis in pygame?
I want to use Pygame's freetype module to load a colorful emoji via its unicode. Unfortunately I only get a monochrome image with the outline of the emoji:
Minimal, Reproducible Example:
import pygame
import pygame.freetype
pygame.init()
window = pygame.display.set_mode((200, 200))
seguisy80 = pygame.freetype.SysFont("segoeuisymbol", 100)
emoji, rect = seguisy80.render('😃', "black")
rect.center = window.get_rect().center
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
window.fill("lightgray")
window.blit(emoji, rect)
pygame.display.flip()
pygame.quit()
How can I modify this code to get a full RGBA color image of an emoji?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

