You are on page 1of 1

RENDER

pygame provides no way to directly draw text on an existing Surface: instead you must use
Font. render() to create an image (Surface) of the text, then blit this image onto another
Surface. The text can only be a single line: newline characters are not rendered.

render(...)

| render(text, antialias, color, background=None) -> Surface

| draw text on a new Surface

pygame.font - pygame module for loading and rendering fonts

class Font(builtins.object)

| Font(filename, size) -> Font

| Font(object, size) -> Font

| create a new Font object from a file

You might also like