Hi,
I was wondering if it would be possible to get a bit less letter spacing when using newImageFont ?
Thanks!
newImageFont, letter spacing
Re: newImageFont, letter spacing
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?
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
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: newImageFont, letter spacing
Haha, Here's the bitmap font file: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?
download/file.php?mode=view&id=22824
Maybe it's the spacing IN that file?
Thanks!
Re: newImageFont, letter spacing
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
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: newImageFont, letter spacing
Ah! Alright! I'll try to change it and will try again. Thanks a lot!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)
Re: newImageFont, letter spacing
You're welcome
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: newImageFont, letter spacing
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.
Posted a pic of what I'm going for.
Posted a pic of what I'm going for.
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: newImageFont, letter spacing
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?
And in reply to xaa3 above, why not just use images or rectangles?
- slime
- Solid Snayke
- Posts: 3132
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: newImageFont, letter spacing
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.
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.
- Jasoco
- Inner party member
- Posts: 3725
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: newImageFont, letter spacing
But will we be able to set the letter spacing on image fonts in 0.10.0? And also, why 0.10.0 and not 0.9.3 too? Isn't 0.10.0 really really far off?
Who is online
Users browsing this forum: Google [Bot] and 252 guests