olikraus / ucglib

Arduino True Color Library for TFTs and OLEDs
https://github.com/olikraus/ucglib/wiki
Other
261 stars 76 forks source link

Feature request: How big is the background affected by UCG_FONT_MODE_SOLID? #116

Open edjubenville opened 5 years ago

edjubenville commented 5 years ago

Using UCG_FONT_MODE_SOLID writes a larger vertical area than can be deduced from getFontAscent and getFontDescent. Ideally, I would like to see new APIs like getFontElevation and getFontDepth that would return the offsets from the font baseline to the top and bottom of the written box, respectively.

In lieu of that, what is the proper technique to determine these values by accessing the font structures directly?