... | ... |
@@ -3,28 +3,20 @@ |
3 | 3 |
|
4 | 4 |
#include "oswald.h" |
5 | 5 |
|
6 |
-typedef enum { |
|
7 |
- FONT_TYPE_MONOSPACE = 0, |
|
8 |
- FONT_TYPE_PROPORTIONAL, |
|
9 |
-} oswald_font_type; |
|
10 | 6 |
|
11 |
-typedef enum { |
|
12 |
- FONT_LCD8x13 = 0, |
|
13 |
- FONT_LCD13x21, |
|
14 |
- FONT_5x7, |
|
15 |
- FONT_6x9, |
|
16 |
- FONT_DROID8x12, |
|
17 |
- FONT_DROID8x12b, |
|
18 |
- LAST_FONT |
|
19 |
-} oswald_font_face; |
|
7 |
+#ifndef FONT_6x9 |
|
8 |
+#define FONT_5x8 0x10 |
|
9 |
+/* ...to make conpiler happy while I fix all references */ |
|
10 |
+#define FONT_6x9 0 |
|
11 |
+#define FONT_LCD13x21 1 |
|
12 |
+#define FONT_LCD8x13 2 |
|
13 |
+#define FONT_DROID8x12 3 |
|
14 |
+#define FONT_5x7 4 |
|
15 |
+#define FONT_DROID8x12b 5 |
|
16 |
+#endif |
|
20 | 17 |
|
21 |
-typedef struct { |
|
22 |
- oswald_font_type font_type; |
|
23 |
- uint8_t width; |
|
24 |
- uint8_t height; |
|
25 |
- uint8_t *data; |
|
26 |
-} oswald_font; |
|
18 |
+typedef int oswald_font_face; |
|
27 | 19 |
|
28 |
-extern const oswald_font oswald_fonts[]; |
|
20 |
+extern const unsigned char font5x8[]; |
|
29 | 21 |
|
30 | 22 |
#endif |
... | ... |
@@ -4,27 +4,22 @@ |
4 | 4 |
#include "oswald.h" |
5 | 5 |
|
6 | 6 |
typedef enum { |
7 |
-// FONT_4x6 = 0, |
|
8 |
-// FONT_5x8 = 0, |
|
9 |
-// FONT_5x12, |
|
10 |
- FONT_6x8 = 0, |
|
11 |
-// FONT_6x10, |
|
12 |
-// FONT_7x12, |
|
13 |
- FONT_7x12b, |
|
14 |
-// FONT_8x8, |
|
15 |
-// FONT_8x12, |
|
16 |
-// FONT_8x14, |
|
17 |
-// FONT_10x16, |
|
18 |
-// FONT_12x16, |
|
19 |
-// FONT_12x20, |
|
20 |
- FONT_16x26, |
|
21 |
-// FONT_22x36, |
|
22 |
-// FONT_24x40, |
|
23 |
-// FONT_32x53, |
|
7 |
+ FONT_TYPE_MONOSPACE = 0, |
|
8 |
+ FONT_TYPE_PROPORTIONAL, |
|
9 |
+} oswald_font_type; |
|
10 |
+ |
|
11 |
+typedef enum { |
|
12 |
+ FONT_LCD8x13 = 0, |
|
13 |
+ FONT_LCD13x21, |
|
14 |
+ FONT_5x7, |
|
15 |
+ FONT_6x9, |
|
16 |
+ FONT_DROID8x12, |
|
17 |
+ FONT_DROID11x14b, |
|
24 | 18 |
LAST_FONT |
25 | 19 |
} oswald_font_face; |
26 | 20 |
|
27 | 21 |
typedef struct { |
22 |
+ oswald_font_type font_type; |
|
28 | 23 |
uint8_t width; |
29 | 24 |
uint8_t height; |
30 | 25 |
uint8_t *data; |
... | ... |
@@ -4,30 +4,30 @@ |
4 | 4 |
#include "oswald.h" |
5 | 5 |
|
6 | 6 |
typedef enum { |
7 |
- FONT_4x6 = 0, |
|
8 |
- FONT_5x8, |
|
9 |
- FONT_5x12, |
|
10 |
- FONT_6x8, |
|
11 |
- FONT_6x10, |
|
7 |
+// FONT_4x6 = 0, |
|
8 |
+// FONT_5x8 = 0, |
|
9 |
+// FONT_5x12, |
|
10 |
+ FONT_6x8 = 0, |
|
11 |
+// FONT_6x10, |
|
12 |
+// FONT_7x12, |
|
12 | 13 |
FONT_7x12b, |
13 |
- FONT_7x12, |
|
14 |
- FONT_8x8, |
|
15 |
- FONT_8x12, |
|
16 |
- FONT_8x14, |
|
17 |
- FONT_10x16, |
|
18 |
- FONT_12x16, |
|
19 |
- FONT_12x20, |
|
14 |
+// FONT_8x8, |
|
15 |
+// FONT_8x12, |
|
16 |
+// FONT_8x14, |
|
17 |
+// FONT_10x16, |
|
18 |
+// FONT_12x16, |
|
19 |
+// FONT_12x20, |
|
20 | 20 |
FONT_16x26, |
21 |
- FONT_22x36, |
|
22 |
- FONT_24x40, |
|
23 |
- FONT_32x53, |
|
21 |
+// FONT_22x36, |
|
22 |
+// FONT_24x40, |
|
23 |
+// FONT_32x53, |
|
24 | 24 |
LAST_FONT |
25 | 25 |
} oswald_font_face; |
26 | 26 |
|
27 | 27 |
typedef struct { |
28 |
- u8t width; |
|
29 |
- u8t height; |
|
30 |
- char **data; |
|
28 |
+ uint8_t width; |
|
29 |
+ uint8_t height; |
|
30 |
+ uint8_t *data; |
|
31 | 31 |
} oswald_font; |
32 | 32 |
|
33 | 33 |
extern const oswald_font oswald_fonts[]; |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
1 |
+#ifndef _FONTS_H |
|
2 |
+#define _FONTS_H |
|
3 |
+ |
|
4 |
+#include "oswald.h" |
|
5 |
+ |
|
6 |
+typedef enum { |
|
7 |
+ FONT_4x6 = 0, |
|
8 |
+ FONT_5x8, |
|
9 |
+ FONT_5x12, |
|
10 |
+ FONT_6x8, |
|
11 |
+ FONT_6x10, |
|
12 |
+ FONT_7x12b, |
|
13 |
+ FONT_7x12, |
|
14 |
+ FONT_8x8, |
|
15 |
+ FONT_8x12, |
|
16 |
+ FONT_8x14, |
|
17 |
+ FONT_10x16, |
|
18 |
+ FONT_12x16, |
|
19 |
+ FONT_12x20, |
|
20 |
+ FONT_16x26, |
|
21 |
+ FONT_22x36, |
|
22 |
+ FONT_24x40, |
|
23 |
+ FONT_32x53, |
|
24 |
+ LAST_FONT |
|
25 |
+} oswald_font_face; |
|
26 |
+ |
|
27 |
+typedef struct { |
|
28 |
+ u8t width; |
|
29 |
+ u8t height; |
|
30 |
+ char **data; |
|
31 |
+} oswald_font; |
|
32 |
+ |
|
33 |
+extern const oswald_font oswald_fonts[]; |
|
34 |
+ |
|
35 |
+#endif |