From 941ca18de02fb20ab2ba64ff7510185603d4ddee Mon Sep 17 00:00:00 2001 From: cinnamon-msft Date: Wed, 25 Mar 2020 13:59:18 -0700 Subject: [PATCH 1/2] set Cascadia Code as default font --- doc/cascadia/SettingsSchema.md | 2 +- doc/cascadia/profiles.schema.json | 2 +- src/cascadia/TerminalApp/defaults-universal.json | 1 + src/cascadia/TerminalApp/defaults.json | 4 ++-- src/inc/DefaultSettings.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/cascadia/SettingsSchema.md b/doc/cascadia/SettingsSchema.md index 8b05a1767fb..0ab6b9665a4 100644 --- a/doc/cascadia/SettingsSchema.md +++ b/doc/cascadia/SettingsSchema.md @@ -42,7 +42,7 @@ Properties listed below are specific to each unique profile. | `cursorColor` | Optional | String | | Sets the cursor color of the profile. Overrides `cursorColor` set in color scheme if `colorscheme` is set. Uses hex color format: `"#rrggbb"`. | | `cursorHeight` | Optional | Integer | | Sets the percentage height of the cursor starting from the bottom. Only works when `cursorShape` is set to `"vintage"`. Accepts values from 25-100. | | `cursorShape` | Optional | String | `bar` | Sets the cursor shape for the profile. Possible values: `"vintage"` ( ▃ ), `"bar"` ( ┃ ), `"underscore"` ( ▁ ), `"filledBox"` ( █ ), `"emptyBox"` ( ▯ ) | -| `fontFace` | Optional | String | `Consolas` | Name of the font face used in the profile. We will try to fallback to Consolas if this can't be found or is invalid. | +| `fontFace` | Optional | String | `Cascadia Code` | Name of the font face used in the profile. We will try to fallback to Consolas if this can't be found or is invalid. | | `fontSize` | Optional | Integer | `12` | Sets the font size. | | `foreground` | Optional | String | | Sets the foreground color of the profile. Overrides `foreground` set in color scheme if `colorscheme` is set. Uses hex color format: `#rgb` or `"#rrggbb"`. | | `hidden` | Optional | Boolean | `false` | If set to true, the profile will not appear in the list of profiles. This can be used to hide default profiles and dynamically generated profiles, while leaving them in your settings file. | diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index aede7094ec2..50b3deab2ce 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -580,7 +580,7 @@ "type": "boolean" }, "fontFace": { - "default": "Consolas", + "default": "Cascadia Code", "description": "Name of the font face used in the profile.", "type": "string" }, diff --git a/src/cascadia/TerminalApp/defaults-universal.json b/src/cascadia/TerminalApp/defaults-universal.json index 3098d7a696b..6eee772121e 100644 --- a/src/cascadia/TerminalApp/defaults-universal.json +++ b/src/cascadia/TerminalApp/defaults-universal.json @@ -22,6 +22,7 @@ "colorScheme": "Vintage", "cursorColor": "#FFFFFF", "cursorShape": "bar", + "fontFace": "Cascadia Code", "icon": "ms-appx:///ProfileIcons/{550ce7b8-d500-50ad-8a1a-c400c3262db3}.png", "padding": "8, 8, 8, 8", "snapOnInput": true, diff --git a/src/cascadia/TerminalApp/defaults.json b/src/cascadia/TerminalApp/defaults.json index 91dfd4d2403..8edc7c1b3e4 100644 --- a/src/cascadia/TerminalApp/defaults.json +++ b/src/cascadia/TerminalApp/defaults.json @@ -23,7 +23,7 @@ "closeOnExit": "graceful", "colorScheme": "Campbell Powershell", "cursorShape": "bar", - "fontFace": "Consolas", + "fontFace": "Cascadia Code", "fontSize": 12, "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{61c54bbd-c2c6-5271-96e7-009a87ff44bf}.png", @@ -41,7 +41,7 @@ "closeOnExit": "graceful", "colorScheme": "Campbell", "cursorShape": "bar", - "fontFace": "Consolas", + "fontFace": "Cascadia Code", "fontSize": 12, "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", diff --git a/src/inc/DefaultSettings.h b/src/inc/DefaultSettings.h index 91861bf89cc..c152545611a 100644 --- a/src/inc/DefaultSettings.h +++ b/src/inc/DefaultSettings.h @@ -30,7 +30,7 @@ constexpr short DEFAULT_HISTORY_SIZE = 9001; #pragma warning(push) #pragma warning(disable : 26426) // TODO GH 2674, don't disable this warning, move to std::wstring_view or something like that. -const std::wstring DEFAULT_FONT_FACE{ L"Consolas" }; +const std::wstring DEFAULT_FONT_FACE{ L"Cascadia Code" }; constexpr int DEFAULT_FONT_SIZE = 12; constexpr int DEFAULT_ROWS = 30; From 5a28c9108f5c411a66b2b9e39f03ae8b8caaaaec Mon Sep 17 00:00:00 2001 From: cinnamon-msft Date: Wed, 25 Mar 2020 14:16:14 -0700 Subject: [PATCH 2/2] keep hwndTerminal as Consolas --- src/cascadia/PublicTerminalCore/HwndTerminal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cascadia/PublicTerminalCore/HwndTerminal.cpp b/src/cascadia/PublicTerminalCore/HwndTerminal.cpp index 74e1e44643f..995f7ce978b 100644 --- a/src/cascadia/PublicTerminalCore/HwndTerminal.cpp +++ b/src/cascadia/PublicTerminalCore/HwndTerminal.cpp @@ -89,8 +89,8 @@ static bool RegisterTermClass(HINSTANCE hInstance) noexcept } HwndTerminal::HwndTerminal(HWND parentHwnd) : - _desiredFont{ DEFAULT_FONT_FACE, 0, 10, { 0, 14 }, CP_UTF8 }, - _actualFont{ DEFAULT_FONT_FACE, 0, 10, { 0, 14 }, CP_UTF8, false }, + _desiredFont{ L"Consolas", 0, 10, { 0, 14 }, CP_UTF8 }, + _actualFont{ L"Consolas", 0, 10, { 0, 14 }, CP_UTF8, false }, _uiaProvider{ nullptr }, _uiaProviderInitialized{ false }, _currentDpi{ USER_DEFAULT_SCREEN_DPI },