
This is a command line program that converts a simple custom bitmap font format to BMFont (loaded with love.graphics.newFont). There is also some basic support for rasterizing TrueType fonts.
Why does this exist?
LÖVE supports two bitmap font formats: BMFont, and its own format (ImageFont, loaded with love.graphics.newImageFont).
The ImageFont format is very simple but also very limited. The BMFont format has all the necessary features for rendering fonts nicely, but its files are very user-unfriendly to edit by hand. This program tries to simplify the creation of BMFont files using a font file format that's similar to ImageFont.
The ReFreezed Bitmap Font consists of two files: an image with all the glyphs separated by a border (similar to ImageFont, but with multiple rows) and a descriptor file (.rbmf) that specifies what glyphs are in the image (but not any coordinates, unlike BMFont).
Who is this for?
If you're making bitmap fonts in an image editing program but ImageFont is too limited in what it can do, this program could be what you're looking for. There are other programs that focus on rasterizing TrueType fonts into bitmaps - this program however is focusing more on converting a more user-friendly bitmap format to BMFont.
Download .exe or .love from GitHub
See the full README for more info and documentation. Also see the code repository.
Example
Code: Select all
$ RbmfConverter.exe fontSources/coolPixelFont.rbmf --outdir fonts

Input descriptor:
Code: Select all
version=1
[in]
colored=true
[out]
fileImage=<name>.png
fileDescriptor=<name>.fnt
outlineWidth=1
outlineColor=1 0 .7 .8
glyphPadding=1
custom.lineHeight=1.25
# ASCII characters
[1]
glyphs=ABCDEFGHIJKLMNOPQRSTUVWXYZ
[2]
glyphs=abcdefghijklmnopqrstuvwxyz
[3]
glyphs=0123456789
glyphs= !#$%&'()*+,-./:;<=>?@[\]^_`{|}~
# Gamepad icons
[4]
icons=hatu hatr hatd hatl
icons=axislu axislr axisld axisll axisru axisrr axisrd axisrl
icons=axisbtnl axisbtnr
[5]
icons=xboxa xboxb xboxx xboxy xboxlb xboxrb xboxlt xboxrt xboxback xboxstart
icons=pst psc psx pss psl1 psr1 psl2 psr2 psselect psstart
[kerning]
# Uppercase letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
# Small letters: acemnorsuvwxz
# Tall lowercase letters: bdfhiklt
# Low letters: gpqy
# Low+tall letters: j
# f
forward=f acdefgmnopqrsuvwxyz.,_ -1
# P
forward=P .,_ -1
# T
bothways=T acemnorsuvwxzgpqy.,_ -1
forward=Lbhkt T d -1
# Vv
bothways=Vv .,_ -1
# Other
forward=r a -1