Page 1 of 1

image font problem?

Posted: Mon Dec 01, 2008 7:42 am
by boypink
Playing with fonts and created a two character image font. In my example between the "S" and "O" characters is an extra pixel of spacing where i dont expect any to be. I've attached my code.

Re: image font problem?

Posted: Mon Dec 01, 2008 7:53 am
by mike
This is due to the default spacing factor (which is 1). If you want no spacing between your characters, you should add the font using this line:

Code: Select all

font = love.graphics.newImageFont("font1.png", "so", 0)
I really should fix the documentation/tutorial that details how to use image fonts because even I had to experiment a bit.

Re: image font problem?

Posted: Mon Dec 01, 2008 8:41 pm
by boypink
Ah right, thanks mike. I did play with that but didn't happen to try 0 :P