Work is going well on the line rendering library. Taking a short break to explore some other areas.
LibGDX has a handy freetype extension which allows you to render TTF files to a texture (bitmap font) on-the-fly. Typically each TTF file will be packed into its own atlas; for example, you might end up with one 256×256 atlas for 24 pt font, and another for 16 pt font. If you plan on including many different font sizes and styles (bold, italic, etc) in your game — especially useful for different resolutions — you’re leading to a lot of extra white space.
With a small tweak to LibGDX code, it’s possible to use PixmapPacker to tightly pack your fonts into a single atlas. This also allows you more control over padding and texture size. See an example here, which packs 1,410 glyphs into a 512×256 image. It uses three font styles (Regular, Bold, Italic) and 5 font sizes for each (12 pt – 16 pt), so a total of 15 fonts packed into a single texture atlas. This could then be saved to a file before final release, using only the characters necessary for your game and target language(s), thus making for a very fast load time and nicely scalable, styled text.
If I have time in the future I’d like to contribute a bit to scene2D UI and provide a Label that allows for markup (color, font, etc) to easily produce styled text:
Another cool way of storing multiple levels of text sizes would be to use mipmapping, where each successive mipmap level is uploaded manually (glTexImage2D). The glyphs would need to be packed in the same positions. You could then use nearest sampling when picking the mipmap levels, which would lead to ‘stepped’ scaling without artifacts, or you could use GL_LINEAR for trilinear filtering between mipmap levels. I will have to experiment with this idea a bit further.
For larger sizes, there is of course distance field rendering, but that doesn’t play so nicely with small fonts.
The code changes are pretty minimal. Here is a clone of FreeTypeFontGenerator that shows what is necessary. Next week I may send a pull request to LibGDX to have this feature added officially.