41 if (!s_alAddonInitialized)
46 s_alAddonInitialized =
true;
49 bool isTTF = (path.find(
".ttf") != std::string::npos);
50 bool isPNG = (path.find(
".png") != std::string::npos);
53 m_pFont = al_load_ttf_font(path.c_str(), s_fontSize, 0);
57 int ranges[] = { 32, 126 };
59 if (s_ranges ==
nullptr)
68 m_pFont = al_grab_font_from_bitmap(pTexture->
GetAllegroBitmap(), s_rangeCount, s_ranges);
75 m_pFont = al_load_font(path.c_str(), s_fontSize, 0);
78 if (s_restoreSize > 0) s_fontSize = s_restoreSize;
80 return (m_pFont !=
nullptr);
Represents a 2D grid of texels.
virtual ALLEGRO_BITMAP * GetAllegroBitmap() const
Get the allegro bitmap representation of the texture.