Colour in GAP banner logo#6224
Conversation
|
The line wrapping code also suffers from other issues: it does not honor UTF-8 encoding (where multi bytes can lead to a single "glyph" being printed), nor does it know about double-wide glyphs. |
|
I actually wonder if we should just add some code to the kernel which skips over OSI escape sequences, and knows how to handle multi-byte UTF-8. It's not that hard... Hmm |
|
How about we merge a version of this without the fancy colors and unicode (so we have the new logo, at least in its "basic" form), and then the full version can wait until someone fixes the line wrapping logic (might be feasible with help of some AI tools...) |
|
@mtorpey can you please rebase this / resolve the merge conflict? Of course we are still not ready to merge this, but I hope we'll one day be ready... |
Note that this currently causes issues with line-wrapping, since the engine that wraps at a certain number of characters takes the colour control characters into account even though they have no width. This makes lines wrap early, and if the terminal is 80 characters wide that causes ugly behaviour. Hopefully this can be fixed at some point.
This PR modifies the GAP banner on startup to show a rendering of the new logo. If the terminal encoding is UTF-8 it does this with nice Unicode dot characters, but falls back to letter
osymbols otherwise.As mentioned in Issue #6128, there is a possible concern with text wrapping. In an 80-character terminal some lines will be unnecessarily wrapped early due to the colour escape codes. I tried looking into the line-wrapping logic, but it was beyond me!