Page 1 of 1

linux bitmap font generator.

Posted: Mon Aug 01, 2016 8:12 am
by Pangit
Hi,

What I would like to do is make a number of different sized pixel fonts for use in love, but I am running into a problem finding a tool to create the pngs.

I know there are a few windows programs to do this, but I can't seem to find any to generate bitmap fonts for use in love for linux.

http://www.angelcode.com/products/bmfont/

So I was trying to find a program like this for linux. But it seems not to exist.

Will I need to do this in gimp? If so are there any pointers how best to create the file for use with love?

Re: linux bitmap font generator.

Posted: Mon Aug 01, 2016 8:28 am
by zorg
BMFont files would be a bit difficult to create with hand, but Löve supported and still supports a simpler imagefont type that's easier to create.

The [wiki]ImageFontFormat[/wiki] page on the wiki explains it well, though i'd add to it that you can create both mono or not monospaced fonts with that as well.

Also, i might be wrong on this one, but i think that having multiple rows is also allowed now... but i'd test that out first at the beginning, just to make sure, and to not have to reorder everything afterwards if i turn out to be wrong. :3

Re: linux bitmap font generator.

Posted: Mon Aug 01, 2016 9:14 am
by Pangit
Thanks will look into this. Its to try and get the Navi library working with different font sizes. the 8 pixel one is a bit small to see on the screen.

Re: linux bitmap font generator.

Posted: Tue Aug 02, 2016 10:27 am
by Pangit
So the way I got round this was using inkscape then gimp to trim the final png.

But what's weird is I get this strange error with one of the pixel fonts. It's like there are still parts of the yellow bars that get rendered. I don't know why.
pixelfont3.png
pixelfont3.png (36.07 KiB) Viewed 8281 times
See it worked with one pixel font where all the characters were pretty much the same size, but when I extended it to include uppercase and lowercase, and numerals ect it seems to have caused a problem.
ImageFont4.png
ImageFont4.png (15.17 KiB) Viewed 8278 times
See this one works,
ImageFont5.png
ImageFont5.png (63.89 KiB) Viewed 8278 times
Where as this one does not...

Re: linux bitmap font generator.

Posted: Tue Aug 02, 2016 11:13 am
by substitute541
Your yellows are bleeding all over the place. Make sure your image fonts are pixel perfect.

Re: linux bitmap font generator.

Posted: Tue Aug 02, 2016 11:29 am
by zorg
Another image:
bleed.png
bleed.png (32.86 KiB) Viewed 8265 times
You can see the artefacts for both the glyphs and the boxes as well.

Re: linux bitmap font generator.

Posted: Tue Aug 02, 2016 11:38 am
by Pangit
Cheers, will hit the zoom and fix it.

Lol - well that's significantly more tedious than I thought. Such a pity there are no linux tools to do this property. saving to png from inkscape is such a roll of the dice with pixel accurate stuff.

Re: linux bitmap font generator.

Posted: Wed Aug 10, 2016 6:03 am
by ivcore
Can't you use Gimp? I haven't worked much with Linux, but, as far as I know, Inkscape is a vector graphics editor, like Illustrator. It isn't as good as Photoshop (or Gimp, I think) to make/work with the pixel-accuracy of the pngs/bitmaps.