Вы можете визуализировать текст в Pygame, просто используйте:
класс pygame.font.Font
#create a new Font object from a file
pygame.font.Font(filename, size): return Font
pygame.font.Font(object, size): return Font
метод Font.render
#method of Font() to draw text on a new Surface
Font.render(text, antialias, color, background=None): return Surface
Простой пример того, какиспользовать текст в Pygame:
from pygame import font as pgfont, sprite as pgspr
import pygame as pg
class FontSprite(pgspr.DirtySprite):
def __init__(self, text, x, y):
'''self.image = surface'''
pgspr.DirtySprite.__init__(self)
self.text = text
self.color = [0,0,0]
self.image = self.get_image()
self.rect = pg.Rect((x, y), self.image.get_size())
def get_image(self):
self.dirty = 1
return pgfont.Font('fonts\\BRLNSR.TTF', self.size).render(self.text,
True,
self.color)