We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cd8e19 + ceca9ac commit b8ca7d1Copy full SHA for b8ca7d1
.gitignore
@@ -0,0 +1,2 @@
1
+default.vim
2
+fontconvert/fontconvert
fontconvert/fontconvert.c
@@ -222,8 +222,14 @@ int main(int argc, char *argv[]) {
222
printf("const GFXfont %s PROGMEM = {\n", fontName);
223
printf(" (uint8_t *)%sBitmaps,\n", fontName);
224
printf(" (GFXglyph *)%sGlyphs,\n", fontName);
225
- printf(" 0x%02X, 0x%02X, %ld };\n\n",
226
- first, last, face->size->metrics.height >> 6);
+ if (face->size->metrics.height == 0) {
+ // No face height info, assume fixed width and get from a glyph.
227
+ printf(" 0x%02X, 0x%02X, %d };\n\n",
228
+ first, last, table[0].height);
229
+ } else {
230
+ printf(" 0x%02X, 0x%02X, %ld };\n\n",
231
+ first, last, face->size->metrics.height >> 6);
232
+ }
233
printf("// Approx. %d bytes\n",
234
bitmapOffset + (last - first + 1) * 7 + 7);
235
// Size estimate is based on AVR struct and pointer sizes;
0 commit comments