asmodehn / sdlut

SDL utility toolkit - A C++ wrapper arount SDL 1.2
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Font render bug #9

Open asmodehn opened 10 years ago

asmodehn commented 10 years ago

When trying to create an RGBSurface * using the Font::render() method with an empty string ("") it will crash on run on BaseSurface::getHeight(). Render a " " solve the pb when i want to display nothing but the bug is still there.

asmodehn commented 10 years ago

The rendering has been changed and is now working either with SDL_TTF or without. This bug should have been impacted at the same time. It apprently has been fixed as Font::render("",...) renders nothing, which is the expected behavior.

asmodehn commented 10 years ago

Not working ^^ Only works when using the default font and not an external one which, i suppose use the FontExtend class. Try using the echelon.ttf font inside the testFont with an empty HelpMsg and see for yourself. Also i had added a workaround l:81 in this test to avoid crashing on newline (aka empty line), u will be able to remove it when this bug will be really fixed ;)

asmodehn commented 10 years ago

A s a side note : http://www.angelcode.com/products/bmfont/