In my project, one effect I would like to use is making text grow and shrink in size. The idea is to load the font .ttf file as a RWops once, then on each frame, calculate the size, create a TTF from the RWops and size, use it to render the text to a surface, use the surface to make a texture, and blit the texture. To make it still display in the same place, I’m also adjusting the y coordinate upward by half the difference in font size. I think in practice, this value (half) needs to depend on the font in question but that’s getting off-topic.
Sounds simple enough, but it actually looks really janky in execution, when the font size increases, say from 30pt to 30.5pt, making the font render 1 pixel taller (30.5 rounds up to 31) but render at the same height (-.25 rounds up to 0) and such unusual quantizations continue to happen on subsequent frames.
Is there a way that I can have the font text draw at partial pixel coordinates (say 300.5, 200.5 as opposed to 300, 200) and have it blend at the edges, or some other technique to make this look smoother, or am I stuck with something that either looks really bizarre or just doesn’t have that extra effect?