Приложу код, который генерирует и копирует маску
Код: Выделить всё
location_text = self.font.render(self.location, True, self.text_color)
pos = ((screen_width - location_text.get_width()) / 2, 320)
mask = pygame.mask.from_surface(location_text)
mask_surf = mask.to_surface()
mask_surf.set_colorkey((0, 0, 0))
screen.blit(mask_surf, (pos[0], pos[1]))

Подробнее здесь: https://stackoverflow.com/questions/791 ... -in-pygame
Мобильная версия