adafruit / Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
https://learn.adafruit.com/adafruit-gfx-graphics-library
Other
2.32k stars 1.53k forks source link

Use yAdvance to correctly adjust the cursor position when setting/restore custom font #418

Open rspurlock opened 1 year ago

rspurlock commented 1 year ago

Instead of hard coding a 6 pixel adjustment for the cursor Y position in setFont method shouldn't the code use the yAdvance field of the new font (or the yAdvance from the custom font when going back to system fonts) to correctly adjust the cursor position for custom fonts?