libgdx/libgdx — pull request #480 by mattdesl (2013-06-19 21:11:31+00:00)
Title: Overloading FreeTypeFontGenerator.generateData to support custom PixmapPacker

This allows users to pack many glyphs into a single Texture with FreeTypeFontGenerator. The included test example (FreeTypePackTest) packs 2 font styles (regular, italic) each with 5 sizes into a single 1024x512 texture (total of 2,230 glyphs).

NOTES:
- In the future it might be useful to wrap the example into a reusable class, e.g. "FontManager" which handles multiple fonts by style (i.e. font file) and size.

- Be mindful that each glyph is packed with a name built from pathNameWithoutExtension and size -- if you try to pack a glyph whose alias already exists in the PixmapPacker, you'll get a runtime exception

- Idea for future: include BMFont writer for faster subsequent boot times