-
Notifications
You must be signed in to change notification settings - Fork 5
Font-based row height #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deprecate 'title_length', ignore it for now. It is no longer needed with the update to Adafruit_CircuitPython_Display_Text removing 'max_glyphs'. Refactor the scaling so that the 'text_scale' is not a multiple of the 'title_scale'. Correctly add multiple rows with the color-cycling effect. Previously all new rows had the same color.
If anyone has any deployed code and can check this against it, especially MacroPad related, that would be great |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me.
I tested the example code that @lesamouraipourpre provided on a PyPortal with CircuitPython 7.0.0-alpha.4 and confirmed the issue noted with colors repeating.
I also tested the simpletest example from this repo as well as the example provided in the MacroPad library docs for the display_text()
function from the MacroPad library. All of these appear to be working as intended to me.
I also tried using a few different custom fonts in the above examples and confirmed that this does fix the issue of text getting stacked on top of each other as shown in the picture from the issue linked at the top of this PR.
As far as I can tell from grepping the Learn Guides repo, the only learn guide that uses the |
I will try out the midi project tomorrow to ensure the UI still looks as expected with these changes. |
I tested the Midi project today on MacroPad with The one tiny difference that I noticed is there appears to be a few pixels of space between the title text row and the first "normal" text row in the currently released version. Maybe 3-4px or so. If we want to get this back we could add a few pixels to |
I'm slightly paranoid because of the rumours on Discord of the contents of the new Adabox. I don't want this update to mess up any demo code that is planned. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx to 2.5.0 from 2.4.6: > Merge pull request adafruit/Adafruit_CircuitPython_MCP230xx#41 from Red-M/master > Moved default branch to main > Moved CI to Python 3.7 Updating https://github.com/adafruit/Adafruit_CircuitPython_SCD4X to 1.1.0 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_SCD4X#2 from lesamouraipourpre/constants > Merge pull request adafruit/Adafruit_CircuitPython_SCD4X#4 from lesamouraipourpre/docs Updating https://github.com/adafruit/Adafruit_CircuitPython_SGP40 to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_SGP40#6 from caternuson/iss5 Updating https://github.com/adafruit/Adafruit_CircuitPython_MacroPad to 1.3.0 from 1.2.0: > Merge pull request adafruit/Adafruit_CircuitPython_MacroPad#15 from kattni/rotation > Merge pull request adafruit/Adafruit_CircuitPython_MacroPad#14 from kattni/display-image-fix Updating https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display to 1.2.0 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_Simple_Text_Display#6 from terop/fix_doc_typo > Merge pull request adafruit/Adafruit_CircuitPython_Simple_Text_Display#5 from lesamouraipourpre/adaptive-row-height Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_IS31FL3741
Add dynamic row heights based on font used. (Closes #3)
The row heights are almost certainly different to the previous version. This may affect some deployed code.
Deprecate
title_length
, ignore it for now. It is no longer needed with the update toAdafruit_CircuitPython_Display_Text
removingmax_glyphs
.Refactor the scaling so that the
text_scale
is not a multiple of thetitle_scale
.Correctly add multiple rows with the color-cycling effect. Previously all new rows had the same color.
Tested on Pynt with
7.0.0-alpha.5
and the following code, testing both fonts in different runs: