Go to the documentation of this file.
17 #define MAXFONTNAME 64
18 #define MINFONTSIZE 10
19 #define MAXFONTSIZE 64
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;
78 static cFont *
CreateFont(
const char *Name,
int CharHeight,
int CharWidth = 0);
98 static cString Bidi(
const char *Ltr);
119 const char *
Text(
void);
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
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.
const char * GetLine(int Line)
Returns the given Line. The first line is numbered 0.
virtual int Size(void) const
Returns the original size as requested when the font was created.
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.
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
int Height(const char *s) const
Returns the height of this font in pixel (obsolete, just for backwards compatibility).
virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const
const char * DefaultFontSml
static bool GetAvailableFontNames(cStringList *FontNames, bool Monospaced=false)
Queries the font configuration for a list of available font names, which is returned in FontNames.
virtual const char * FontName(void) const
Returns the font name.
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.
static cString GetFontFileName(const char *FontName)
Returns the actual font file name for the given FontName.
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
const char * DefaultFontFix
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.
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
const char * DefaultFontOsd
virtual int Width(const char *s) const =0
Returns the width of the given string in pixel.
static const cCursesFont Font
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 ...