O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required