Skip to content

Commit 0a76283

Browse files
zadjii-msftDHowett
authored andcommitted
Add an ENUM setting for disabling rendering "intense" text as bold (#10759)
This adds a new setting `intenseTextStyle`. It's a per-appearance, control setting, defaulting to `"all"`. * When set to `"all"` or `["bold", "bright"]`, then we'll render text as both **bold** and bright (1.10 behavior) * When set to `"bold"`, `["bold"]`, we'll render text formatted with `^[[1m` as **bold**, but not bright * When set to `"bright"`, `["bright"]`, we'll render text formatted with `^[[1m` as bright, but not bold. This is the pre 1.10 behavior * When set to `"none"`, we won't do anything special for it at all. * I last did this in #10648. This time it's an enum, so we can add bright in the future. It's got positive wording this time. * ~We will want to add `"bright"` as a value in the future, to disable the auto intense->bright conversion.~ I just did that now. * #5682 is related * [x] Closes #10576 * [x] I seriously don't think we have an issue for "disable intense is bright", but I'm not crazy, people wanted that, right? #2916 (comment) was the closest * [x] I work here * [x] Tests added/passed * [x] MicrosoftDocs/terminal#381 <!-- ![image](https://user-images.githubusercontent.com/18356694/125480327-07f6b711-6bca-4c1b-9a76-75fc978c702d.png) --> ![image](https://user-images.githubusercontent.com/18356694/128929228-504933ee-cf50-43a2-9982-55110ba39191.png) Yea that works. Printed some bold text, toggled it on, the text was no longer bold. hooray. ```json "intenseTextStyle": "none", "intenseTextStyle": "bold", "intenseTextStyle": "bright", "intenseTextStyle": "all", "intenseTextStyle": ["bold", "bright"], ``` all work now. Repro script: ```sh printf "\e[1m[bold]\e[m[normal]\e[34m[blue]\e[1m[bold blue]\e[m\n" ```
1 parent 1d090d6 commit 0a76283

29 files changed

+208
-8
lines changed

doc/cascadia/profiles.schema.json

+11
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,17 @@
154154
"description": "Sets how the background image aligns to the boundaries of the window when unfocused. Possible values: \"center\", \"left\", \"top\", \"right\", \"bottom\", \"topLeft\", \"topRight\", \"bottomLeft\", \"bottomRight\"",
155155
"type": "string"
156156
},
157+
"intenseTextStyle": {
158+
"default": "all",
159+
"description": "Controls how 'intense' text is rendered. Values are \"bold\", \"bright\", \"all\" and \"none\"",
160+
"enum": [
161+
"none",
162+
"bold",
163+
"bright",
164+
"all"
165+
],
166+
"type": "string"
167+
},
157168
"experimental.retroTerminalEffect": {
158169
"description": "When set to true, enable retro terminal effects when unfocused. This is an experimental feature, and its continued existence is not guaranteed.",
159170
"type": "boolean"

src/buffer/out/TextAttribute.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,18 @@ bool TextAttribute::IsLegacy() const noexcept
9595
// - defaultFgColor: the default foreground color rgb value.
9696
// - defaultBgColor: the default background color rgb value.
9797
// - reverseScreenMode: true if the screen mode is reversed.
98-
// - blinkingIsFaint: true if blinking should be interpreted as faint.
98+
// - blinkingIsFaint: true if blinking should be interpreted as faint. (defaults to false)
99+
// - boldIsBright: true if "bold" should be interpreted as bright. (defaults to true)
99100
// Return Value:
100101
// - the foreground and background colors that should be displayed.
101102
std::pair<COLORREF, COLORREF> TextAttribute::CalculateRgbColors(const gsl::span<const COLORREF> colorTable,
102103
const COLORREF defaultFgColor,
103104
const COLORREF defaultBgColor,
104105
const bool reverseScreenMode,
105-
const bool blinkingIsFaint) const noexcept
106+
const bool blinkingIsFaint,
107+
const bool boldIsBright) const noexcept
106108
{
107-
auto fg = _foreground.GetColor(colorTable, defaultFgColor, IsBold());
109+
auto fg = _foreground.GetColor(colorTable, defaultFgColor, boldIsBright && IsBold());
108110
auto bg = _background.GetColor(colorTable, defaultBgColor);
109111
if (IsFaint() || (IsBlinking() && blinkingIsFaint))
110112
{

src/buffer/out/TextAttribute.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class TextAttribute final
6868
const COLORREF defaultFgColor,
6969
const COLORREF defaultBgColor,
7070
const bool reverseScreenMode = false,
71-
const bool blinkingIsFaint = false) const noexcept;
71+
const bool blinkingIsFaint = false,
72+
const bool boldIsBright = true) const noexcept;
7273

7374
bool IsLeadingByte() const noexcept;
7475
bool IsTrailingByte() const noexcept;

src/buffer/out/ut_textbuffer/TextAttributeTests.cpp

+54
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TextAttributeTests
2222
TEST_METHOD(TestTextAttributeColorGetters);
2323
TEST_METHOD(TestReverseDefaultColors);
2424
TEST_METHOD(TestRoundtripDefaultColors);
25+
TEST_METHOD(TestBoldAsBright);
2526

2627
static const int COLOR_TABLE_SIZE = 16;
2728
COLORREF _colorTable[COLOR_TABLE_SIZE];
@@ -272,3 +273,56 @@ void TextAttributeTests::TestRoundtripDefaultColors()
272273
// Reset the legacy default colors to white on black.
273274
TextAttribute::SetLegacyDefaultAttributes(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
274275
}
276+
277+
void TextAttributeTests::TestBoldAsBright()
278+
{
279+
const COLORREF darkBlack = til::at(_colorTable, 0);
280+
const COLORREF brightBlack = til::at(_colorTable, 8);
281+
const COLORREF darkGreen = til::at(_colorTable, 2);
282+
283+
TextAttribute attr{};
284+
285+
// verify that calculated foreground/background are the same as the direct
286+
// values when not bold
287+
VERIFY_IS_FALSE(attr.IsBold());
288+
289+
VERIFY_ARE_EQUAL(_defaultFg, attr.GetForeground().GetColor(_colorTable, _defaultFg));
290+
VERIFY_ARE_EQUAL(_defaultBg, attr.GetBackground().GetColor(_colorTable, _defaultBg));
291+
VERIFY_ARE_EQUAL(std::make_pair(_defaultFg, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
292+
VERIFY_ARE_EQUAL(std::make_pair(_defaultFg, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
293+
294+
// with bold set, calculated foreground/background values shouldn't change for the default colors.
295+
attr.SetBold(true);
296+
VERIFY_IS_TRUE(attr.IsBold());
297+
VERIFY_ARE_EQUAL(std::make_pair(_defaultFg, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
298+
VERIFY_ARE_EQUAL(std::make_pair(_defaultFg, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
299+
300+
attr.SetIndexedForeground(0);
301+
VERIFY_IS_TRUE(attr.IsBold());
302+
303+
Log::Comment(L"Foreground should be bright black when bold is bright is enabled");
304+
VERIFY_ARE_EQUAL(std::make_pair(brightBlack, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
305+
306+
Log::Comment(L"Foreground should be dark black when bold is bright is disabled");
307+
VERIFY_ARE_EQUAL(std::make_pair(darkBlack, _defaultBg), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
308+
309+
attr.SetIndexedBackground(2);
310+
VERIFY_IS_TRUE(attr.IsBold());
311+
312+
Log::Comment(L"background should be unaffected by 'bold is bright'");
313+
VERIFY_ARE_EQUAL(std::make_pair(brightBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
314+
VERIFY_ARE_EQUAL(std::make_pair(darkBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
315+
316+
attr.SetBold(false);
317+
VERIFY_IS_FALSE(attr.IsBold());
318+
Log::Comment(L"when not bold, 'bold is bright' changes nothing");
319+
VERIFY_ARE_EQUAL(std::make_pair(darkBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
320+
VERIFY_ARE_EQUAL(std::make_pair(darkBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
321+
322+
Log::Comment(L"When set to a bright color, and bold, 'bold is bright' changes nothing");
323+
attr.SetBold(true);
324+
attr.SetIndexedForeground(8);
325+
VERIFY_IS_TRUE(attr.IsBold());
326+
VERIFY_ARE_EQUAL(std::make_pair(brightBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, true));
327+
VERIFY_ARE_EQUAL(std::make_pair(brightBlack, darkGreen), attr.CalculateRgbColors(_colorTable, _defaultFg, _defaultBg, false, false, false));
328+
}

src/cascadia/TerminalControl/ControlCore.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
198198
dxEngine->SetPixelShaderPath(_settings.PixelShaderPath());
199199
dxEngine->SetForceFullRepaintRendering(_settings.ForceFullRepaintRendering());
200200
dxEngine->SetSoftwareRendering(_settings.SoftwareRendering());
201+
dxEngine->SetIntenseIsBold(_settings.IntenseIsBold());
201202

202203
_updateAntiAliasingMode(dxEngine.get());
203204

@@ -526,6 +527,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
526527

527528
_renderEngine->SetForceFullRepaintRendering(_settings.ForceFullRepaintRendering());
528529
_renderEngine->SetSoftwareRendering(_settings.SoftwareRendering());
530+
529531
_updateAntiAliasingMode(_renderEngine.get());
530532

531533
// Refresh our font with the renderer
@@ -555,6 +557,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
555557
_renderEngine->SetSelectionBackground(til::color{ newAppearance.SelectionBackground() });
556558
_renderEngine->SetRetroTerminalEffect(newAppearance.RetroTerminalEffect());
557559
_renderEngine->SetPixelShaderPath(newAppearance.PixelShaderPath());
560+
_renderEngine->SetIntenseIsBold(_settings.IntenseIsBold());
558561
_renderer->TriggerRedrawAll();
559562
}
560563
}

src/cascadia/TerminalControl/IControlAppearance.idl

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace Microsoft.Terminal.Control
1111
Windows.UI.Xaml.Media.Stretch BackgroundImageStretchMode;
1212
Windows.UI.Xaml.HorizontalAlignment BackgroundImageHorizontalAlignment;
1313
Windows.UI.Xaml.VerticalAlignment BackgroundImageVerticalAlignment;
14+
Boolean IntenseIsBold;
15+
// IntenseIsBright is in Core Appearance
1416

1517
// Experimental settings
1618
Boolean RetroTerminalEffect;

src/cascadia/TerminalCore/ICoreAppearance.idl

+1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ namespace Microsoft.Terminal.Core
3939
Microsoft.Terminal.Core.Color CursorColor;
4040
CursorStyle CursorShape;
4141
UInt32 CursorHeight;
42+
Boolean IntenseIsBright;
4243
};
4344
}

src/cascadia/TerminalCore/Terminal.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Terminal::Terminal() :
5252
_selection{ std::nullopt },
5353
_taskbarState{ 0 },
5454
_taskbarProgress{ 0 },
55-
_trimBlockSelection{ false }
55+
_trimBlockSelection{ false },
56+
_intenseIsBright{ true }
5657
{
5758
auto dispatch = std::make_unique<TerminalDispatch>(*this);
5859
auto engine = std::make_unique<OutputStateMachineEngine>(std::move(dispatch));
@@ -173,6 +174,7 @@ void Terminal::UpdateAppearance(const ICoreAppearance& appearance)
173174
til::color newBackgroundColor{ appearance.DefaultBackground() };
174175
_defaultBg = newBackgroundColor.with_alpha(0);
175176
_defaultFg = appearance.DefaultForeground();
177+
_intenseIsBright = appearance.IntenseIsBright();
176178

177179
for (int i = 0; i < 16; i++)
178180
{

src/cascadia/TerminalCore/Terminal.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ class Microsoft::Terminal::Core::Terminal final :
271271
bool _suppressApplicationTitle;
272272
bool _bracketedPasteMode;
273273
bool _trimBlockSelection;
274+
bool _intenseIsBright;
274275

275276
size_t _taskbarState;
276277
size_t _taskbarProgress;

src/cascadia/TerminalCore/terminalrenderdata.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ std::pair<COLORREF, COLORREF> Terminal::GetAttributeColors(const TextAttribute&
4949
_defaultFg,
5050
_defaultBg,
5151
_screenReversed,
52-
_blinkingState.IsBlinkingFaint());
52+
_blinkingState.IsBlinkingFaint(),
53+
_intenseIsBright);
5354
colors.first |= 0xff000000;
5455
// We only care about alpha for the default BG (which enables acrylic)
5556
// If the bg isn't the default bg color, or reverse video is enabled, make it fully opaque.

src/cascadia/TerminalSettingsEditor/Appearances.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
131131

132132
const auto backgroundImgCheckboxTooltip{ ToolTipService::GetToolTip(UseDesktopImageCheckBox()) };
133133
Automation::AutomationProperties::SetFullDescription(UseDesktopImageCheckBox(), unbox_value<hstring>(backgroundImgCheckboxTooltip));
134+
135+
INITIALIZE_BINDABLE_ENUM_SETTING(IntenseTextStyle, IntenseTextStyle, winrt::Microsoft::Terminal::Settings::Model::IntenseStyle, L"Appearance_IntenseTextStyle", L"Content");
134136
}
135137

136138
// Method Description:
@@ -256,6 +258,24 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
256258
_PropertyChangedHandlers(*this, PropertyChangedEventArgs{ L"ShowAllFonts" });
257259
_PropertyChangedHandlers(*this, PropertyChangedEventArgs{ L"UsingMonospaceFont" });
258260
}
261+
else if (settingName == L"IntenseTextStyle")
262+
{
263+
_PropertyChangedHandlers(*this, PropertyChangedEventArgs{ L"CurrentIntenseTextStyle" });
264+
}
265+
// YOU THERE ADDING A NEW APPEARANCE SETTING
266+
// Make sure you add a block like
267+
//
268+
// else if (settingName == L"MyNewSetting")
269+
// {
270+
// _PropertyChangedHandlers(*this, PropertyChangedEventArgs{ L"CurrentMyNewSetting" });
271+
// }
272+
//
273+
// To make sure that changes to the AppearanceViewModel will
274+
// propagate back up to the actual UI (in Appearances). The
275+
// CurrentMyNewSetting properties are the ones that are bound in
276+
// XAML. If you don't do this right (or only raise a property
277+
// changed for "MyNewSetting"), then things like the reset
278+
// button won't work right.
259279
});
260280
}
261281
}

src/cascadia/TerminalSettingsEditor/Appearances.h

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
7878
OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageOpacity);
7979
OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageStretchMode);
8080
OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageAlignment);
81+
OBSERVABLE_PROJECTED_SETTING(_appearance, IntenseTextStyle);
8182

8283
private:
8384
Model::AppearanceConfig _appearance;
@@ -122,6 +123,8 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
122123

123124
GETSET_BINDABLE_ENUM_SETTING(BackgroundImageStretchMode, Windows::UI::Xaml::Media::Stretch, Appearance, BackgroundImageStretchMode);
124125

126+
GETSET_BINDABLE_ENUM_SETTING(IntenseTextStyle, Microsoft::Terminal::Settings::Model::IntenseStyle, Appearance, IntenseTextStyle);
127+
125128
private:
126129
bool _ShowAllFonts;
127130
void _UpdateBIAlignmentControl(const int32_t val);

src/cascadia/TerminalSettingsEditor/Appearances.idl

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace Microsoft.Terminal.Settings.Editor
3939
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Double, BackgroundImageOpacity);
4040
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Windows.UI.Xaml.Media.Stretch, BackgroundImageStretchMode);
4141
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Microsoft.Terminal.Settings.Model.ConvergedAlignment, BackgroundImageAlignment);
42+
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Microsoft.Terminal.Settings.Model.IntenseStyle, IntenseTextStyle);
4243
}
4344

4445
[default_interface] runtimeclass Appearances : Windows.UI.Xaml.Controls.UserControl, Windows.UI.Xaml.Data.INotifyPropertyChanged
@@ -66,5 +67,8 @@ namespace Microsoft.Terminal.Settings.Editor
6667
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> FontWeightList { get; };
6768

6869
IInspectable CurrentFontFace { get; };
70+
71+
IInspectable CurrentIntenseTextStyle;
72+
Windows.Foundation.Collections.IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> IntenseTextStyleList { get; };
6973
}
7074
}

src/cascadia/TerminalSettingsEditor/Appearances.xaml

+18
Original file line numberDiff line numberDiff line change
@@ -435,5 +435,23 @@
435435
</Grid>
436436
</local:SettingContainer>
437437
</StackPanel>
438+
439+
<!-- Grouping: Text Formatting -->
440+
<StackPanel Style="{StaticResource PivotStackStyle}">
441+
<TextBlock x:Uid="Appearance_TextFormattingHeader"
442+
Style="{StaticResource SubtitleTextBlockStyle}" />
443+
444+
<!-- Intense is bold, bright -->
445+
<local:SettingContainer x:Uid="Appearance_IntenseTextStyle"
446+
Margin="0"
447+
ClearSettingValue="{x:Bind Appearance.ClearIntenseTextStyle}"
448+
HasSettingValue="{x:Bind Appearance.HasIntenseTextStyle, Mode=OneWay}"
449+
SettingOverrideSource="{x:Bind Appearance.IntenseTextStyleOverrideSource, Mode=OneWay}">
450+
<muxc:RadioButtons ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
451+
ItemsSource="{x:Bind IntenseTextStyleList, Mode=OneWay}"
452+
SelectedItem="{x:Bind CurrentIntenseTextStyle, Mode=TwoWay}" />
453+
</local:SettingContainer>
454+
</StackPanel>
455+
438456
</StackPanel>
439457
</UserControl>

src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw

+25-1
Original file line numberDiff line numberDiff line change
@@ -1158,4 +1158,28 @@
11581158
<value>Add new</value>
11591159
<comment>Button label that creates a new action on the actions page.</comment>
11601160
</data>
1161-
</root>
1161+
<data name="Appearance_TextFormattingHeader.Text" xml:space="preserve">
1162+
<value>Text Formatting</value>
1163+
<comment>Header for a control to how text is formatted</comment>
1164+
</data>
1165+
<data name="Appearance_IntenseTextStyle.Header" xml:space="preserve">
1166+
<value>Intense Text Format</value>
1167+
<comment>Header for a control to select how "intense" text is formatted (bold, bright, both or none)</comment>
1168+
</data>
1169+
<data name="Appearance_IntenseTextStyleNone.Content" xml:space="preserve">
1170+
<value>None</value>
1171+
<comment>An option to choose from for the "intense text format" setting. When selected, "intense" text will not be rendered differently</comment>
1172+
</data>
1173+
<data name="Appearance_IntenseTextStyleBold.Content" xml:space="preserve">
1174+
<value>Bold</value>
1175+
<comment>An option to choose from for the "intense text format" setting. When selected, "intense" text will be rendered as bold text</comment>
1176+
</data>
1177+
<data name="Appearance_IntenseTextStyleBright.Content" xml:space="preserve">
1178+
<value>Bright</value>
1179+
<comment>An option to choose from for the "intense text format" setting. When selected, "intense" text will be rendered in a brighter color</comment>
1180+
</data>
1181+
<data name="Appearance_IntenseTextStyleAll.Content" xml:space="preserve">
1182+
<value>Both</value>
1183+
<comment>An option to choose from for the "intense text format" setting. When selected, "intense" text will be rendered as both bold text and in a brighter color</comment>
1184+
</data>
1185+
</root>

src/cascadia/TerminalSettingsModel/AppearanceConfig.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static constexpr std::string_view BackgroundImageStretchModeKey{ "backgroundImag
2525
static constexpr std::string_view BackgroundImageAlignmentKey{ "backgroundImageAlignment" };
2626
static constexpr std::string_view RetroTerminalEffectKey{ "experimental.retroTerminalEffect" };
2727
static constexpr std::string_view PixelShaderPathKey{ "experimental.pixelShaderPath" };
28+
static constexpr std::string_view IntenseTextStyleKey{ "intenseTextStyle" };
2829

2930
winrt::Microsoft::Terminal::Settings::Model::implementation::AppearanceConfig::AppearanceConfig(const winrt::weak_ref<Profile> sourceProfile) :
3031
_sourceProfile(sourceProfile)
@@ -48,6 +49,7 @@ winrt::com_ptr<AppearanceConfig> AppearanceConfig::CopyAppearance(const winrt::c
4849
appearance->_BackgroundImageAlignment = sourceAppearance->_BackgroundImageAlignment;
4950
appearance->_RetroTerminalEffect = sourceAppearance->_RetroTerminalEffect;
5051
appearance->_PixelShaderPath = sourceAppearance->_PixelShaderPath;
52+
appearance->_IntenseTextStyle = sourceAppearance->_IntenseTextStyle;
5153
return appearance;
5254
}
5355

@@ -68,6 +70,7 @@ Json::Value AppearanceConfig::ToJson() const
6870
JsonUtils::SetValueForKey(json, BackgroundImageAlignmentKey, _BackgroundImageAlignment);
6971
JsonUtils::SetValueForKey(json, RetroTerminalEffectKey, _RetroTerminalEffect);
7072
JsonUtils::SetValueForKey(json, PixelShaderPathKey, _PixelShaderPath);
73+
JsonUtils::SetValueForKey(json, IntenseTextStyleKey, _IntenseTextStyle);
7174

7275
return json;
7376
}
@@ -98,6 +101,7 @@ void AppearanceConfig::LayerJson(const Json::Value& json)
98101
JsonUtils::GetValueForKey(json, BackgroundImageAlignmentKey, _BackgroundImageAlignment);
99102
JsonUtils::GetValueForKey(json, RetroTerminalEffectKey, _RetroTerminalEffect);
100103
JsonUtils::GetValueForKey(json, PixelShaderPathKey, _PixelShaderPath);
104+
JsonUtils::GetValueForKey(json, IntenseTextStyleKey, _IntenseTextStyle);
101105
}
102106

103107
winrt::Microsoft::Terminal::Settings::Model::Profile AppearanceConfig::SourceProfile()

src/cascadia/TerminalSettingsModel/AppearanceConfig.h

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
5252

5353
INHERITABLE_SETTING(Model::IAppearanceConfig, bool, RetroTerminalEffect, false);
5454
INHERITABLE_SETTING(Model::IAppearanceConfig, hstring, PixelShaderPath, L"");
55+
INHERITABLE_SETTING(Model::IAppearanceConfig, Model::IntenseStyle, IntenseTextStyle, Model::IntenseStyle::All);
5556

5657
private:
5758
winrt::weak_ref<Profile> _sourceProfile;

0 commit comments

Comments
 (0)