forked from harlequin-tech/OledHQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fonts.h
60 lines (52 loc) · 1.25 KB
/
fonts.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef FONTS_H_
#define FONTS_H_
#include <stdlib.h>
#include <stdint.h>
// Font selection
#undef FONT_CHECKBOOK_12
#define FONT_CHECKBOOK_14
#undef FONT_PROFONT_10_100DPI
#undef FONT_PROFONT_10_72DPI
#define FONT_DEFAULT font_CHECKBOOK_14
//#define FONT_DEFAULT font_PROFONT_10_100DPI
typedef struct {
uint8_t width; // Width of glyph data in pixels
uint8_t xrect; // x width of rectangle
uint8_t yrect; // y height of rectangle
int8_t xoffset; // x offset of glyph in rectangle
int8_t yoffset; // y offset of glyph in rectangle
const uint8_t *glyph; // glyph pixel data
} glyph_t;
typedef struct {
const glyph_t *glyphs;
const uint8_t *map;
uint8_t height;
} font_t;
#ifdef FONT_CHECKBOOK_12
#include "font_checkbook_12.h"
#endif
#ifdef FONT_CHECKBOOK_14
#include "font_checkbook_14.h"
#endif
#ifdef FONT_PROFONT_10_100DPI
#include "font_profont_10_100dpi.h"
#endif
#ifdef FONT_PROFONT_10_72DPI
#include "font_profont_10_72dpi.h"
#endif
typedef enum {
#ifdef FONT_CHECKBOOK_12
font_CHECKBOOK_12,
#endif
#ifdef FONT_CHECKBOOK_14
font_CHECKBOOK_14,
#endif
#ifdef FONT_PROFONT_10_100DPI
font_PROFONT_10_100DPI,
#endif
#ifdef FONT_PROFONT_10_72DPI
font_PROFONT_10_72DPI,
#endif
} font_e;
extern font_t fontsHQ[];
#endif