SDL2_ttf rendering problem

So I’ve been using SDL2_ttf, but when I render text using the
MerriweatherSans-Italic.ttf font, sometimes the first part of the first
letter on J’s and A’s and such gets clipped off and rendered on the other
side of the texture. Is there a work around for this?

Image of the problem https://dl.dropboxusercontent.com/u/44789313/ttf.png

Thanks.

I dunno if you’ve identified the problem, but have you noticed that
the little bit of an “A” you’ve got there has a higher baseline than
the rest of the line?

What that tells me is that it’s rendering at X < 0. The only reason
that isn’t crashing is because it’s not happening on Y = 0.

I don’t know enough freetype or SDL_ttf to know how to fix that, but
you have spotted a bug in one of them. It probably only shows up on
italic TTFs, as well.

JosephOn Fri, Oct 18, 2013 at 03:48:31PM -0500, tnelsond . wrote:

So I’ve been using SDL2_ttf, but when I render text using the
MerriweatherSans-Italic.ttf font, sometimes the first part of the first
letter on J’s and A’s and such gets clipped off and rendered on the other
side of the texture. Is there a work around for this?

Image of the problem https://dl.dropboxusercontent.com/u/44789313/ttf.png

Thanks.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org