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 ""; }
47 virtual int Width(uint c)
const = 0;
49 virtual int Width(
const char *s)
const = 0;
51 virtual int Height(
void)
const = 0;
72 static cFont *
CreateFont(
const char *Name,
int CharHeight,
int CharWidth = 0);
90 static cString Bidi(
const char *Ltr);
111 const char *
Text(
void);
virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const
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.
const char * DefaultFontSml
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).
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 ...
virtual const char * FontName(void) const
Returns the font name.
static const cCursesFont Font
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 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.
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 int Width(uint c) const =0
Returns the width of the given character in pixel.
const char * DefaultFontOsd
int Height(const char *s) const
Returns the height of this font in pixel (obsolete, just for backwards compatibility).
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().