pygame.font.Font/SysFont().render() does not support multiple line text.
This is stated in the documentation here.
The text can only be a single line: newline characters are not rendered.
One way you can work around this is to render a list of single line strings. One for each line, and blit them one below the other.
Example:
posX = (self.scrWidth * 1/8)
posY = (self.scrHeight * 1/8)
position = posX, posY
font = pygame.font.SysFont(self.font, self.fontSize)
if text == "INFO":
text = ["If you are learning to play, it is recommended",
"you chose your own starting area."]
label = []
for line in text:
label.append(font.render(text, True, self.fontColour))
return label, position
Then to blit the images, you can use another for loop like this:
for line in range(len(label)):
surface.blit(label(line),(position[0],position[1]+(line*fontsize)+(15*line)))
In the Y value for the blit, the value is:
position[1]+(line*fontsize)+(15*line)
what this is doing exactly is taking position[0], which is the posY variable from earlier, and using it as the top left most position of the blit.
Then (line*fontsize) is added to that. Because the for loop uses a range instead of the list items themselves, line will be 1,2,3, etc..., and thus can be added to put each consecutive line directly below the other.
Finally, (15*line) is added to that. This is how we get that margin between the spaces. The constant, in this case 15, represents how many pixels the margin is supposed to be. A higher number will give a bigger gap, and a lower number will lower the gap. The reason "line" is added to this is to compensate for moving the above line down said amount. If you wish, you may take away the "*line" to see how this will cause the lines to start overlapping.