src/Graphics/FontManager.hh
branchnew_graphics
changeset 411 106aaf6eadfe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Graphics/FontManager.hh	Wed Jan 21 03:33:35 2009 +0200
@@ -0,0 +1,43 @@
+#ifndef GRAPHICS_FONT_MANAGER_HH
+#define GRAPHICS_FONT_MANAGER_HH
+
+#include <ClanLib/display.h>
+
+namespace graphics
+{
+
+/**
+ * Loads fonts and lets other components use them
+ */
+class FontManager {
+private:
+    /**
+     * Our resource manager for loading these
+     */
+    CL_ResourceManager &resources;
+
+    /**
+     * A basic monospace font
+     */
+    CL_Font simple_font;
+
+public:
+    /**
+     * Load fonts
+     */
+    FontManager (CL_ResourceManager &resources) :
+        resources(resources), simple_font("Font2", &resources)
+    {
+
+    }
+
+    /**
+     * Returns a CL_Font that can be used for drawing text
+     */
+    CL_Font& getSimpleFont (void) { return simple_font; }
+};
+
+
+}
+
+#endif