Our great sponsors
-
Pygame
đđŽ pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Pygame uses SDL_ttf under the hood to work with fonts. If youâre just wanting to load your own font you can just use pygame.font.Font() and point it to a ttf file. If youâre wanting to mess with the font object or do something else with the raw font data, you might want to check out https://github.com/pygame/pygame/blob/main/src_c/font.c and https://github.com/libsdl-org/SDL_ttf/blob/main/SDL_ttf.c to get an idea of what pygame and SDL are doing under the surface.
Pygame uses SDL_ttf under the hood to work with fonts. If youâre just wanting to load your own font you can just use pygame.font.Font() and point it to a ttf file. If youâre wanting to mess with the font object or do something else with the raw font data, you might want to check out https://github.com/pygame/pygame/blob/main/src_c/font.c and https://github.com/libsdl-org/SDL_ttf/blob/main/SDL_ttf.c to get an idea of what pygame and SDL are doing under the surface.