rag
graphic 2d engine
Classes | Public Member Functions | List of all members
rag::BMPFont Class Reference

Font system based on bitmap fonts. More...

#include <BMPFont.h>

Inheritance diagram for rag::BMPFont:
rag::ITextFont

Public Member Functions

 BMPFont (const std::string &path, const std::string &name)
 
virtual int getWidth (const std::string &text)
 Returns the width of a text.
 
virtual void print (const std::string &text, const glm::mat4 &matrix)
 Renders text. Asumes ortho projection 1:1.
 
- Public Member Functions inherited from rag::ITextFont
virtual void setLetterSpacing (float value)
 
virtual void reloadTexture ()
 Sets the extra space between characters.
 

Detailed Description

Font system based on bitmap fonts.

This kind of fonts assumes the output generated with the AngelCode tool that can be found here: http://www.angelcode.com/products/bmfont/

Constructor & Destructor Documentation

BMPFont::BMPFont ( const std::string &  path,
const std::string &  name 
)
Parameters
pathThe path where the font descriptor file is. i.e., "assets/"
nameThe font descriptor file name. It is assumed that font descriptor and font texture are in the same folder.

The documentation for this class was generated from the following files: