font = pygame.font.SysFont("freesansbold.ttf", 30) # 30:font size
text = font.render("content", True, (0,0,0)) # (0,0,0) color of font
self.window.blit(text,(10,10)) # (10,10) rect left top
[Pygame] Add text to the Pygame screen
Guess you like
Origin blog.csdn.net/ao1886/article/details/111395671
Ranking