pi-top-Python-SDK icon indicating copy to clipboard operation
pi-top-Python-SDK copied to clipboard

Improve auto-wrapping text on miniscreen

Open m-roberts opened this issue 4 years ago • 2 comments

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.

m-roberts avatar Feb 25 '21 19:02 m-roberts

Thinking about this, xy actually makes word wrap a bit awkward...

why?

As a summary, I think we should:

  • Deprecate display_multiline_text in favour of display_text
  • display_text should support automatic word wrapping if required; this one could be enabled by default...
  • display_text should support automatic font size if required; should be disabled by default

jcapona avatar Mar 29 '21 21:03 jcapona

➤ Automation for Jira commented:

The linked issue - OS-1339 has been resolved

sync-by-unito[bot] avatar Jul 19 '22 12:07 sync-by-unito[bot]