Text strings aren't displaying properly.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Sslaxx
Citizen
Posts: 57
Joined: Sat Feb 14, 2009 8:54 pm
Location: Malvern, Worcs, UK
Contact:

Text strings aren't displaying properly.

Post by Sslaxx »

Ubuntu Linux 8.10. Also confirmed under Win2K (via VirtualBox).

http://sslaxx.twu.net/EggTester.love

When I knocked up this little test, I noticed that the first word (for it does appear to be that) does not show up when running. The screenshot shows best what is happening. This appears to happen with any (truetype) font used.
Attachments
Demonstrating the problem... it's supposed to say "PRESS ENTER"...
Demonstrating the problem... it's supposed to say "PRESS ENTER"...
TextFailure.png (21.56 KiB) Viewed 1926 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Text strings aren't displaying properly.

Post by bartbes »

Found your problem:
In inc/Camera.lua on line 190 you have:

Code: Select all

return s:gmatch (" ([^\r\n]*)\r*\n\r*")
it should be:

Code: Select all

return s:gmatch ("([^\r\n]*)\r*\n\r*")
(difference is the space)
Because of the space in the pattern it required spaces to be in front of the text, if you fix this it will work as normal.
User avatar
Sslaxx
Citizen
Posts: 57
Joined: Sat Feb 14, 2009 8:54 pm
Location: Malvern, Worcs, UK
Contact:

Re: Text strings aren't displaying properly.

Post by Sslaxx »

Much obliged! I'd narrowed it down to a probable bug with the Camera extension, but I didn't know what it was. Thanks for that one!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Text strings aren't displaying properly.

Post by bartbes »

When I looked at the source of camera itself, the space isn't in there. So it might be you accidentally added it yourself.
User avatar
Sslaxx
Citizen
Posts: 57
Joined: Sat Feb 14, 2009 8:54 pm
Location: Malvern, Worcs, UK
Contact:

Re: Text strings aren't displaying properly.

Post by Sslaxx »

Quite possibly. Still, as long as it works!
Post Reply

Who is online

Users browsing this forum: pericles and 8 guests