正确配置 Windows 的默认控制台窗口以修复有限的默认回滚

问题描述

我正在安装 Git,我必须选择我的 Git bash 使用哪个终端模拟器。我必须在 Windows 的认控制台窗口而不是 MinTTY(MSYNC 的认终端)之间进行选择,但我更喜欢前者,它必须配置为使用 Unicode 字体才能正确显示非 ASCII 字符。

我安装了最新版本的 Windows 10,并且使用的是最新的 Windows 终端。我尝试通过两种方式访问​​设置;

  1. 单击设置选项卡会在 Microsoft Visual Studio 中打开 settings.json 文件
  2. 在单击设置选项卡的同时按住选项卡将打开 defaults.json(Windows 终端的当前认设置)。在 json 文件中,我发现 Scrollback 设置如下:
// Scrollback
        { "command": "scrollDown","keys": "ctrl+shift+down" },{ "command": "scrollDownPage","keys": "ctrl+shift+pgdn" },{ "command": "scrollUp","keys": "ctrl+shift+up" },{ "command": "scrollUpPage","keys": "ctrl+shift+pgup" },

从这里开始,我不知道如何进行。这是 json 文件的完整路径:C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.4.3243.0_x64__8wekyb3d8bbwe\defaults.json

提前致谢。

解决方法

据我所知,Windows 自带的大部分字体都是“Unicode”字体。如果您正在寻找一些特别的特殊字形,您可能需要类似 Nerd Font 的东西。要在 Windows 终端中设置字体,请参阅 this doc

具体来说,在 "defaults" 部分或您与 Git Bash 一起使用的特定配置文件中设置字体。 fontFace 将是主要设置。我的 settings.json“默认值”如下所示:

   "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles.
            //"useAcrylic": true,//"acrylicOpacity": 0.75

            // From Nerd Fonts
            // https://github.com/ryanoasis/nerd-fonts
            "fontFace": "CaskaydiaCove NF","fontSize": 13,"cursorShape": "filledBox"
        },