2002-11-16 08:07:38 +00:00
|
|
|
#ifndef FONTMANAGER_H
|
|
|
|
|
#define FONTMANAGER_H
|
2002-03-30 20:00:13 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: FontManager
|
|
|
|
|
|
|
|
|
|
Desc: Manages Loading and Unloading of fonts.
|
|
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
2002-03-30 20:00:13 +00:00
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "Font.h"
|
|
|
|
|
|
2002-09-07 08:20:10 +00:00
|
|
|
#include <map>
|
2002-03-30 20:00:13 +00:00
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
// FontManager Class Declarations
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
class FontManager
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FontManager();
|
|
|
|
|
~FontManager();
|
|
|
|
|
|
2002-09-03 22:31:06 +00:00
|
|
|
Font* LoadFont( CString sFontOrTextureFilePath, CString sChars = "" );
|
2002-03-30 20:00:13 +00:00
|
|
|
bool IsFontLoaded( CString sFontPath );
|
|
|
|
|
void UnloadFont( CString sFontPath );
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// map from file name to a texture holder
|
2002-09-07 08:20:10 +00:00
|
|
|
std::map<CString, Font*> m_mapPathToFont;
|
2002-03-30 20:00:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern FontManager* FONT; // global and accessable from anywhere in our program
|
|
|
|
|
|
2002-11-16 08:07:38 +00:00
|
|
|
|
|
|
|
|
#endif
|