-
Notifications
You must be signed in to change notification settings - Fork 815
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
Improve cosmetics on Linux vconsole #5011
Comments
I will investigate, but it looks like the zap fonts include more box drawing chars, and map the Unicode 2500 range, so might be an option. See https://www.zap.org.au/projects/console-fonts-zap/. |
Textual is quite configurable, so it would be quite doable to find a set of styles that work well on the Linux console. We have an update in the pipeline to allow for ansi-colors. I suspect that most of the poor visuals are due to downsampling truecolor RGB to 256 / 156 colors. We could also have a mode to pick characters for borders that work better. In short, there is a lot that could be done. Can I ask who you are working for? |
I work at QinetiQ, in the UK, although we have branches round the world.
…On Wed, 18 Sept 2024, 09:48 Will McGugan, ***@***.***> wrote:
Textual is quite configurable, so it would be quite doable to find a set
of styles that work well on the Linux console.
We have an update in the pipeline to allow for ansi-colors. I suspect that
most of the poor visuals are due to downsampling truecolor RGB to 256 / 156
colors. We could also have a mode to pick characters for borders that work
better.
In short, there is a lot that could be done.
Can I ask who you are working for?
—
Reply to this email directly, view it on GitHub
<#5011 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC4N6MFYDH76PHFPTTHIS4TZXE47JAVCNFSM6AAAAABOJWCFJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJXHA3TCMZYGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
QinetiQ Im going to check them out. |
Further observations. I have tried the ansi_colors switch from version 0.80.0 onwards, and it doesn't help with my specific problems. I can improve things a lot by fiddling with the styling, for example by setting the scrollbar-color to something in the VGA color set, it is at least visible - used yellow, which looks weird, but at least has contrast. My guess that the problem is to do with line drawing characters is wrong; the unicode mappings on the two fonts I tried are good enough that setting border: solid works. If I use zap-light18, I can even mix border: double and border: single as distinct. Many of the cosmetic glitches can then be improved by setting border: solid on a variety of widgets. My residual glitches come down to the fact that the block drawing characters of different heights and widths are not in any of the console fonts I have tried. This means that border: tall, which is used at the top and bottom of buttons in the default style, comes up as missing glyphs. Setting a border: solid on Button draws an outline, which looks OK, except for variant buttons where the background extends outside the border. There is a similar problem with the scrollbar, which uses the variable height or width blocks in search of extra position resolution for the thumb. This is hardcoded as class variables in scrollbar.py. As this is python, I could presumably replace the existing values with my own array, and trade smooth scrolling for reduced artefacts. Beyond that, maybe one of 512 glyph fonts from the Zap people has more of the block characters, which might solve things at the expense of loosing bright / normal colour distinctions. Alternatively, and this is heading into the realm of fantasy land, are there ansi sequences for switching between fonts? Could one use a special font loaded with blocks and the like for rendering the cosmetics, and swap back to normal font for the Latin characters? |
The 512 glyph Zap fonts have lots more accented, Greek and Cyrillic characters, not block drawing. So my suggestion is a documentation fix in the short term: Where you discuss using various terminals, and their short comings, suggest the psf-unifont package for the Linux console, and that because there are only 8 colors, you need to make some harsh style choices, and in particular to set scrollbar-color to something different from the background. |
Textual works, but doesn't look good on the Linux virtual console environment.
I am about to deploy an in company solution that uses textual on read-only Linux ISOs, where the textual app is launched as the default shell. It all works, but the box drawing looks poor, and you can see the problem by running any textual demo in the console environment. All the graphical elements that should have edges have rows of diamonds (or whatever the missing glyph is shown as for that font). The available colors are limited, and the scroll bars have no contrast, but that could presumably be fixed with some CSS.
Ironically, if you provoke a traceback, the box drawing in the traceback looks great.
The Linux console has some limitations, inherited from VGA hardware text mode. There are at most 256 glyphs, or 512 if you give up bright colors. A standard install ships with about 120 font files, which differ in both glyph shape and size, and the mapping of character index to glyph shape, to cover a range of languages. I have looked at quite a lot of the Latin ones, and all the ones I checked have the basic, single-line box drawing characters and some shading chars, round 0xB0 to 0xB5 and 0xC0 to 0xC6.
There are supposedly some psfu fonts, which do some extended Unicode mapping to the limited set of available glyphs, and these might include some or all of the Unicode box drawing area round 2500 that Textual uses. None of my installs have psfu files, but I could chase that if it one that works was known.
I don't want to solutioneer, but I can see two options.
Happy to help, but I don't want to start changing things on a clone in a way you would never accept.
The text was updated successfully, but these errors were encountered: