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

Terminal implemented ANSI "bold" as "faint colour with bold" #176931

Closed
OzelotVanilla opened this issue Mar 13, 2023 · 6 comments
Closed

Terminal implemented ANSI "bold" as "faint colour with bold" #176931

OzelotVanilla opened this issue Mar 13, 2023 · 6 comments
Assignees
Labels
confirmation-pending *duplicate Issue identified as a duplicate of another issue(s) help wanted Issues identified as good community contribution opportunities terminal-rendering
Milestone

Comments

@OzelotVanilla
Copy link

Basic Information:

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.76.1
  • OS Version: Windows 10 (19045.2604)

Bug Description:

VSCode is implement SGR 1 as fainted colour with bold font, but not purely bold font,
while SGR 2 (faint) is not implemented.

The picture below shows a comparison for VSCode terminal and Windows Terminal PowerShell.
(Left: VSCode, Right: Windows Terminal)
image

Steps to Reproduce:

  1. Write a program that output ANSI sequence effect.
for i in range(1, 3):
    print(f"ANSI \e[{i}m: \033[{i}mText\033[0m")
@OzelotVanilla
Copy link
Author

In Ubuntu (WSL), it is correctly implemented:
image

@Tyriar
Copy link
Member

Tyriar commented Mar 13, 2023

Does changing terminal.integrated.drawBoldTextInBrightColors give you the expected behavior?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Mar 13, 2023
@OzelotVanilla
Copy link
Author

It seems not working on my computer.
I set the value to false, restart VSCode, and re-run that program, it is still the effect showed before.
I also tried VSCode Insider, not worked there, also.

If it is possible, I want to ask if there is any chance you show me the code which implement these part, or the detailed documentation about that. If possible, I also want to contribute to make the terminal support more ANSI escape sequence.

@Tyriar
Copy link
Member

Tyriar commented Mar 14, 2023

Searching the xterm.js codebase for isBold will show you the usages. For rendering there are 3 renderers which use it:

@Tyriar Tyriar added help wanted Issues identified as good community contribution opportunities confirmation-pending terminal-rendering labels Mar 14, 2023
@Tyriar Tyriar added this to the Backlog milestone Mar 14, 2023
@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
@Tyriar Tyriar reopened this Mar 22, 2023
@Tyriar Tyriar removed the info-needed Issue requires more information from poster label Mar 22, 2023
@Tyriar
Copy link
Member

Tyriar commented Dec 10, 2024

This is all working as designed AFAIK. We have the terminal.integrated.drawBoldTextInBrightColors setting to tweak the colors to be similar to other terminal emulators. Conpty on Windows could also be causing problems translating sequences which will improve with conpty v2 #224488

/duplicate

@Tyriar Tyriar closed this as completed Dec 10, 2024
@vs-code-engineering vs-code-engineering bot added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmation-pending *duplicate Issue identified as a duplicate of another issue(s) help wanted Issues identified as good community contribution opportunities terminal-rendering
Projects
None yet
Development

No branches or pull requests

3 participants