rag
graphic 2d engine
ITextFont.h
1 #ifndef rmm_ITextFont_h
2 #define rmm_ITextFont_h
3 
4 #include <string>
5 #include <glm/glm.hpp>
6 
7 namespace rag
8 {
10  class ITextFont
11  {
12  public:
13 
14  virtual ~ITextFont(){};
15 
16  virtual int getWidth(const std::string& text) = 0;
17  virtual void print(const std::string& text, const glm::mat4& matrix) = 0;
18 
19  virtual void setLetterSpacing(float value) {};
20  virtual void reloadTexture() {};
21 
22  };
23 }
24 
25 #endif
Definition: Bitmap.h:8
Interface for text fonts.
Definition: ITextFont.h:10
virtual void print(const std::string &text, const glm::mat4 &matrix)=0
Renders text. Asumes ortho projection 1:1 screen pixel.
virtual void reloadTexture()
Sets the extra space between characters.
Definition: ITextFont.h:20
virtual int getWidth(const std::string &text)=0
Returns the width of a text.