Rename TextAttribute::IsBold to TextAttribute::IsIntense #16502

Closed
opened 2026-01-31 05:14:04 +00:00 by claunia · 4 comments
Owner

Originally created by @j4james on GitHub (Jan 25, 2022).

Description of the new feature/enhancement

When we added support for controlling the rendering of the SGR 1 attribute, we referred to it as "intense", so we have options like IntenseIsBold and IntenseIsBright. However, internally we refer to SGR 1 as "bold", with the TextAttribute methods SetBold and IsBold. This results in awkward expressions like this:

e3aa9ff7a8/src/renderer/dx/DxRenderer.cpp (L1965)

It's not a big deal, but I think the code would make a lot more sense as:

useBoldFont = textAttributes.IsIntense() && renderSettings.GetRenderMode(RenderSettings::Mode::IntenseIsBold);

Similarly, when handling the IntenseIsBright mode, instead of this:

f605adc994/src/renderer/base/RenderSettings.cpp (L183)

we'd have this:

brightenFg = attr.IsIntense() && GetRenderMode(Mode::IntenseIsBright);

Proposed technical implementation details (optional)

Rename the Bold option in the ExtendedAttributes enum to Intense, the SetBold and IsBold methods in the TextAttribute class to SetIntense and IsIntense. There will probably also be a few more variables and methods in other places that needed to be updated to match.

Originally created by @j4james on GitHub (Jan 25, 2022). # Description of the new feature/enhancement When we added support for controlling the rendering of the `SGR 1` attribute, we referred to it as "intense", so we have options like `IntenseIsBold` and `IntenseIsBright`. However, internally we refer to `SGR 1` as "bold", with the `TextAttribute` methods `SetBold` and `IsBold`. This results in awkward expressions like this: https://github.com/microsoft/terminal/blob/e3aa9ff7a84cdef801591913b002a8a904168e22/src/renderer/dx/DxRenderer.cpp#L1965 It's not a big deal, but I think the code would make a lot more sense as: useBoldFont = textAttributes.IsIntense() && renderSettings.GetRenderMode(RenderSettings::Mode::IntenseIsBold); Similarly, when handling the `IntenseIsBright` mode, instead of this: https://github.com/microsoft/terminal/blob/f605adc994c7c7cf06b0c83169b54ead62238f23/src/renderer/base/RenderSettings.cpp#L183 we'd have this: brightenFg = attr.IsIntense() && GetRenderMode(Mode::IntenseIsBright); # Proposed technical implementation details (optional) Rename the `Bold` option in the `ExtendedAttributes` enum to `Intense`, the `SetBold` and `IsBold` methods in the `TextAttribute` class to `SetIntense` and `IsIntense`. There will probably also be a few more variables and methods in other places that needed to be updated to match.
Author
Owner

@lhecker commented on GitHub (Jan 25, 2022):

I find "bold" a lot easier to grasp than the more abstract term "intense", since nowadays CRT displays are kinda rare and we don't have the capability to make LCD "rays" more "intense". 😅 But I still find this suggestion good, because it makes things more consistent.

@lhecker commented on GitHub (Jan 25, 2022): I find "bold" a lot easier to grasp than the more abstract term "intense", since nowadays CRT displays are kinda rare and we don't have the capability to make LCD "rays" more "intense". 😅 But I still find this suggestion good, because it makes things more consistent.
Author
Owner

@j4james commented on GitHub (Jan 26, 2022):

I find "bold" a lot easier to grasp than the more abstract term "intense"

Yeah, me too, but that is the terminology that was ultimately decided on, and I've kind of got used to it now. Whatever term we use, though, I would like it to be consistent.

@j4james commented on GitHub (Jan 26, 2022): > I find "bold" a lot easier to grasp than the more abstract term "intense" Yeah, me too, but that is the terminology that was ultimately decided on, and I've kind of got used to it now. Whatever term we use, though, I would like it to be consistent.
Author
Owner

@zadjii-msft commented on GitHub (Jan 26, 2022):

Yea I'm 100% for this. Clear up the ambiguity. At least "intense" makes a person think "what does intense mean?" which will lead them to IntenseIsBright, IntenseIsBold. Go for it ☺️

@zadjii-msft commented on GitHub (Jan 26, 2022): Yea I'm 100% for this. Clear up the ambiguity. At least "intense" makes a person think "what does _intense_ mean?" which will lead them to IntenseIsBright, IntenseIsBold. Go for it ☺️
Author
Owner

@ghost commented on GitHub (Feb 3, 2022):

:tada:This issue was addressed in #12270, which has now been successfully released as Windows Terminal Preview v1.13.10336.0.🎉

Handy links:

@ghost commented on GitHub (Feb 3, 2022): :tada:This issue was addressed in #12270, which has now been successfully released as `Windows Terminal Preview v1.13.10336.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.13.10336.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16502