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

[Feature request] Italic text #46

Open
KaKi87 opened this issue May 9, 2020 · 3 comments
Open

[Feature request] Italic text #46

KaKi87 opened this issue May 9, 2020 · 3 comments

Comments

@KaKi87
Copy link

KaKi87 commented May 9, 2020

Hello,

As we have the ability to display bold, and underline text, I'd like to be able to display italic text.

Thanks !

@jhyland87
Copy link

I 1000% second this. I've spent a while trying to figure out why I can't get italic text to print in the terminal. I've tried the following:

  • The tput.sitm function
  • {italic}Hello World{/italic}
  • {sitm}Hello World{/sitm}
  • \x1B[3mHello World\x1B[23m
  • All the different terminal types (xterm-256color, xterm-color, xterm-new, etc)
  • Added another condition in the Screen.prototype.codeAttr method (in screen.js) to check for the italic escape sequence (which is 3 to start and 23 to stop)
  • Added another switch case in the Screen.prototype.attrCode method (also in screen.js) to account for the italic escape sequence

And I know my terminal supports it because running echo -e "\x1B[3mHello World\x1B[23m" and echo "$(tput sitm)Hello World$(tput ritm)" both work just fine.
I can see an entry for sitm in the lib/alias.js, but I can't get it to actually work.

The really annoying part is that whenever I just print the object to the console and look at the content attribute of that object, I can see the correct italic sequences present. But they seem to get stripped before they get displayed, and I can't figure out how >_<

@jhyland87
Copy link

@KaKi87 & @embarkbot , do either of you know how to fix the italic text issue? If you can point me in the right direction, I can try to fix/implement it and create a PR going

@KaKi87
Copy link
Author

KaKi87 commented Feb 11, 2024

Nope, I actually even gave up on this, I am now only maintaining a CLI :/

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