Book Image

HTML5 Game Development by Example: Beginner's Guide

By : Seng Hin Mak
Book Image

HTML5 Game Development by Example: Beginner's Guide

By: Seng Hin Mak

Overview of this book

Table of Contents (18 chapters)
HTML5 Game Development by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Building a Physics Car Game with Box2D and Canvas
Index

Time for action – embedding a font from the Google Fonts directory


Google Fonts directory is a web font service that lists free-to-use web fonts. We will embed a web font chosen from the Google Fonts directory:

  1. Go to the Google Fonts directory site at http://google.com/fonts.

  2. In the font directory, there is a list of web fonts that are available under an open source license and can be used freely.

  3. Choose one of them and click on the font name to proceed to the next step. In this example, I used Droid Serif.

  4. After you click on a font, the font directory displays detailed information about the font. There are several actions that we can carry out here, such as preview the font, choose from variants, and most importantly, get the font embedding code.

  5. In MAC, click on the Get the code tab and you will see the following screenshot; this shows a guide on how to embed this font into our web page. Alternatively, in Windows, you can click on the Use tab and you will find instructions to get the code...