-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Test: Terminal underline styles and colors #158827
Labels
Milestone
Comments
This was referenced Aug 23, 2022
This was referenced Aug 23, 2022
Closed
Love it! |
This was referenced Aug 23, 2022
The script I used to test this: # Previously supported underline sequences
$straight1 = "`e[4m" # straight underline
$none1 = "`e[24m" # no underline
# Underline styles
$none2 = "`e[4:0m" # no underline
$straight2 = "`e[4:1m" # straight underline
$double = "`e[4:2m" # double underline
$curly = "`e[4:3m" # curly underline
$dotted = "`e[4:4m" # dotted underline
$dashed = "`e[4:5m" # dashed underline
# Underline colors (a style is required)
$color1 = "`e[58:5:32m" # 256 color palette: ANSI color number 32, see https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
$color2 = "`e[58:2:0:255:128:64m" # True color: Red=255, Green=128, Blue=64
$noColor = "`e[59m" # reset color
function emit($text) {
# Change this to a different color or different none
"$color2$text$none2$noColor"
}
$allTheText = "abcdefghijklmnopqrstuvwxyz1234567890-=`~!@#$%^&*()_+[]\{}|;':`"/? 👽 現代"
emit ($straight1 + $allTheText)
emit ($straight2 + $allTheText)
emit ($double + $allTheText)
emit ($curly + $allTheText)
emit ($dotted + $allTheText)
emit ($dashed + $allTheText) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Refs: #156983
Complexity: 3
Authors: @meganrogge @Tyriar
Create Issue
The terminal now supports escape sequences for different styles of underline as well as full color support. Here are some docs on the feature https://sw.kovidgoyal.net/kitty/underlines/. In addition to this, when GPU acceleration is using the webgl renderer (on/auto), we do improved underlining by not overlapping with the glyphs:
Basic usage (
echo -e "<string>"
):Ensure all of the above sequences work as expected and look good, some things to tweak while testing:
terminal.integrated.gpuAcceleration
("on" or "canvas", this will not work when "off" is used)terminal.integrated.fontSize
window.zoomLevel
This feature does not work on Windows because of a limitation in conpty.
The text was updated successfully, but these errors were encountered: