Forum: Mikrocontroller und Digitale Elektronik Probleme mit dem FontCreator. Dringend!


von Owen S. (senmeis)


Angehängte Dateien:

Lesenswert?

Hi,

man möchte ein 4x8 Font mit dem FontCreator 
(http://www.mikrocontroller.net/attachment/22095/GLCDFontCreator2.zip) 
generieren. Das Problem ist, das linke Fenster ist immer leer obwohl auf 
diesem gewähltes Zeichen dargestellt werden soll (s. Anhang). Unten ist 
der generierte Header. Es gibt nur Nullen! Noch was merkwürdiges: "Font 
height" hat den Wert "-8", aber eigentlich wurde "8" gewählt. Liegt das 
an meiner Einstellung?
1
/*
2
 *
3
 * Font_4X8
4
 *
5
 * created with FontCreator
6
 * written by F. Maximilian Thiele
7
 *
8
 * http://www.apetech.de/fontCreator
9
 * me@apetech.de
10
 *
11
 * File Name           : font_4x8.h
12
 * Date                : 12.05.2011
13
 * Font size in bytes  : 3174
14
 * Font width          : 4
15
 * Font height         : -8
16
 * Font first char     : 32
17
 * Font last char      : 128
18
 * Font used chars     : 96
19
 *
20
 * The font data are defined as
21
 *
22
 * struct _FONT_ {
23
 *     uint16_t   font_Size_in_Bytes_over_all_included_Size_it_self;
24
 *     uint8_t    font_Width_in_Pixel_for_fixed_drawing;
25
 *     uint8_t    font_Height_in_Pixel_for_all_characters;
26
 *     unit8_t    font_First_Char;
27
 *     uint8_t    font_Char_Count;
28
 *
29
 *     uint8_t    font_Char_Widths[font_Last_Char - font_First_Char +1];
30
 *                  // for each character the separate width in pixels,
31
 *                  // characters < 128 have an implicit virtual right empty row
32
 *
33
 *     uint8_t    font_data[];
34
 *                  // bit field of all characters
35
 */
36
37
#include <inttypes.h>
38
#include <avr/pgmspace.h>
39
40
#ifndef FONT_4X8_H
41
#define FONT_4X8_H
42
43
#define FONT_4X8_WIDTH 4
44
#define FONT_4X8_HEIGHT -8
45
46
static uint8_t Font_4X8[] PROGMEM = {
47
    0x0C, 0x66, // size
48
    0x04, // width
49
    0xF8, // height
50
    0x20, // first char
51
    0x60, // char count
52
    
53
    // char widths
54
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
55
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
56
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
57
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
58
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
59
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
60
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
61
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
62
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
63
    0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 
64
    
65
    // font data
66
    0x00, 0x00, 0x00, 0x00, // 32
67
    0x00, 0x00, 0x00, 0x00, // 33
68
    0x00, 0x00, 0x00, 0x00, // 34
69
    0x00, 0x00, 0x00, 0x00, // 35
70
    0x00, 0x00, 0x00, 0x00, // 36
71
    0x00, 0x00, 0x00, 0x00, // 37
72
    0x00, 0x00, 0x00, 0x00, // 38
73
    0x00, 0x00, 0x00, 0x00, // 39
74
    0x00, 0x00, 0x00, 0x00, // 40
75
    0x00, 0x00, 0x00, 0x00, // 41
76
    0x00, 0x00, 0x00, 0x00, // 42
77
    0x00, 0x00, 0x00, 0x00, // 43
78
    0x00, 0x00, 0x00, 0x00, // 44
79
    0x00, 0x00, 0x00, 0x00, // 45
80
    0x00, 0x00, 0x00, 0x00, // 46
81
    0x00, 0x00, 0x00, 0x00, // 47
82
    0x00, 0x00, 0x00, 0x00, // 48
83
    0x00, 0x00, 0x00, 0x00, // 49
84
    0x00, 0x00, 0x00, 0x00, // 50
85
    0x00, 0x00, 0x00, 0x00, // 51
86
    0x00, 0x00, 0x00, 0x00, // 52
87
    0x00, 0x00, 0x00, 0x00, // 53
88
    0x00, 0x00, 0x00, 0x00, // 54
89
    0x00, 0x00, 0x00, 0x00, // 55
90
    0x00, 0x00, 0x00, 0x00, // 56
91
    0x00, 0x00, 0x00, 0x00, // 57
92
    0x00, 0x00, 0x00, 0x00, // 58
93
    0x00, 0x00, 0x00, 0x00, // 59
94
    0x00, 0x00, 0x00, 0x00, // 60
95
    0x00, 0x00, 0x00, 0x00, // 61
96
    0x00, 0x00, 0x00, 0x00, // 62
97
    0x00, 0x00, 0x00, 0x00, // 63
98
    0x00, 0x00, 0x00, 0x00, // 64
99
    0x00, 0x00, 0x00, 0x00, // 65
100
    0x00, 0x00, 0x00, 0x00, // 66
101
    0x00, 0x00, 0x00, 0x00, // 67
102
    0x00, 0x00, 0x00, 0x00, // 68
103
    0x00, 0x00, 0x00, 0x00, // 69
104
    0x00, 0x00, 0x00, 0x00, // 70
105
    0x00, 0x00, 0x00, 0x00, // 71
106
    0x00, 0x00, 0x00, 0x00, // 72
107
    0x00, 0x00, 0x00, 0x00, // 73
108
    0x00, 0x00, 0x00, 0x00, // 74
109
    0x00, 0x00, 0x00, 0x00, // 75
110
    0x00, 0x00, 0x00, 0x00, // 76
111
    0x00, 0x00, 0x00, 0x00, // 77
112
    0x00, 0x00, 0x00, 0x00, // 78
113
    0x00, 0x00, 0x00, 0x00, // 79
114
    0x00, 0x00, 0x00, 0x00, // 80
115
    0x00, 0x00, 0x00, 0x00, // 81
116
    0x00, 0x00, 0x00, 0x00, // 82
117
    0x00, 0x00, 0x00, 0x00, // 83
118
    0x00, 0x00, 0x00, 0x00, // 84
119
    0x00, 0x00, 0x00, 0x00, // 85
120
    0x00, 0x00, 0x00, 0x00, // 86
121
    0x00, 0x00, 0x00, 0x00, // 87
122
    0x00, 0x00, 0x00, 0x00, // 88
123
    0x00, 0x00, 0x00, 0x00, // 89
124
    0x00, 0x00, 0x00, 0x00, // 90
125
    0x00, 0x00, 0x00, 0x00, // 91
126
    0x00, 0x00, 0x00, 0x00, // 92
127
    0x00, 0x00, 0x00, 0x00, // 93
128
    0x00, 0x00, 0x00, 0x00, // 94
129
    0x00, 0x00, 0x00, 0x00, // 95
130
    0x00, 0x00, 0x00, 0x00, // 96
131
    0x00, 0x00, 0x00, 0x00, // 97
132
    0x00, 0x00, 0x00, 0x00, // 98
133
    0x00, 0x00, 0x00, 0x00, // 99
134
    0x00, 0x00, 0x00, 0x00, // 100
135
    0x00, 0x00, 0x00, 0x00, // 101
136
    0x00, 0x00, 0x00, 0x00, // 102
137
    0x00, 0x00, 0x00, 0x00, // 103
138
    0x00, 0x00, 0x00, 0x00, // 104
139
    0x00, 0x00, 0x00, 0x00, // 105
140
    0x00, 0x00, 0x00, 0x00, // 106
141
    0x00, 0x00, 0x00, 0x00, // 107
142
    0x00, 0x00, 0x00, 0x00, // 108
143
    0x00, 0x00, 0x00, 0x00, // 109
144
    0x00, 0x00, 0x00, 0x00, // 110
145
    0x00, 0x00, 0x00, 0x00, // 111
146
    0x00, 0x00, 0x00, 0x00, // 112
147
    0x00, 0x00, 0x00, 0x00, // 113
148
    0x00, 0x00, 0x00, 0x00, // 114
149
    0x00, 0x00, 0x00, 0x00, // 115
150
    0x00, 0x00, 0x00, 0x00, // 116
151
    0x00, 0x00, 0x00, 0x00, // 117
152
    0x00, 0x00, 0x00, 0x00, // 118
153
    0x00, 0x00, 0x00, 0x00, // 119
154
    0x00, 0x00, 0x00, 0x00, // 120
155
    0x00, 0x00, 0x00, 0x00, // 121
156
    0x00, 0x00, 0x00, 0x00, // 122
157
    0x00, 0x00, 0x00, 0x00, // 123
158
    0x00, 0x00, 0x00, 0x00, // 124
159
    0x00, 0x00, 0x00, 0x00, // 125
160
    0x00, 0x00, 0x00, 0x00, // 126
161
    0x00, 0x00, 0x00, 0x00 // 127
162
    
163
};
164
165
#endif

Besten Dank
Owen

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.