Hello, I’m trying to render some texts on the window, and creating a surface and turning it to a texture every frame isn’t a fast and good idea, so I’ve been informed about TTF_GlyphMetrics
which allows me to make a texture out of each character once and render it multiple time every frames, which does make my game so much faster, but there is a problem, each of these letters currently have their own texture, if I have 5 fonts, I use each of them in 3 sizes, and use 100 different characters, I’m going to have 1500 textures, so I’m planning to keep all of the characters which share font and font size, on a single textures, so not only I’ll have to deal with 15 textures instead 1500, but also according to this answer on stack-exchange, the rendering will be done faster
So my question is: What’s an simple solution to keep all of the glyphs which share font and font size in a single texture?
(My fonts aren’t mono-spaced)