Baking effects into fonts using Hiero

Let's be completely honest: the standard fonts generated with Hiero are pretty boring, and the quality is not bad but they don't stand out. Certainly, these will do just great for bulk of text in an RPG-like conversation scene but will look slightly boring as menu headers. Typically, user interface designers add effects such as drop shadows or strokes to important pieces of text in order to make them stand out.

In this recipe, we will show you how to create a font texture with Hiero, with an outline and shadow effect, and add it to your game.

Getting ready

This time we will use the data/fonts/lobster.fnt file. Hiero is also needed; download the latest Libgdx package from http://libgdx.badlogicgames.com/releases ...

Get Libgdx Cross-platform Game Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.