23 virtual ~
Font() { al_destroy_font(m_pFont); }
29 static void SetLoadSize(
const int size,
const bool restore =
false);
45 virtual int GetLineHeight()
const {
return al_get_font_line_height(m_pFont); }
50 virtual int GetTextWidth(
const char *text)
const {
return al_get_text_width(m_pFont, text); }
64 static int s_fontSize;
65 static int s_restoreSize;
67 static bool s_alAddonInitialized;
69 static int s_rangeCount;
72 ALLEGRO_FONT *m_pFont;
static void SetLoadSize(const int size, const bool restore=false)
Specifies the size of the font when loaded.
Definition: Font.cpp:23
virtual int GetTextWidth(const char *text) const
Gets the width in pixels of the specified string.
Definition: Font.h:50
Represents a font or true-type font.
Definition: Font.h:17
static void SetCharacterRange(const int rangeCount, int ranges[])
Sets which characters to use when using a bitmap as a font.
Definition: Font.cpp:30
Base class for all resource types to be managed by the ResourceManager class.
Definition: Resource.h:19
virtual int GetLineHeight() const
Gets the line height of the font in pixels.
Definition: Font.h:45
virtual bool IsCloneable() const
Used to determine if the font is cloneable.
Definition: Font.h:55
virtual ALLEGRO_FONT * GetAllegroFont() const
Get the allegro font representation of the texture.
Definition: Font.h:59
Loads and manages the lifespan of objects from external files.
Definition: ResourceManager.h:17
virtual bool Load(const std::string &path, ResourceManager *pManager)
Load the desired font into memory.
Definition: Font.cpp:36
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition: Animation.cpp:14