How to widen the SPACE character in Font72x53rle #3114
Unanswered
ParkesFlyer
asked this question in
Q&A - Fonts
Replies: 1 comment 1 reply
-
Use the text padding feature of the library, see example: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Bodmer,
I'm relatively new to the Arduino world, and am currently learning lots with project using a 128x160 ST7735 display. My project calls for displaying a one, two, or three digit number using your lovely 72x53rle font. When assembling a string to display, I pad out the number with spaces, i.e. char space space, char char space, char char char ,which works fine until I go from a 3-digit number to a 2-digit one, in which case I end up with a lingering fragment of the third digit because the space character is narrower than the digits 0-9 (alternatively, I've tried right justifying by placing the spaces first). I could solve this by using leading zeros but feel that spaces are rather more elegant. How can I define a full width SPACE character, and how would I go about substituting it for the narrow one in my local library?
Beta Was this translation helpful? Give feedback.
All reactions