Export compatibility with love2d image fonts

i would like it if we could specify colors other than transparent for filler space when exporting to sprite sheets. this is to make it easier to produce images in the format that love2d uses for its image fonts, as described here: https://love2d.org/wiki/Tutorial:Fonts_and_Text#Creating_a_font_object_using_an_image

1 Like

Woudn’t you be able to fill the space in the sprites yourself? I don’t really know what file type you are talking about so wouldn’t be able to test or understand it completely but what are you looking for?

here is the use case:

love2d’s image font feature requires a chosen color as padding between each glyph, and also at the beginning and end of the entire spritesheet (specifically, whatever pixel is in the top left is taken to be the padding color)

so i have a pixel font laid out as a .aseprite file in the form of many frames, which makes it easy to design the font because i can see exactly how large each glyph needs to be. i want aseprite to glue those frames together, as it already knows how to do in general, but instead of always padding with transparent, pad with a chosen color, and also be able to prefix and suffix the whole spritesheet with a vertical line of that color

naturally this is doable by hand. but the larger the font becomes, the more tedious that task becomes. it’s possible a plugin could be written to do this, which i might look into if my search for a more specialized pixel font tool doesn’t turn out well

1 Like

I don’t know how much I can help with this problem, I also know pains of making pixel fonts. I want to make something unique but its kinda hard when I have to find the correct software. I wish you good luck. ^-^

i managed to come up with a reasonably workable solution to my problem. i decided to edit the font as a sprite sheet, manually adding the separators as i add more characters, and using custom grid settings to align the cells. the aligning was really the biggest issue and now that i’ve configured the grid to help it’s much easier

Yes, I wish there was a way for aseprite to export spritesheets with a pixel padding of color, instead of just mask. Especially with the Texture Atlas feature, as some engines/frameworks expect there to be pixel padding (like you mentioned with love2D, where it interprets this color as transparent).

I’m working on a small program that manages pixel fonts, and this sort of thing would be really useful!

Hi there, I think this could be easily done with a script, if you send me an example of the expected sprite sheet output I can prepare a script.

oops i forgot to follow up on this! i sent an email since i can’t upload a .aseprite file here

it turns out my use case exceeds the capabilities of love2d’s print function, so i will be writing my own logic that doesn’t require such a specialized export format. so no rush on my part at least

1 Like