Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pygame font

import pygame

pygame.init()

# creating a new font using a ttf file
font = pygame.font.Font('font_path', 69)
text_surf = font.render('Hello world!', True, 'Black')
text_rect = text_surf.get_rect(center=(420, 150))
screen.blit(text_surf, text_rect)
Source by # #
 
PREVIOUS NEXT
Tagged: #pygame #font
ADD COMMENT
Topic
Name
6+6 =