forked from CURTLab/LVGLBuilder
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathLVGLFontData.h
41 lines (29 loc) · 834 Bytes
/
LVGLFontData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef LVGLFONTDATA_H
#define LVGLFONTDATA_H
#include <lvgl/lvgl.h>
#include <QString>
#include <QJsonObject>
class LVGLFontData
{
public:
LVGLFontData(const QString &name, const QString &codeName, uint8_t size, const lv_font_t *font);
~LVGLFontData();
static LVGLFontData *parse(const QString &fileName, uint8_t size, uint8_t bpp, uint32_t unicodeFirst, uint32_t unicodeLast);
static LVGLFontData *parse(QJsonObject object);
const lv_font_t *font() const;
QString name() const;
QString codeName() const;
bool saveAsCode(const QString &fileName) const;
bool isCustomFont() const;
QString fileName() const;
QJsonObject toJson() const;
uint8_t size() const;
private:
lv_font_t *m_font;
QString m_fileName;
QString m_name;
QString m_codeName;
uint8_t m_size;
bool m_customFont;
};
#endif // LVGLFONTDATA_H