11#include <promeki/config.h>
12#if PROMEKI_ENABLE_PROAV
19PROMEKI_NAMESPACE_BEGIN
50 Font(
const Font &) =
delete;
51 Font &operator=(
const Font &) =
delete;
62 void setFontFilename(
const String &val);
68 const String &fontFilename()
const {
return _fontFilename; }
88 void setFontFallbacks(
const StringList &val);
97 const StringList &fontFallbacks()
const {
return _fontFallbacks; }
103 void setFontSize(
int val);
109 int fontSize()
const {
return _fontSize; }
115 void setForegroundColor(
const Color &color);
121 const Color &foregroundColor()
const {
return _fg; }
131 void setBackgroundColor(
const Color &color);
137 const Color &backgroundColor()
const {
return _bg; }
148 void setPaintEngine(
const PaintEngine &pe);
154 const PaintEngine &paintEngine()
const {
return _paintEngine; }
163 void setKerningEnabled(
bool val);
169 bool kerningEnabled()
const {
return _kerning; }
176 bool isValid()
const;
185 virtual bool drawText(
const String &text,
int x,
int y) = 0;
192 virtual int measureText(
const String &text) = 0;
203 virtual int lineHeight() = 0;
213 virtual int ascender() = 0;
223 virtual int descender() = 0;
230 Font(
const PaintEngine &pe);
246 virtual void onStateChanged();
259 virtual void onColorChanged();
272 String effectiveFilename()
const;
289 StringList effectiveFallbacks()
const;
291 String _fontFilename;
292 StringList _fontFallbacks;
294 Color _fg = Color::White;
295 Color _bg = Color::Black;
296 PaintEngine _paintEngine;
297 bool _kerning =
false;