Book Image

Learning NGUI for Unity

By : Charles Bernardoff (EURO)
Book Image

Learning NGUI for Unity

By: Charles Bernardoff (EURO)

Overview of this book

Table of Contents (17 chapters)
Learning NGUI for Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Multiple bitmap fonts


When using bitmap fonts, it is necessary to create fonts of different text sizes. Otherwise, we'll run into the following issue:

As you might notice from the preceding screenshot, the text is crisp for small text (1), but for a large title (3), it becomes aliased, blurry, and looks terrible. So, we need bigger fonts for larger text sizes. In this section, we'll create three different fonts of typical sizes.

The SmallLato font

Follow these steps to create the standard definition font used for small text. Open Font Maker by navigating to NGUI | Open | Font Maker.

Configure Font Maker as follows:

Perform the following steps:

  1. Make sure Type (1) is set to Generated Bitmap.

  2. Click on the Source button (2) of Font Maker:

    • If needed, click on the Show All button of the window to show all fonts

    • Select the Lato.ttf font

    Note

    After selecting the font, click anywhere in an empty area of the Font Maker window to refresh it and update the selection.

  3. Set Size (3) to 30.

  4. Set the Characters set to...