largeText = pygame.font.Font('digifaw.ttf',450)
Font size is 450 and is suitable for the displaying the text in a full screen display of resolution 1366x768
. How do I change the font size such that it is compatible with other display resolutions ? I looked up the pydocs for font and couldn't find anything related to auto scaling.
Update: Here's a snippet of the code
def text_objects(text, font):
textSurface = font.render(text, True, black)
return textSurface, textSurface.get_rect()
def message_display(text):
largeText = pygame.font.Font('digifaw.ttf',450)
TextSurf, TextRect = text_objects(text, largeText)
TextRect.center = ((display_width/2),(display_height/2))
gameDisplay.blit(TextSurf, TextRect)
pygame.display.update()
time.sleep(1)