mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2024-10-03 18:18:46 -04:00
Set yAdvance to glyph height if face height is zero.
This commit is contained in:
parent
bffb1aae70
commit
ceca9ac409
@ -222,8 +222,14 @@ int main(int argc, char *argv[]) {
|
|||||||
printf("const GFXfont %s PROGMEM = {\n", fontName);
|
printf("const GFXfont %s PROGMEM = {\n", fontName);
|
||||||
printf(" (uint8_t *)%sBitmaps,\n", fontName);
|
printf(" (uint8_t *)%sBitmaps,\n", fontName);
|
||||||
printf(" (GFXglyph *)%sGlyphs,\n", fontName);
|
printf(" (GFXglyph *)%sGlyphs,\n", fontName);
|
||||||
printf(" 0x%02X, 0x%02X, %ld };\n\n",
|
if (face->size->metrics.height == 0) {
|
||||||
first, last, face->size->metrics.height >> 6);
|
// No face height info, assume fixed width and get from a glyph.
|
||||||
|
printf(" 0x%02X, 0x%02X, %d };\n\n",
|
||||||
|
first, last, table[0].height);
|
||||||
|
} else {
|
||||||
|
printf(" 0x%02X, 0x%02X, %ld };\n\n",
|
||||||
|
first, last, face->size->metrics.height >> 6);
|
||||||
|
}
|
||||||
printf("// Approx. %d bytes\n",
|
printf("// Approx. %d bytes\n",
|
||||||
bitmapOffset + (last - first + 1) * 7 + 7);
|
bitmapOffset + (last - first + 1) * 7 + 7);
|
||||||
// Size estimate is based on AVR struct and pointer sizes;
|
// Size estimate is based on AVR struct and pointer sizes;
|
||||||
|
Loading…
Reference in New Issue
Block a user