diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-07-06 19:19:11 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-06 19:19:11 +0000 |
| commit | 39e252019f55dab3e6119cba92caf451c29aa92b (patch) | |
| tree | 5c75ca0b516dba0cb012e05c53388caa91f8ef3a /utils/themeeditor/graphics/rbfont.h | |
| parent | 5de6ddcaa170cce4c0a2cd4b43aa76a4ef7ae175 (diff) | |
| download | rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.zip rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.gz rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.bz2 rockbox-39e252019f55dab3e6119cba92caf451c29aa92b.tar.xz | |
Theme Editor: Rockbox FNT files now supported. Theme editor will currently load fonts from the current project directory, or use the built-in font if they're not present
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27318 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbfont.h')
| -rw-r--r-- | utils/themeeditor/graphics/rbfont.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/themeeditor/graphics/rbfont.h b/utils/themeeditor/graphics/rbfont.h index 2c1f8a9..bc695a0 100644 --- a/utils/themeeditor/graphics/rbfont.h +++ b/utils/themeeditor/graphics/rbfont.h @@ -24,21 +24,29 @@ #include <QString> #include <QFile> -#include <QGraphicsSimpleTextItem> +#include <QGraphicsPixmapItem> #include <QHash> +#include "rbtext.h" + class RBFont { public: RBFont(QString file); virtual ~RBFont(); - QGraphicsSimpleTextItem* renderText(QString text, QColor color, + RBText* renderText(QString text, QColor color, QGraphicsItem* parent = 0); - int lineHeight(){ return 8; } + int lineHeight(){ return header.value("height", 0).toInt(); } + + static quint16 maxFontSizeFor16BitOffsets; private: QHash<QString, QVariant> header; + bool valid; + quint8* imageData; + quint16* offsetData; + quint8* widthData; }; #endif // RBFONT_H |