pygame.font — pygame v2.1.1 documentation
https://www.pygame.org/docs/ref/font.htmlYou should test that pygame.font pygame module for loading and rendering fonts is available and initialized before attempting to use the module. Most of the work done with fonts are done by using the actual Font objects. The module by itself only has routines to initialize the module and create Font objects with pygame.font.Font().