#ifndef BLUECORE_FONT_MANAGER_H #define BLUECORE_FONT_MANAGER_H // system includes #include #include // project includes #include "Utilities/Referenced.h" #include "RenderDevice.h" // forward declaratins class FTFont; namespace BlueCore { class Font : public Referenced { FTFont *_Font; unsigned char *_Buffer; ref_ptr _Device; protected: ~Font(); public: Font(FTFont *font, unsigned char *buffer, RenderDevice *device); Font(); void destroy(); void print(float x, float y, const std::string &text, int halign = 0, int valign = 0) const; }; class FontManager : public Referenced, public sigslot::has_slots<> { private: typedef std::map > FontMap; FontMap _fonts; ref_ptr _DefaultFont; void FontDestroyedSlot(Referenced*); void DeviceShutdownSlot(); void destroy(); public: FontManager(RenderDevice* device); ~FontManager(); Font *loadFont(const std::string &name, int size, bool hinting = true); Font *getDefaultFont(); private: ref_ptr _Device; }; } // namespace BlueCore #endif // BLUECORE_FONT_MANAGER_H