An error in the “font5x7” font specification?

Anyone know why the underscore ‘_’ (= ascii code 95) in the “font5x7” has the horizontal line in the 8th row instead of 7th (in the file: “font5x7.cpp”)? Is that only a typo in the font spec? The font is supposed to be only 7 pixels high. The same is true for some other letters too, like ‘g’. For that reason the text rendering just leaves the bottom line away for some letters.

2 Likes

yep, changing the font height to 8 fixes it, like this (font5x7.cpp):

// standard ascii 5x7 font
const uint8_t font5x7[] PROGMEM = {
	5,8,0,0, // width and height, start char and only caps ?
...
2 Likes

I haven’t used this font before (or if so, not with lower case letters. It is not uncommon for g, j and other letters to extend down an extra pixel as you have discovered. Cannot understand why the under-score is down there though!

Have you submitted a PR for the above? I wonder if it applies to other fonts as well?

I do not get why they are doing that as the system seems always to strip the extra line. It does not look good, and why to add the extra line to in the first place?

I have made a PR.