You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
567 B
28 lines
567 B
13 years ago
|
#ifndef FONTMANAGER_H
|
||
|
#define FONTMANAGER_H
|
||
|
|
||
|
#include "font.h"
|
||
|
|
||
|
class FontManager
|
||
|
{
|
||
|
public:
|
||
|
// Release fonts references, thus making possible to destruct them
|
||
|
void releaseFonts();
|
||
|
|
||
|
bool importFont(std::string fontFile);
|
||
|
|
||
|
bool fontExists(const std::string& fontName);
|
||
|
FontPtr getFont(const std::string& fontName);
|
||
|
FontPtr getDefaultFont();
|
||
|
|
||
|
void setDefaultFont(const std::string& fontName) { m_defaultFont = getFont(fontName); }
|
||
|
|
||
|
private:
|
||
|
std::vector<FontPtr> m_fonts;
|
||
|
FontPtr m_defaultFont;
|
||
|
};
|
||
|
|
||
|
extern FontManager g_fonts;
|
||
|
|
||
|
#endif
|