O'Reilly logo

Cocos2d-x Cookbook by Akihiro Matsuura

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

Chapter 3. Working with Labels

In this chapter, we're going to create labels. To display labels on the screen, you can use the Label class with system fonts, true type fonts, and bitmap fonts. The following topics will be covered in this chapter:

  • Creating system font labels
  • Creating true type font labels
  • Creating bitmap font labels
  • Creating rich text

Creating system font labels

Firstly, we will explain how to create a label with system fonts. System fonts are the fonts already installed on your devices. Since they are already installed, there is no need to go through the installation process. Therefore we will skip the installation instructions for system fonts in this recipe, and dive directly into creating labels.

How to do it...

Here's how to create ...

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