vdr 2.7.2
|
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 (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 | width |
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 |
|
inlineprivate |
|
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 273 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(), Width(), and cGlyph::Width().
|
virtual |
Reimplemented from cFont.
Definition at line 337 of file font.c.
References cGlyph::AdvanceX(), AlphaBlend(), cSetup::AntiAlias, cGlyph::Bitmap(), Bottom(), cPixmap::DrawPixel(), cPixmap::DrawPort(), Glyph(), height, Kerning(), cGlyph::Left(), cGlyph::Pitch(), cGlyph::Rows(), Setup, cGlyph::Top(), Utf8CharGet(), Utf8CharLen(), Width(), cGlyph::Width(), and cRect::Width().
|
inlinevirtual |
|
private |
Definition at line 201 of file font.c.
References cListBase::Add(), esyslog, face, cList< T >::First(), Glyph(), glyphCacheAntiAliased, glyphCacheMonochrome, cList< T >::Next(), and UNKNOWN_GLYPH_INDICATOR.
Referenced by DrawText(), DrawText(), Glyph(), Kerning(), Width(), and Width().
|
inlinevirtual |
|
private |
Definition at line 184 of file font.c.
References cGlyph::CharCode(), face, cGlyph::GetKerningCache(), Glyph(), KERNING_UNKNOWN, and cGlyph::SetKerningCache().
Referenced by DrawText(), DrawText(), and Width().
|
inlinevirtual |
|
virtual |
Returns the width of the given string in pixel.
Implements cFont.
Definition at line 249 of file font.c.
References cGlyph::AdvanceX(), cSetup::AntiAlias, Glyph(), Kerning(), Setup, Utf8CharGet(), and Utf8CharLen().
|
virtual |
Returns the width of the given character in pixel.
Implements cFont.
Definition at line 243 of file font.c.
References cGlyph::AdvanceX(), cSetup::AntiAlias, Glyph(), and Setup.
|
inlinevirtual |
Returns the original character width as requested when the font was created, or 0 if the default width is used.
Implements cFont.
Definition at line 119 of file font.c.
References width.
Referenced by DrawText(), and DrawText().
|
private |
Definition at line 106 of file font.c.
Referenced by Bottom(), and cFreetypeFont().
|
private |
Handle to face object.
Definition at line 108 of file font.c.
Referenced by cFreetypeFont(), Glyph(), Kerning(), and ~cFreetypeFont().
|
private |
Definition at line 102 of file font.c.
Referenced by cFreetypeFont(), and FontName().
|
private |
Definition at line 105 of file font.c.
Referenced by cFreetypeFont(), DrawText(), DrawText(), and Height().
|
private |
Handle to library.
Definition at line 107 of file font.c.
Referenced by cFreetypeFont(), and ~cFreetypeFont().
|
private |
Definition at line 103 of file font.c.
Referenced by cFreetypeFont(), and Size().
|
private |
Definition at line 104 of file font.c.
Referenced by cFreetypeFont(), and Width().