Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 sdl 用 C 语言制作保龄球台(保龄球台是 bmp 文件),我需要在表中写入统计信息以及玩家姓名。我尝试SDL_ttf在屏幕上写文字,但它不能写在图片上,在我的情况下是在表格中。一件愚蠢的事情是为每个值制作一点 bmps,但它是 300 个不同的数字,所以没办法。
SDL_ttf
在 SDL 中,字体是与其他表面一样的表面。
因此,如果您希望能够看到您的字体,您只需在表格表面之后对其进行 blit。
另一种方法是使用字体精灵表。