Textualize / textual

The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
https://textual.textualize.io/
MIT License
25.03k stars 764 forks source link

Add support for an override that goes into "ASCII-only terminal mode" #3086

Open davep opened 1 year ago

davep commented 1 year ago

Somewhat related to the original thinking in #2658: there are situations where a Textual application will be run in a way that it's difficult, if not impossible, to use a font that has all the characters necessary to display correctly. A classic example of this would be running on a GNU/Linux console (no graphical environment, just the raw terminal).

Here's an example of that from a question on Discord:

IMG_4195

We should add a way, perhaps via an environment variable, of turning on a "just use ASCII" mode, so that applications can still look useable in such situations.

willmcgugan commented 9 months ago

I think we could probably do this will a large str.translate table that converts the unicode box characters in to +---+| etc.

MorningLightMountain713 commented 1 month ago

Would be great to see something like this.

I'm trying to do something similar to Ubuntu's subiquity (python) terminal installer

Screenshot 2024-08-02 at 12 05 14 PM

I can get most of it looking good, but some parts - eg the scrollbar, don't display:

Screenshot 2024-08-02 at 1 01 31 PM