ulrichard / ftgl

fork from http://sourceforge.net/projects/ftgl
Other
56 stars 44 forks source link

Fix for incorrect handling of empty lines in FTSimpleLayout #1

Closed corngood closed 10 years ago

corngood commented 10 years ago

FTSimpleLayout doesn't handle consecutive \n properly. Rendering the string "foo\n\nfoo\nfoo" will result in:

foo ?foo?foo foo foo

The problem seems to be breakCharCount being -1 in this case, and OutputWrapped treats len < 0 as a request to render the rest of the string.

corngood commented 10 years ago

Here's another commit with some AC fixes I needed to build on Ubuntu 14.04. Without these it was missing -lGL for all demos and -lm for c_demo.

ulrichard commented 10 years ago

Hi David, sorry for the delay. No Idea how I could not notice the pull request. How do you use ftgl? Your change might be relevant also to the original project at http://sourceforge.net/projects/ftgl/. I forked it here just to add the stuff I needed for WebGL. But I didn't work with it for quite some time.

corngood commented 10 years ago

I just use it for a hobby project (a simple game using haskell/sdl/gl.)

There's actually an outstanding patch on sourceforce that addresses this, but it doesn't seem to be actively maintained. I originally cloned yours because it seemed more active.

I've also put reported the bug on Ubuntu Launchpad, since their binary package is where I originally found it.

Cheers