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;
55 virtual int Height(
void)
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);
const char * DefaultFontSml
const char * Text(void)
Returns the full wrapped text.
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.
int Lines(void)
Returns the actual number of lines needed to display the full wrapped text.
const char * DefaultFontOsd
virtual int Size(void) const
Returns the original size as requested when the font was created.
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
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 ...
int Height(const char *s) const
Returns the height of this font in pixel (obsolete, just for backwards compatibility).
static const cCursesFont Font
virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const
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.
const char * DefaultFontFix
const char * GetLine(int Line)
Returns the given Line. The first line is numbered 0.
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
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.
static cString GetFontFileName(const char *FontName)
Returns the actual font file name for the given FontName.
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 const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().