Adafruit-GFX-Font-Customiser icon indicating copy to clipboard operation
Adafruit-GFX-Font-Customiser copied to clipboard

Basline display...

Open RaisonRed opened this issue 1 year ago • 3 comments

Looks like the baseline is always drawn one pixel below its real position...

RaisonRed avatar Jul 26 '24 11:07 RaisonRed

Hi @RaisonRed and thanks for raising

Could you elaborate, with an example 🙏🏼 and the expected output?

thanks!

tchapi avatar Jul 28 '24 17:07 tchapi

Firefox_Screenshot_2024-08-08T19-04-16 509Z

RaisonRed avatar Aug 08 '24 19:08 RaisonRed

Thanks for the example.

In my understanding, the baseline is correctly drawn. Its value starts at the base of the first top pixel, ie base = 0 means the top pixel is above the baseline, not under. Said otherwise, zero indicates the first row (like a zero-based array). You can look at a standard uppercase char for a standard font like Roboto to see that the baseline is correctly drawn (the character stands on the baseline).

We could tweak the display and make it "1-based" (so it would be base: -14 in your example) but it's not the way it's encoded in the font so I'd rather keep it like this.

Hope it helps

tchapi avatar Aug 16 '24 19:08 tchapi