12 Answers
12

Font Builder does almost everything I need. Both Font Studio and Angel Code's BMFont and perform similar tasks. Here are some of Font Builders features.

A QT app, and so works equally well on all platforms.

Open source so it can easily extend the app if needed

Designed to allow custom image and description(layout) exporters, making it even easier to extend

Loads fonts from the filesystem instead of windows registry. This makes it a ton easier to generate texture fonts from my own TTFs.

Auto sizes the final image so I don't need to guess( like in FontStudio). Further, these textures can be constrained to be power of 2 sizes.

Kerning pairs are supported, so that info can be exported if your TTF uses them.

It's not all perfect however. The default layout plugins suck. The Box layout tool just fills the texture from top left to bottom right using the characters alphabetically. Not very efficient. I changed it to sort the characters by height first and quickly improved its efficiency (a 2 line change).

BmFont does the job, it had good options and i can use texture more than 128x128 size, Thanks Only thing needed was right export setting like png texture and 32-bit font type
–
DiljeetFeb 19 '14 at 6:26

There are many complicated and feature-rich tools out there but my favorite tool for building bitmap fonts is Codehead's Bitmap Font Generator (CBFG). It's a simple tool which does one thing very well. It's clearly documented with tips for implementation.

Like most bitmap font creators, it is of course graphics API independent because it simply exports an image (and an easy to read data structure). However, implementing your own text-rendering system, in OpenGL or Direct3D, is not too difficult--render a quad for each letter and apply the bitmap font texture with appropriate coordinates.

The last time I was looking for this (for an iPhone game), I tried various options but couldn't find one that did everything I wanted. I needed to render a single texture using very small characters from a commercial TTF font. I needed to be able to specify character ranges so it would only contain the characters I needed. I wanted it to pack the glyphs as tightly as it could. I needed texture coordinates at runtime. I didn't care about "real" kerning, but I needed glyph measurements at runtime so it would be spaced sensibly. So I wrote a small Windows app that rendered all the characters and saved out the ABC spacings (as reported by Windows) along with texture coordinates.

BTW, if you want to render very small text (like less than 16 pixels high) under XP or Vista, you will run into shortcomings with Windows' anti-aliasing. An easy fix for me was to use http://drwatson.nobody.jp/gdi++/index-en.html to get transparent supersampling. If I were starting over, I'd probably take the same approach but look at FreeType2 instead of native text rendering.

If your text isn't updated often, you could just use the platform's text rendering (or maybe FreeType) to render whole chunks to texture as needed at runtime. Then you just need to render a single quad for each string, but the texture allocation gets more complicated. On the upside, though, you get flawless text rendering and layout for free on those difficult Asian languages along with your significantly faster GL code. Rendering lots of individual characters is expensive, even with degenerate tri strips or whatnot.

FreeType is more of a "font-rasterization-library". It isn't exactly an application that creates textures (with power of 2) from fonts. FreeType would be a good choice if you decided to write such a tool yourself though.
–
bummzackAug 14 '10 at 8:14

If you want an interactive tool you may want to take a look at FontForge, which is a full font editor that supports a variety of tools for converting TTF fonts into bitmap formats. It supports various types of scripting, so you should be able to integrate it into a pipeline as well.

AFAIK FontForge can create Bitmap-Fonts, but these are fundamentally different from what the OP needs. A Bitmap-Font is like a font file but contains bitmaps (preferably in various sizes) for each character. He needs a font to be rendered to a texture, so the result won't be a bitmap-font but an image.
–
bummzackAug 14 '10 at 8:02