Keos::CFontManager Class Reference

Font manager. More...

#include <KeosFontManager.h>

Inheritance diagram for Keos::CFontManager:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void LoadFont (const String &strFontFile, const String &strFontName, int nQuality=16)
 Load a font.
void UnloadFonts ()
 Unload all the fonts.
void DrawString (const CGraphicString &String)
 Draw a string on the screen.
TVector2I GetStringPixelSize (const CGraphicString &String)
 Return the size of a graphic string in pixels.
size_t GetFontHeight (const String &strFontName)
 Return the height (pixels) of the font.

Friends

class CSingleton< CFontManager >

Classes

struct  Glyph
 Glyph structure.
struct  TFont
 Font structure.
struct  TVertex
 Structure of the vertices.

Detailed Description

Font manager.

Definition at line 35 of file KeosFontManager.h.


Member Function Documentation

void Keos::CFontManager::LoadFont ( const String strFontFile,
const String strFontName,
int  nQuality = 16 
)

Load a font.

Parameters:
strFontFile Name of the file with the font.
strFontName Name of the font.
nQuality Size of the font.

Definition at line 78 of file KeosFontManager.cpp.

References Keos::CImage::GetPixel(), Keos::CSingleton< T >::Instance(), LOADINGFAILED_EXCEPT, Keos::ILogger::Log(), Keos::PXF_A8L8, Keos::PXF_L8, Keos::CImage::SetPixel(), and Keos::TEX_NOMIPMAP.

void Keos::CFontManager::UnloadFonts (  ) 

Unload all the fonts.

Definition at line 248 of file KeosFontManager.cpp.

void Keos::CFontManager::DrawString ( const CGraphicString String  ) 

Draw a string on the screen.

Parameters:
String Graphic string to be displayed.

Definition at line 261 of file KeosFontManager.cpp.

References Keos::BLEND_INVSRCALPHA, Keos::BLEND_SRCALPHA, LOADINGFAILED_EXCEPT, Keos::LOCK_WRITEONLY, Keos::PT_TRIANGLELIST, Keos::RENDER_ALPHABLEND, Keos::RENDER_ZWRITE, Renderer, Keos::TXA_DIFFUSE, Keos::TXA_TEXTURE, Keos::TXO_ALPHA_MODULATE, and Keos::TXO_COLOR_MODULATE.

TVector2I Keos::CFontManager::GetStringPixelSize ( const CGraphicString String  ) 

Return the size of a graphic string in pixels.

Parameters:
String Graphic string.
Returns:
Size of the string in pixels.

Definition at line 365 of file KeosFontManager.cpp.

References int(), LOADINGFAILED_EXCEPT, Keos::CVector2< T >::x, and Keos::CVector2< T >::y.

size_t Keos::CFontManager::GetFontHeight ( const String strFontName  ) 

Return the height (pixels) of the font.

Definition at line 428 of file KeosFontManager.cpp.

References LOADINGFAILED_EXCEPT.


Friends And Related Function Documentation

friend class CSingleton< CFontManager > [friend]

Definition at line 37 of file KeosFontManager.h.


The documentation for this class was generated from the following files:
Generated on Fri Mar 9 14:29:24 2007 for Keos by  doxygen 1.5.1-p1