I didn't get so much spacing the last time I used one, could you upload the image so we can see if there's something wrong in it? If I recall well, Imagefonts have a default spacing of 1 which gets added to the actual space between the glyphs inside the image (except for the separator coloumn, which is not considered)
EDIT: Now that I read my post again, I could have said that the separator coloumn IS considered and there's no added spacing... Nevermind, it's about the same, isn't it?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Nixola wrote:I didn't get so much spacing the last time I used one, could you upload the image so we can see if there's something wrong in it? If I recall well, Imagefonts have a default spacing of 1 which gets added to the actual space between the glyphs inside the image (except for the separator coloumn, which is not considered)
EDIT: Now that I read my post again, I could have said that the separator coloumn IS considered and there's no added spacing... Nevermind, it's about the same, isn't it?
The yellow coloumns should be only 1px wide, otherwise you get increased spacing (Actually I'd have said it would have just messed up something, but it doesn't seem like it's that)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Nixola wrote:The yellow coloumns should be only 1px wide, otherwise you get increased spacing (Actually I'd have said it would have just messed up something, but it doesn't seem like it's that)
Ah! Alright! I'll try to change it and will try again. Thanks a lot!
Is it possible to remove the spaces in between characters completely? I'm trying to use pixel fonts to make health bars but the spaces makes it look wrong.
The problem is that image fonts don't have letter spacing at all. Let alone negative spacing. I wish they did though. It'd be so useful. Especially to replicate a lot of fonts from the SNES era which had black borders that overlapped. The way it is now you'd have to write your own text display system or a shader to add the border which is overkill. Has anyone suggested it to the Issue Tracker yet? Seems like it'd be easy to implement unless the text display library Löve uses has a limitation.
And in reply to xaa3 above, why not just use images or rectangles?
In LÖVE 0.10.0, the special coloured spacing pixels in ImageFonts will be ignored completely for character spacing calculations.
Using a font isn't an optimal way to create a health bar either way though, you could just use two overlaid rectangles or images as Jasoco says.