I’m having problems with SDL_TTF and certain fonts - namely, that the bottom
part of some glyphs is cut. See font.jpg. This is a test app, but showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be fixed?
I’m having problems with SDL_TTF and certain fonts - namely, that the bottom
part of some glyphs is cut. See font.jpg. This is a test app, but showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be fixed?
I’m having problems with SDL_TTF and certain fonts - namely, that the
bottom
part of some glyphs is cut. See font.jpg. This is a test app, but
showfont
included in SDL_TTF does the same.
There are a few tools in the freetype demo package, try the font with
them. ftview may be the first you want to try (read the help…).
Perhaps you can narrow down the problem to freetype or SDL_ttf.On Fri, 25 Sep 2009 11:51:00 -0300, Gabriel Gambetta wrote:
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be fixed?
It is a problem of SDL_ttf, not Freetype.
Freetype is able to correctly render the letters.
SDL_ttf is somehow calculating the height of the final surface
wrong. It is simply not big enough. As an experiment i replaced
the height parameter in every SDL_AllocSurface in SDL_ttf with height + 50
and voila, it shows the complete letter, look at the attached png.
Man, this sounds familiar. I swear I remember something about a
descending character (‘j’) not showing up properly in Tux Paint.
Maybe when it was the last letter in the word…?
I can’t find anything about a workaround in Tux Paint’s docs,
so my guess is: whatever the problem was back then, it was fixed in
SDL_ttf or FreeType.
Thanks!On Fri, Sep 25, 2009 at 7:51 AM, Gabriel Gambetta wrote:
I’m having problems with SDL_TTF and certain fonts - namely, that the bottom
part of some glyphs is cut. See font.jpg. This is a test app, but showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be fixed?
This is fixed for the next SDL_ttf release, thanks!On Fri, Sep 25, 2009 at 7:51 AM, Gabriel Gambetta wrote:
I’m having problems with SDL_TTF and certain fonts - namely, that the bottom
part of some glyphs is cut. See font.jpg. This is a test app, but showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be fixed?
–GabrielOn Sat, Sep 26, 2009 at 4:59 AM, Sam Lantinga wrote:
This is fixed for the next SDL_ttf release, thanks!
On Fri, Sep 25, 2009 at 7:51 AM, Gabriel Gambetta wrote:
I’m having problems with SDL_TTF and certain fonts - namely, that the
bottom
part of some glyphs is cut. See font.jpg. This is a test app, but
showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says
WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be
fixed?
You’re welcome! :)On Mon, Sep 28, 2009 at 12:37 PM, Gabriel Gambetta wrote:
That did it. Thanks a lot!
–Gabriel
On Sat, Sep 26, 2009 at 4:59 AM, Sam Lantinga <@slouken> wrote:
This is fixed for the next SDL_ttf release, thanks!
On Fri, Sep 25, 2009 at 7:51 AM, Gabriel Gambetta wrote:
I’m having problems with SDL_TTF and certain fonts - namely, that the
bottom
part of some glyphs is cut. See font.jpg. This is a test app, but
showfont
included in SDL_TTF does the same.
I opened the font with two different editors, FontForge and FontCreator.
FontForge shows a descent line that matches the place where the rendered
fonts are cut, while FontCreator shows a different one that says
WinDescent.
See the other two screenshots.
This font shows correctly in every other app that uses it, so my guess
is
that it’s a problem with SDL_TTF or FreeType. We can reproduce this in
Linux, Windows and Mac.
Does anyone know what’s going on, or more importantly, how can it be
fixed?