Skip to content
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

Support more vt text effects #8

Open
lread opened this issue Oct 31, 2021 · 7 comments
Open

Support more vt text effects #8

lread opened this issue Oct 31, 2021 · 7 comments

Comments

@lread
Copy link
Contributor

lread commented Oct 31, 2021

From #2:

In a similar vein, asciinema/vt already surfaces bold, italic, underline, blink, inverse, and strikethrough. I just implemented bold and italic (inside of emacs running in membrane.term :D), but adding some of the others might be fun at some point.

@lread lread changed the title Support more vt font effects Support more vt text effects Oct 31, 2021
@lread
Copy link
Contributor Author

lread commented Oct 31, 2021

Looking at SGR codes and FWIW,

  • 📺 comparing with what iTerm2 on macOS seems to support
  • 📦 asciinema/vt includes/handles in its abstraction
  • 🎆 already done/handled in membrane.term
  • 🌾 usage seems truly or nearly obscure

Codes:

  • 0 📺 📦 🎆 clear all
  • 1 📺 📦 🎆 bold
  • 2 📺 dim - often implemented with light font weight.
  • 3 📺 📦 🎆 italic is not widely supported (go us!) (off by default in iTerm2)
  • 4 📺 📦 underline
  • 5 📺 📦 slow blink (off by default in iTerm2)
  • 6 🌾 rapid blink (not widely supported)
  • 7 📺 📦 invert
  • 8 🌾 hide (not widely supported)
  • 9 📺 📦 strikeout
  • 10 🌾 primary font
  • 11-19 🌾 alternative fonts
  • 20 🌾 Fraktur
  • 21 📦 not bold (or sometimes double underline) asciinema/tv sees it as not bold
  • 22 📺 📦 Normal intensity
  • 23 📺 📦 Not italic
  • 24 📺 📦 Not underlined
  • 25 📺 📦 Not blinking
  • 26 🌾 Proportional (not known to be used in any terminal)
  • 27 📺 📦 Not inverted
  • 28 🌾 Reveal
  • 29 📺 Not strikeout (I think that 📦 missed this one)
  • 30-38 📺 📦 🎆 foreground color
  • 39 📺 📦 🎆 Use default foreground color
  • 40-48 📺 📦 🎆 background color
  • 49 📺 📦 🎆 Use default background color
  • 50 🌾 Disable proportional (see 26)
  • 51 🌾 Framed
  • 52 🌾 Encircled
  • 53 🌾 Overlined
  • 54 🌾 Neither framed nor encircled
  • 55 🌾 Not overlined
  • 58 🌾 Set underline color
  • 59 🌾 Default underline color
  • 60-65 🌾 Ideogram (rarely supported)
  • 73 🌾 Superscript
  • 74 🌾 Subscript
  • 75 🌾 Neither superscript or subscript
  • 90-97 📺 📦 🎆 Bright foreground color
  • 100-107 📺 📦 🎆 Bright background color

@lread
Copy link
Contributor Author

lread commented Oct 31, 2021

So, in addition to adding support for:

  • underline
  • blink
  • inverse
  • strikethrough

We might also consider adding support for dim.
We'd need to tweak our fork of asciinema/tv to do that, I think.
And while we were in there we might consider having it recognize not strikeout.

@phronmophobic
Copy link
Owner

fwiw, I've already forked aciinema/vt

@lread
Copy link
Contributor Author

lread commented Oct 31, 2021

Perfect!

@lread
Copy link
Contributor Author

lread commented Nov 1, 2021

Blink and screenshot might be at odds! Just a thought.
Not that anybody uses blink, more implementing for the fun of it.
So maybe not worth an option to enable/disable blink.

lread added a commit to lread/membrane.term that referenced this issue Nov 1, 2021
Prints text SGR effects for visual inspection.

Should help with phronmophobic#8
@lread
Copy link
Contributor Author

lread commented Nov 1, 2021

Hmmm... just testing my new script from #11 on GNOME Terminal 3.36.2 on Linux Mint and it supports more of the things.

It'll blink on code 6 (albeit no faster than it does for code 5).
It hides on code 8 (and probably reveals on code 28).
It does double underlines for code 21.
And overlines for code 53 (and probably 55 too).
And it supports changing your underline color via code 58 (and probably 59 too).

Go figure!

@phronmophobic
Copy link
Owner

Blink and screenshot might be at odds!

Maybe that just means we to add cli-media support so we can make gifs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants