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

Implementation of ITextFint based on TrueType or OpenType Fonts. More...

#include <TTFFont.h>

Inheritance diagram for rag::TTFFont:
rag::ITextFont

Public Member Functions

 TTFFont (const std::string &path, float pixelHeight=24)
 Constructs a TTFFont using a path and a text size.
 
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 screen pixel.
 
virtual void setLetterSpacing (float value)
 Sets the extra space between characters.
 
virtual void reloadTexture ()
 On context loss, reload textures. ITextFont should inherit Resource. Reload should be part of resource.
 

Static Public Member Functions

static void addFontAlias (const std::string &alias, const std::string &fontPath)
 Allows to use a different name (or an 'alias') to refer to a font.
 

Detailed Description

Implementation of ITextFint based on TrueType or OpenType Fonts.


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