Skip to content

Commit

Permalink
Set Cascadia Code as default font (#5121)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Changes default font from Consolas to Cascadia Code.

## PR Checklist
* [x] Closes #4943 
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Validation Steps Performed
I deleted my profiles.json and built from source. All profiles appeared in Cascadia Code.
  • Loading branch information
cinnamon-msft authored Mar 25, 2020
1 parent 499f24a commit d193c7e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/cascadia/SettingsSchema.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
2 changes: 1 addition & 1 deletion doc/cascadia/profiles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@
"type": "boolean"
},
"fontFace": {
"default": "Consolas",
"default": "Cascadia Code",
"description": "Name of the font face used in the profile.",
"type": "string"
},
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/PublicTerminalCore/HwndTerminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/defaults-universal.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalApp/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/inc/DefaultSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit d193c7e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • clickdown
  • defterm
  • INLINEPREFIX
  • Inplace
  • kimwalisch
  • libpopcnt
  • msys
  • pinam
  • powf
  • SOURCESDIRECTORY
  • SPACEBAR
  • sqrtf
  • tdbuildteamid
  • Walisch
  • Wojciech
To accept these changes, run the following commands
(
echo "
clickdown
defterm
INLINEPREFIX
Inplace
kimwalisch
libpopcnt
msys
pinam
powf
SOURCESDIRECTORY
SPACEBAR
sqrtf
tdbuildteamid
Walisch
Wojciech
"
) | sort -u -f | perl -ne 'next unless /./; print' > new_whitelist.txt && mv new_whitelist.txt '.github/actions/spell-check/whitelist/d193c7ee7cdde50cc7f33f684848b776ba509652.txt'

Please sign in to comment.