I have this piece of code right here:
import pygame
pygame.display.init()
pygame.font.init()
win = pygame.display.set_mode((100, 100))
font = pygame.font.Font('./arial.ttf', 10)
text = font.render('سلام', True, (255, 255, 255))
win.fill((0, 0, 0))
win.blit(text, (0, 0))
pygame.display.update()
for i in range(5):
pygame.event.clear()
pygame.time.delay(1000)
pygame.quit()
What I expect: سلام
What I get: سلام
How to fix it? (I don't care if I need to use another library to fix it, But I must use pygame for rest of code)
I also tried it on both pygame 1.9.6 and 2.0.0
