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 italic style in printstyled. #45164

Merged
merged 1 commit into from Feb 13, 2023
Merged

Support italic style in printstyled. #45164

merged 1 commit into from Feb 13, 2023

Conversation

fredrikekre
Copy link
Member

No description provided.

@fredrikekre fredrikekre added the display and printing Aesthetics and correctness of printed representations of objects. label May 3, 2022
NEWS.md Outdated Show resolved Hide resolved
@KristofferC KristofferC added the merge me PR is reviewed. Merge when all tests are passing label May 9, 2022
Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did not include this because it does not reliably make it italic, except on monochrome monitors. On color monitors, it may invert the colorscheme instead:

macOS Terminal running tmux:
image

macOS Terminal not running tmux:
image

https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters

@vtjnash vtjnash removed the merge me PR is reviewed. Merge when all tests are passing label May 9, 2022
@vtjnash
Copy link
Sponsor Member

vtjnash commented May 9, 2022

Note that even this support might be quite recent, since people were writing blogs about it not working within the past few years: https://weibeld.net/terminals-and-shells/italics.html

@fredrikekre
Copy link
Member Author

Rebased. I included a note about terminal support in the docstring.

@vtjnash vtjnash merged commit 488ec2c into master Feb 13, 2023
@vtjnash vtjnash deleted the fe/italic branch February 13, 2023 21:20
@tecosaur
Copy link
Contributor

It's worth noting (and I think short of the docs a comment here has a chance of being seen at least) that italic support can be checked for in terminfo, and so the best practice would be adapting the printing behavior based on the terminal capabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants