25#define eDvbFontSize (fontSml + 1)
42 virtual const char *
FontName(
void)
const {
return ""; }
48 virtual int Width(
void)
const = 0;
51 virtual int Width(uint c)
const = 0;
53 virtual int Width(
const char *s)
const = 0;
98 static cString Bidi(
const char *Ltr);
virtual int Width(const char *s) const =0
Returns the width of the given string in pixel.
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
static bool GetAvailableFontNames(cStringList *FontNames, bool Monospaced=false)
Queries the font configuration for a list of available font names, which is returned in FontNames.
static void SetFont(eDvbFont Font, const char *Name, int CharHeight)
< Draws the given text into the Pixmap at position (x, y) with the given colors.
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
virtual int Size(void) const
Returns the original size as requested when the font was created.
virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const =0
Draws the given text into the Bitmap at position (x, y) with the given colors.
int Height(const char *s) const
Returns the height of this font in pixel (obsolete, just for backwards compatibility).
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
virtual const char * FontName(void) const
Returns the font name.
static cString GetFontFileName(const char *FontName)
Returns the actual font file name for the given FontName.
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
static cFont * CreateFont(const char *Name, int CharHeight, int CharWidth=0)
Creates a new font object with the given Name and makes its characters CharHeight pixels high.
virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const
cTextWrapper(const char *Text, const cFont *Font, int Width)
const char * GetLine(int Line)
Returns the given Line. The first line is numbered 0.
void Set(const char *Text, const cFont *Font, int Width)
Wraps the Text to make it fit into the area defined by the given Width when displayed with the given ...
const char * Text(void)
Returns the full wrapped text.
int Lines(void)
Returns the actual number of lines needed to display the full wrapped text.
const char * DefaultFontOsd
const char * DefaultFontSml
const char * DefaultFontFix
static const cCursesFont Font