newImageFont, letter spacing

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
slime
Solid Snayke
Posts: 3172
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: newImageFont, letter spacing

Post by slime »

Jasoco wrote: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?
You can add transparent pixels to the sides of each glyph in the image to add more spacing. I don't think there are plans to add more features to ImageFonts. In LÖVE 0.10.0 you can also load BMFont (angelcode font format) files, which are a much more standardized bitmap font type. They support all kinds of features that ImageFonts don't, and there are tons of tools on the internet to create and load them.

There probably won't be a LÖVE 0.9.3, but even if there were, the spacer pixel change would break how existing ImageFonts that were created for previous 0.9.x releases are rendered, so the change will happen in 0.10.0 instead.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: newImageFont, letter spacing

Post by Jasoco »

I don't want more spacing.

I want less spacing.

I want negative spacing.

I want letters to be able to overlap. (So you can add a black border to the characters, set a negative spacing, and have the black border overlap so it looks like the border is being added to the entire string of words and not just the letters one at a time.)

Basically:
Image

Top you see the result you want to have. But can't achieve it right now without writing your own font display system.

Bottom is how the font looks in the image file (sans separators) and the best result Löve will allow you to have right now.

With negative spacing for image fonts, the top would be possible. Right now it is not.
User avatar
slime
Solid Snayke
Posts: 3172
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: newImageFont, letter spacing

Post by slime »

I believe the aforementioned BMFont format (supported in LÖVE 0.10.0+) can do that.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests