Added logic to ensure text cannot overlap on smaller screen sizes #1799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adjust text size based on the number of characters that can fit on the screen at a given font size with a string's length
Proposed Changes
I kept getting text overflow on my 160x128 screen so I made font sizes more dynamic to a display string length.
Types of Changes
New feature
Verification
You would probably need to run the script on a smaller display although you might still be able to see a difference on larger variants
Testing
I did test the changes on my esp32 s3 n16r8 using the settings menu
Linked Issues
User-Facing Change
Further Comments
Made this to stop my text from overflowing on my display
My display has sparkles on 2 sides of the screen but I am unsure if its related to my additions
This change may ruin some aesthetic due to the jarring difference between the text sizes
The problem this solves could also be solved with a scrolling text system (as used in "displayscrollingtext()") but I don't have the knowledge of c++ to do it.