cFreetypeFont Class Reference

Inheritance diagram for cFreetypeFont:

Inheritance graph
[legend]
Collaboration diagram for cFreetypeFont:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cFreetypeFont (const char *Name, int CharHeight, int CharWidth=0)
virtual ~cFreetypeFont ()
virtual int Width (uint c) const
 Returns the width of the given character in pixel.
virtual int Width (const char *s) const
 Returns the width of the given string in pixel.
virtual int Height (void) const
 Returns the height of this font in pixel (all characters have the same height).
virtual void DrawText (cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const

Private Member Functions

int Bottom (void) const
int Kerning (cGlyph *Glyph, uint PrevSym) const
cGlyphGlyph (uint CharCode, bool AntiAliased=false) const

Private Attributes

int height
int bottom
FT_Library library
 Handle to library.
FT_Face face
 Handle to face object.
cList< cGlyphglyphCacheMonochrome
cList< cGlyphglyphCacheAntiAliased


Detailed Description

Definition at line 94 of file font.c.


Constructor & Destructor Documentation

cFreetypeFont::cFreetypeFont ( const char *  Name,
int  CharHeight,
int  CharWidth = 0 
)

Definition at line 114 of file font.c.

References bottom, esyslog, face, height, and library.

cFreetypeFont::~cFreetypeFont (  )  [virtual]

Definition at line 162 of file font.c.

References face, and library.


Member Function Documentation

int cFreetypeFont::Bottom ( void   )  const [inline, private]

Definition at line 102 of file font.c.

Referenced by DrawText().

int cFreetypeFont::Kerning ( cGlyph Glyph,
uint  PrevSym 
) const [private]

Definition at line 168 of file font.c.

References cGlyph::CharCode(), face, cGlyph::GetKerningCache(), KERNING_UNKNOWN, and cGlyph::SetKerningCache().

Referenced by DrawText(), and Width().

Here is the call graph for this function:

cGlyph * cFreetypeFont::Glyph ( uint  CharCode,
bool  AntiAliased = false 
) const [private]

Definition at line 185 of file font.c.

References cListBase::Add(), esyslog, face, cList< T >::First(), glyphCacheAntiAliased, glyphCacheMonochrome, cList< T >::Next(), and UNKNOWN_GLYPH_INDICATOR.

Referenced by DrawText(), and Width().

Here is the call graph for this function:

int cFreetypeFont::Width ( uint  c  )  const [virtual]

Returns the width of the given character in pixel.

Implements cFont.

Definition at line 227 of file font.c.

References cGlyph::AdvanceX(), cSetup::AntiAlias, Glyph(), and Setup.

Here is the call graph for this function:

int cFreetypeFont::Width ( const char *  s  )  const [virtual]

Returns the width of the given string in pixel.

Implements cFont.

Definition at line 233 of file font.c.

References cGlyph::AdvanceX(), cSetup::AntiAlias, Glyph(), Kerning(), Setup, Utf8CharGet(), and Utf8CharLen().

Here is the call graph for this function:

virtual int cFreetypeFont::Height ( void   )  const [inline, virtual]

Returns the height of this font in pixel (all characters have the same height).

Implements cFont.

Definition at line 110 of file font.c.

void cFreetypeFont::DrawText ( cBitmap Bitmap,
int  x,
int  y,
const char *  s,
tColor  ColorFg,
tColor  ColorBg,
int  Width 
) const [virtual]

Draws the given text into the Bitmap at position (x, y) with the given colors. The text will not exceed the given Width (if > 0), and will end with a complete character.

Implements cFont.

Definition at line 253 of file font.c.

References cGlyph::AdvanceX(), cSetup::AntiAlias, cGlyph::Bitmap(), cPalette::Blend(), Bottom(), cPalette::Bpp(), clrTransparent, cBitmap::GetColor(), Glyph(), height, cPalette::Index(), Kerning(), cGlyph::Left(), MAX_BLEND_LEVELS, cGlyph::Pitch(), cGlyph::Rows(), cBitmap::SetIndex(), Setup, cGlyph::Top(), Utf8CharGet(), Utf8CharLen(), cBitmap::Width(), and cGlyph::Width().

Here is the call graph for this function:


Member Data Documentation

int cFreetypeFont::height [private]

Definition at line 96 of file font.c.

Referenced by cFreetypeFont(), and DrawText().

int cFreetypeFont::bottom [private]

Definition at line 97 of file font.c.

Referenced by cFreetypeFont().

FT_Library cFreetypeFont::library [private]

Handle to library.

Definition at line 98 of file font.c.

Referenced by cFreetypeFont(), and ~cFreetypeFont().

FT_Face cFreetypeFont::face [private]

Handle to face object.

Definition at line 99 of file font.c.

Referenced by cFreetypeFont(), Glyph(), Kerning(), and ~cFreetypeFont().

Definition at line 100 of file font.c.

Referenced by Glyph().

Definition at line 101 of file font.c.

Referenced by Glyph().


The documentation for this class was generated from the following file:

Generated on Tue Nov 4 19:59:07 2008 for VDR by  doxygen 1.5.6