Windows Terminal 修改字体大小

您所在的位置:网站首页 终端字体放大怎么设置 Windows Terminal 修改字体大小

Windows Terminal 修改字体大小

2023-10-06 07:05| 来源: 网络整理| 查看: 265

Windows

Windows 10 中可以安装新的终端程序,相比于简陋的 CMD ,不仅界面美观大方,且使用体验也很优秀。

I

在 2K 及以上分辨率的荧幕上显示得过小,因此需要修改字体大小,但是看了自带的设置发现竟然没有相关字段。建议安装 Visual Studio Code 来进行修改。

Settings

▲ 直接选择左下角的“打开 JSON 文件”即可以文本模式修改设置

默认参数无字体相关参数,需要手动添加重新指定即可。

settings.json旧版配置

设置为 JSON 格式,如若修改字体大小,可在 profiles -> list -> powershell 标签内,增加 "fontSize": 13, 参数即可,如果加在最后一行,则无需结尾的逗号。

部分配置参考:

// This file was initially generated by Windows Terminal 1.4.3141.0 // It should still be usable in newer versions, but newer versions might have additional // settings, help text, or changes that you will not see unless you clear this file // and let us generate a new one for you. // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", // You can add more global application settings here. // To learn more about global settings, visit https://aka.ms/terminal-global-settings // If enabled, selections are automatically copied to your clipboard. "copyOnSelect": false, // If enabled, formatted data is also copied to your clipboard "copyFormatting": false, // A profile specifies a command to execute paired with information about how it should look and feel. // Each one of them will appear in the 'New Tab' dropdown, // and can be invoked from the commandline with `wt.exe -p xxx` // To learn more about profiles, visit https://aka.ms/terminal-profile-settings "profiles": { "defaults": { // Put settings here that you want to apply to all profiles. }, "list": [ { // Make changes here to the powershell.exe profile. "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "fontFace": "Cascadia Mono", "fontWeight": "normal", "fontSize": 13, "hidden": false }, { // Make changes here to the cmd.exe profile. "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "Command Prompt", "commandline": "cmd.exe", "hidden": false }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" } ] }, // Add custom color schemes to this array. // To learn more about color schemes, visit https://aka.ms/terminal-color-schemes "schemes": [], // Add custom actions and keybindings to this array. // To unbind a key combination from your defaults.json, set the command to "unbound". // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings "actions": [ // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. // These two lines additionally bind them to Ctrl+C and Ctrl+V. // To learn more about selection, visit https://aka.ms/terminal-selection { "command": {"action": "copy", "singleLine": false }, "keys": "ctrl+c" }, { "command": "paste", "keys": "ctrl+v" }, // Press Ctrl+Shift+F to open the search box { "command": "find", "keys": "ctrl+shift+f" }, // Press Alt+Shift+D to open a new pane. // - "split": "auto" makes this pane open in the direction that provides the most surface area. // - "splitMode": "duplicate" makes the new pane use the focused pane's profile. // To learn more about panes, visit https://aka.ms/terminal-panes { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ] } 新版配置

最新版中 "fontSize" 参数已经废弃,需要使用 "font" 父项来进行指定。

... "profiles": { "defaults": {}; "list": [ { "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": false, "name": "Windows PowerShell", "font": { "size": 13 } }, ... ] } ...

除此之外还有 axes, face, weight, features 子参数可以指定。

II

自定义新建标签,如果在为已安装的 WSL 分发设置打开时的起始目录时,应使用以下格式:"startingDirectory": "//wsl$/",并用分发的名称进行替换。 例如:"startingDirectory": "//wsl$/Ubuntu-20.04"。

下拉列表设置

▲ 效果如上图

附录参考链接Windows 终端中的配置文件设置 - Microsoft Docs

本文撰写于一年前,如出现图片失效或有任何问题,请在下方留言。博主看到后将及时修正,谢谢!

本文由 柒 创作,采用 知识共享署名4.0 国际许可协议进行许可。转载本站文章前请注明出处,文章作者保留所有权限。最后编辑时间: 2020-12-13 10:08 AM



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3