wGui::CFontEngine Class Reference

#include <wg_fontengine.h>

Public Member Functions

Protected Attributes

Static Protected Attributes


Detailed Description

The CFont class is wGui's interface to FreeType2 and is used to render strings This is used by the CRenderedString class, and shouldn't need to ever be called directly
See also:
CRenderedString

Definition at line 43 of file wg_fontengine.h.


Constructor & Destructor Documentation

wGui::CFontEngine::CFontEngine ( const std::wstring &  sFontFileName,
unsigned char  FontSize 
)

Construct a new CFont object, using the specified font For most cases, there is no need to directly instantiate a CFontEngine object. CApplication provides a GetFontEngine() method which should be used

Parameters:
sFontFileName The file that contains a file
FontSize The size of the font (in points)

Definition at line 38 of file wg_fontengine.cpp.

References wGui::APP_LOG_INFO, wGui::CApplication::GetApplicationLog(), wGui::CApplication::Instance(), stdex::itoa(), m_bFTLibraryLoaded, m_FontFace, m_FTLibrary, and stdex::ToMbString().


Member Function Documentation

FT_BitmapGlyphRec * wGui::CFontEngine::RenderGlyph ( wchar_t  Char  ) 

Renders the specified character

Parameters:
Char The character to render
Returns:
A pointer to a FreeType glyph

Definition at line 67 of file wg_fontengine.cpp.

References m_CachedGlyphMap, and m_FontFace.

Referenced by wGui::CRenderedString::Draw().

FT_Glyph_Metrics * wGui::CFontEngine::GetMetrics ( wchar_t  Char  ) 

Returns the metrics for a specified character

Parameters:
Char The character to render
Returns:
A pointer to a FreeType metrics structure

Definition at line 90 of file wg_fontengine.cpp.

References m_CachedMetricsMap, and m_FontFace.

Referenced by wGui::CRenderedString::GetMaxFontHeight(), wGui::CRenderedString::GetMaxFontWidth(), and wGui::CRenderedString::GetMetrics().


The documentation for this class was generated from the following files:
Generated on Wed May 16 23:11:27 2007 for wGui by  doxygen 1.5.1