I am writing codes which search program with pygame, wikipedia
This is part of my codes
display = pygame.display.set_mode((420, 990))
sem = pygame.font.Font("fonts.ttf", 30)
def write(msg, color, x, y):
surface = sem.render(msg, True, color)
display.blit(surface, (x,y))
then, I can render text. and next, Type words what I want to get information in wikipedia(code skip): and get information in wikipedia(next line) result = wikipedia.summary(search, sentences=2)
but if i write long sentence, the result is like this: enter image description here
The sentence is cutted. So, I want this result like this:
Previous
Stack Overflow is a privately held website, the fl
Desired result
Stack Overflow is a privately held website, the flow(sentence continue)
How can I line break in pygame? (But I don't know sentence length