vdr 2.7.6
|
Public Member Functions | |
cFreetypeFont (const char *Name, int CharHeight, int CharWidth=0) | |
virtual | ~cFreetypeFont () override |
virtual const char * | FontName (void) const override |
virtual int | Size (void) const override |
virtual int | Width (void) const override |
virtual int | Width (uint c) const override |
virtual int | Width (const char *s) const override |
virtual int | Height (void) const override |
virtual void | DrawText (cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override |
virtual void | DrawText (cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const override |
![]() | |
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 ) |
|
overridevirtual |
|
inlineprivate |
|
overridevirtual |
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(), 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().
|
overridevirtual |
Reimplemented from cFont.
Definition at line 337 of file font.c.
References cGlyph::AdvanceX(), AlphaBlend(), 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().
|
inlineoverridevirtual |
|
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().
|
inlineoverridevirtual |
|
private |
Definition at line 184 of file font.c.
References face, Glyph(), and KERNING_UNKNOWN.
Referenced by DrawText(), DrawText(), and Width().
|
inlineoverridevirtual |
|
overridevirtual |
Returns the width of the given string in pixel.
Implements cFont.
Definition at line 249 of file font.c.
References cGlyph::AdvanceX(), Glyph(), Kerning(), Setup, Utf8CharGet(), and Utf8CharLen().
|
overridevirtual |
|
inlineoverridevirtual |
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().