Skip to content
Ultimate Bitmap Font Generator
Branch: master
Clone or download
Latest commit ef7eb87 Dec 15, 2014
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add SDF test, improved algorithm Dec 15, 2014
tests Clean Dec 15, 2014
xsd Fixed a bug where if transparent was not selected, the resultant tex… Dec 10, 2014
ChangeLog.rus Improved SDF generation Mar 11, 2014
INSTALL First commit Sep 18, 2011
LICENSE License Sep 19, 2011 Update Jul 13, 2013
readme.png First commit Sep 18, 2011
readme.xcf First commit Sep 18, 2011
screenshot.png screenshot May 15, 2012

Ultimate Bitmap Font Generator

Ultimate bitmap font generator - useful tool to create compact font textures for games

If you know Russian - welcome:

Feature list:

  • multiple fonts may be packed into one texture
  • extremely effective packing algorithm + subcharacters merging
  • optimizied not only for English: generate Russian, Japanese, Chinese fonts
  • easy-to-create characters list from text
  • distance fields for easy OpenGL scalable fonts
  • exporting kerning pairs
  • free and open-source project

UBFG can export font into XML format (image in base64 format also stored in XML) or into it's own .fnt format, - ready to use with Cheetah 2D engine. XML format is self-described, .fnt format uses following spec.

UBFG generates two files: font.png and font.fnt.

  • font.png is an image, that represents your font texture. You must load it as texture.
  • font.fnt is a text file, that contains information about all chars on font.png.

This information looks like:

Arial 9pt -- font name and size
Char  X pos   Y pos   Width   Height   Xoffset  Yoffset  Orig W   Orig H
32    0       0       0       0        3        14       3        14
97    90      36      5       7        1        4        7        14
98    0       41      5       9        1        2        7        14
kerning pairs:
32 97 -1
32 98 -0.5


  • Char - UNICODE number of your char (codepage varies and may be specified before export). For example, 32 is a 'space'
  • X pos - x position of glyph on texture
  • Y pos - y position of glyph on texture
  • Width - width of glyph on texture (glyphs are cropped and Width and Orig Width aren't equal)
  • Height - height of glyph on texture
  • Xoffset - distance on the x-axis, on which glyph must be shifted
  • Yoffset - distance on the y-axis, on which glyph must be shifted
  • Orig W - original width of glyph
  • Orig H - original height of glyph

Also fnt format may have kerning pairs: a set of kerning pairs listed after phrase "kerning pairs:". First number if a first character in pair, second number - second character in pair, third number - kerning value. Note: this value may be with floating point if you use distance fields.

Help image



You can’t perform that action at this time.