vdr
2.2.0
|
Public Member Functions | |
cFreetypeFont (const char *Name, int CharHeight, int CharWidth=0) | |
virtual | ~cFreetypeFont () |
virtual const char * | FontName (void) const |
virtual int | Size (void) const |
virtual int | Width (uint c) const |
virtual int | Width (const char *s) const |
virtual int | Height (void) const |
virtual void | DrawText (cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const |
virtual void | DrawText (cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const |
![]() | |
virtual | ~cFont () |
int | Height (const char *s) const |
Private Member Functions | |
int | Bottom (void) const |
int | Kerning (cGlyph *Glyph, uint PrevSym) const |
cGlyph * | Glyph (uint CharCode, bool AntiAliased=false) const |
Private Attributes | |
cString | fontName |
int | size |
int | height |
int | bottom |
FT_Library | library |
FT_Face | face |
cList< cGlyph > | glyphCacheMonochrome |
cList< cGlyph > | glyphCacheAntiAliased |
Additional Inherited Members | |
![]() | |
static void | SetFont (eDvbFont Font, const char *Name, int CharHeight) |
static const cFont * | GetFont (eDvbFont Font) |
static cFont * | CreateFont (const char *Name, int CharHeight, int CharWidth=0) |
static bool | GetAvailableFontNames (cStringList *FontNames, bool Monospaced=false) |
static cString | GetFontFileName (const char *FontName) |
cFreetypeFont::cFreetypeFont | ( | const char * | Name, |
int | CharHeight, | ||
int | CharWidth = 0 |
||
) |
|
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 269 of file font.c.
References cGlyph::AdvanceX(), cSetup::AntiAlias, cGlyph::Bitmap(), cPalette::Blend(), cPalette::Bpp(), clrTransparent, cBitmap::GetColor(), cPalette::Index(), tKerning::kerning, cGlyph::Left(), MAX_BLEND_LEVELS, cGlyph::Pitch(), tKerning::prevSym, cGlyph::Rows(), cBitmap::SetIndex(), Setup, cGlyph::Top(), Utf8CharGet(), SI::Utf8CharLen(), cGlyph::Width(), and cBitmap::Width().
|
virtual |
Reimplemented from cFont.
Definition at line 333 of file font.c.
References cGlyph::AdvanceX(), AlphaBlend(), cSetup::AntiAlias, cGlyph::Bitmap(), cPixmap::DrawPixel(), cPixmap::DrawPort(), tKerning::kerning, cGlyph::Left(), cGlyph::Pitch(), tKerning::prevSym, cGlyph::Rows(), Setup, cGlyph::Top(), Utf8CharGet(), SI::Utf8CharLen(), cGlyph::Width(), and cRect::Width().
|
inlinevirtual |
|
private |
Definition at line 197 of file font.c.
References cListBase::Add(), esyslog, cList< T >::First(), cList< T >::Next(), and UNKNOWN_GLYPH_INDICATOR.
|
inlinevirtual |
|
private |
Definition at line 180 of file font.c.
References cGlyph::CharCode(), cGlyph::GetKerningCache(), tKerning::kerning, KERNING_UNKNOWN, and cGlyph::SetKerningCache().
|
inlinevirtual |
|
virtual |
Returns the width of the given character in pixel.
Implements cFont.
Definition at line 239 of file font.c.
References cGlyph::AdvanceX(), cSetup::AntiAlias, and Setup.
|
virtual |
Returns the width of the given string in pixel.
Implements cFont.
Definition at line 245 of file font.c.
References cGlyph::AdvanceX(), cSetup::AntiAlias, tKerning::prevSym, Setup, Utf8CharGet(), and SI::Utf8CharLen().