Learning Android Game Programming: A Hands-On Guide to Building Your First Android Game
by Richard A. Rogers
7. Text
We used text when we were creating the text menus in Chapter 3. In this chapter, however, we look at the ways text is used in AndEngine in more detail. We examine fonts, we look at the game elements that use text, and we learn how to create and use our own unique fonts with AndEngine.
Fonts and Typefaces
The terms “font” and “typeface” are sometimes used interchangeably, but they have distinct meanings. A typeface is something like Arial or Droid Sans, each of which defines a set of characters that map to the character codes for ASCII and Unicode. A font combines a typeface with a size (e.g., 16 points, where a point is 1/72nd of 1 inch) and a style (e.g., bold or italic).
Three basic methods can be used to generate the physical representation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access