pi-top-Python-SDK
pi-top-Python-SDK copied to clipboard
Improve auto-wrapping text on miniscreen
See here for discussion of the problem.
Thinking about this, xy actually makes word wrap a bit awkward...
This does it differently - it automatically sets the text size and wrapping to fit in a bounding box. This is much more intuitive, I think>
This implementation also does something similar.
Once we have done this, we can deprecate the miniscreen's 'multiline text' function:
ImageDraw can handle automatic handling of multiline text from its text function - we can move to a single display_text on the miniscreen. The only thing offered by our multiline text function is word wrapping - this can be moved into the text function, and activated by an optional bool parameter.
We need to carefully consider use-cases here. Perhaps we should support "automatic word wrap" and/or "automatic max font size" by default.
Thinking about this, xy actually makes word wrap a bit awkward...
why?
As a summary, I think we should:
- Deprecate
display_multiline_textin favour ofdisplay_text display_textshould support automatic word wrapping if required; this one could be enabled by default...display_textshould support automatic font size if required; should be disabled by default
➤ Automation for Jira commented:
The linked issue - OS-1339 has been resolved