microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.2k stars 28.86k forks source link

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

Open OzelotVanilla opened 1 year ago

OzelotVanilla commented 1 year ago

Basic Information:

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

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 commented 1 year ago

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

Tyriar commented 1 year ago

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

OzelotVanilla commented 1 year ago

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 commented 1 year ago

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

VSCodeTriageBot commented 1 year ago

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!