LoginSignup
0
0

More than 1 year has passed since last update.

Visual Studio Codeでラスタフォント(MS ゴシック等)を使用する

Posted at

はじめに

Visual Studio Code(Windows版)のテキストエディタの既定のフォントはConsolasです(日本語はメイリオ)。
コーディングにも向いている等幅フォントらしいですが個人的に...あまり好きではありません。
image.png

Text Editor

見慣れたMS ゴシックに変えてしまいます。

GUIで設定する場合

SettingsText EditorFontEditor: Font Family
(設定テキスト エディターフォントEditor: Font Family)

Consolas, 'Courier New', monospace

'MS Gothic', monospace
に変更
image.png
image.png
フォントが大きすぎるので

SettingsText EditorFontEditor: Font Size
(設定テキスト エディターフォントEditor: Font Size)

1412 に変更
image.png
image.png
行間が広いと一度に表示できる行数が少なくなるので

SettingsText EditorEditor: Line Height
(設定テキスト エディターEditor: Line Height)

01 に変更
image.png

0から8までの値は、フォント サイズの乗数として使用されます。

image.png
いい感じ

ターミナルのフォントも個別に設定しなければエディタの設定が適用されます。
image.png

settings.json で設定する場合

%APPDATA%\Code\User\settings.jsonを開き、以下の行を追加

settings.json
{
  "editor.fontFamily": "'MS Gothic', monospace",
  "editor.fontSize": 12,
  "editor.lineHeight": 1
}

Debug Console

Debug Consoleは何故かText Editorの設定を適用してくれないので
image.png

GUIで設定する場合

SettingsFeaturesDebug
(設定機能デバッグ)

  • Console: Font Family
    • 'MS Gothic', monospace
  • Console: Font Size
    • 1412
  • Console: Line Height
    • 12
      (※こちらは1を設定すると1ポイントになってしまいます)

image.png
image.png
いい感じ!

settings.json で設定する場合

%APPDATA%\Code\User\settings.json
以下を追加

settings.json
{
  "debug.console.fontFamily": "'MS Gothic', monospace",
  "debug.console.fontSize": 12,
  "debug.console.lineHeight": 12
}

ついでに

私は以下も設定しています。

%APPDATA%\Code\User\settings.json
{
  "security.workspace.trust.enabled": false, // 正直、制限モードはうっとおしい
  "window.titleBarStyle": "native", // タイトルバーが無いとドラッグしにくくない?
}

security.workspace.trust.enabledについては効果を理解の上、くれぐれも自己責任でお願いします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0