Loading and Rendering a Font

You could load a bitmapped font into a Sprite object and render it by treating each character as a frame in the font “animation” sheet. In fact, this is exactly what we will do. But there is too much configuration and custom code to be duplicated that way. Instead, a new subclass of Sprite will do nicely. The new class will be called Font and will inherit its basic functionality from Sprite and add some of its own new features.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset