Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pygame render text

"""system font"""
font = pygame.font.SysFont("Segoe UI", 35)

"""font from .ttf file"""
font = pygame.font.Font("path/to/font.ttf", 35)

textsurface = font.render("text", False, color)  # "text", antialias, color
surface.blit(textsurface, (x, y))
 
PREVIOUS NEXT
Tagged: #pygame #render #text
ADD COMMENT
Topic
Name
8+5 =