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

Fonts


The fonts used for our UI are default NGUI bitmap fonts. With NGUI, it is possible to import any other custom font—in either bitmap or dynamic format. We'll see how we can do both using Font Maker and fonts from our Assets.zip file.

Within the .zip file, two new fonts were included and added to the Assets/Resources/Fonts folder. We'll use Gooddog as the dynamic font and Lato as the bitmap font. Let's start with dynamic fonts since they are easy to use.

Tip

If you need fonts, you can download them from www.fontsquirrel.com, www.google.com/fonts, or www.dafont.com.

Dynamic fonts

Dynamic fonts can be displayed at any size and remain crisp without pixelation. Since they are not contained in any atlas, using them in the scene adds at least one draw call.

They use the .ttf or .otf font source file—no manipulation is required: you simply have to add them to your Assets folder, and they will be automatically added to the font selection window for your labels. We'll use a dynamic font now.

Navigate...