image font problem?

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
boypink
Prole
Posts: 10
Joined: Sat Nov 15, 2008 5:40 am
Location: Canada

image font problem?

Post 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.
Attachments
font.love
(820 Bytes) Downloaded 152 times
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: image font problem?

Post 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.
Now posting IN STEREO (where available)
User avatar
boypink
Prole
Posts: 10
Joined: Sat Nov 15, 2008 5:40 am
Location: Canada

Re: image font problem?

Post by boypink »

Ah right, thanks mike. I did play with that but didn't happen to try 0 :P
Post Reply

Who is online

Users browsing this forum: No registered users and 94 guests