Hiero - Bitmap Font Tool

Since there doesn’t seem to be a cross platform equivilent to BMFont (if some one can show me one, it’d save me some work), I’m putting one together.

It’s not far along yet, it can generate font textures as you’d expect but doesn’t do much else:

http://slick.cokeandcode.com/demos/hiero.jnlp

I need to get Linux/Mac testing going to try and work out how to find the fonts on the system (note I can’t use just Java font detection since I need the file to load approprite kerning information from the TTF).

For the webstartly challenged: http://slick.cokeandcode.com/downloads/hiero.zip

An old screenshot:

http://slick.cokeandcode.com/images/hiero.png

Any testing appreciated, though it’s a bit early for anything other than it works or it doesn’t :slight_smile:

Kev

Works with OSX 10.4 Intel after adding a font directory manually.

OSX stores fonts in /Library/Fonts and /System/library/Fonts and “user.home”/Library/Fonts. Unfortunatly most fonts are not ttf fonts, so I only have 3 fonts in the list. But wth those 3 fonts (Apple Symbols, Euphemia UCAS and Plantagenet Cherokee) its working.

There are more ttf files in those directorys, but they don’t get loaded. The log says: Unable to process: /System/Library/Fonts/.ttf

There are some more font directories on osx: /usr/X11R6/lib/X11/fonts/TTF/ if X11 is installed, which is not installed by default. And “java.home”/lib/fonts for the java fonts. All those fonts load without errors.

I do get a “Exception in thread “AWT-EventQueue-0” java.lang.OutOfMemoryError: Java heap space” if I add to much font directorys in one session, though.

cool i’ve thought before of coding this myself for generating font textures for games, but I never found the time!
Quick question: is the demo you put up meant to only show a jumbled assortment of numbers and letters?

Picking the Arial font (on windows XP) shows only a selection of letters and symbols, not the usual 0-9, A-Z, etc:

()@{|}$[]jQ#%&/CGOS\035689?J
Ubdfgpqty!1247ABDEFHIKLMNP
RTVWXYZhikl; aceosu:<>mnrv
wxz+^*="’`~-._

I got the MacOS X thing fixed.

The letters shown are sometimes referred to as the NeHe character set - because a NeHe tutorial uses them - most common characters. However, the character set can be changed on the pull down to the right, and should soon support custom configuration (maybe based on Unicode).

The order the of letters is sort of random in that the characters are arranged to fit the quads on to the texture in best way it can (at the moment only using horizontal slices which seems to be pretty reasonable).

Still working on this stuff tho :slight_smile:

Kev

Seems the tool now finds fonts on osx, unfortunatly I get a OutOfMemoryError now on load. It happens after loading some fonts. Maybe I have too much fonts on my system?

Yeah, I should probably either:

a) Up the the stack size
b) Only load fonts on use - would slow everything down

Probably go for a - memory’s cheap :slight_smile:

EDIT: Or maybe not, seems like theres a 128m heap already allowed - either Mac OSX doesn’t obey the webstart heap setting or I need to take a look at how much data is being loaded! :slight_smile:

Kev

New version is up:

  • Hopefully cleared the memory up
  • Added custom character sets
  • Added pluggable effects

New screenies:

http://slick.cokeandcode.com/images/hiero2_in.png

http://slick.cokeandcode.com/images/hiero2_out.png

Bear in mind my extreme lack of artistic ability

Kev

Cool program, worked here on windows XP no troubles, I even managed to find and load some fonts in C:/WINDOWS/Fonts. Colouring is neat and easy.

But can you spell out how to use the fonts/bitmaps? Once I save them, then what?

Cheers,
Keith

grab http://slick.cokeandcode.com :slight_smile:

The tool is developed as part of slick but it attempts to output the text file format of the AngelCode font tool. Essentially the tool only exists because AngelCode isn’t cross platform - so I’ve just tried to use the same format so existing font code should work. I’ve always been happy with the angel code tool but linux/mac users don’t get the option :confused:

I’ll probably be adding at some point in the future

  • XML AngelCode font code
  • Saving/Loading font configuration (font face, size, effects, charset etc)
  • Documentation on how you plug in effects

But right now I really want to get on with my game :slight_smile:

Kev

EDIT: But yes, the render above is from the AngelCode loader in Slick

BlurShadowEffect

http://kaioa.com/k/hierobs2.png

http://kaioa.com/k/hierobs3.png

http://kaioa.com/k/bseffect.jar (goes into /.hiro/)

edit:
but i forgot to clear the images
meep
so it wont work correctly on mac/linux right now

Will be fixed soonish :f

edit2:
done :slight_smile:

edit3:
another image added