# 字体设置

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 设置 | 编辑器 | 字体`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 编辑器 | 字体`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)

使用此页面配置 IntelliJ IDEA 编辑器中使用的字体。 默认情况下，此字体在所有配色方案中使用。 有关更多信息，请参见 [字体](configuring-colors-and-fonts.html#fonts)。

![字体设置页](https://resources.jetbrains.com.cn/help/img/idea/2026.3/ij_editor_settings_font.png)

|    字体    |  在编辑器中选择文本的字体。  |
|    大小    |     指定字体大小为磅/点。       如果需要在编辑器中快速更改字体大小，请按 `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) 打开 IDE 设置，转到  `编辑器 \| 常规` ，并根据您的操作系统选择   使用 Command+鼠标滚轮更改字体大小   或   使用 Control+鼠标 更改字体大小  。     |
|    行高    |  指定编辑器中代码行之间垂直距离的点大小系数。 默认值  `1.2` 对应于字号的 120%。 请尝试更改 factor ，查看在预览区域的效果。  |
|    恢复默认设置    |  恢复默认字体设置。 仅当设置与默认设置不同的时候可用。  |
|    启用连字功能    |     启用字体连字：字体中的特殊符号，可将两个或多个符号合并为一个。 例如，将  `!=`  显示为  `≠` 。     |

## 排版设置

|    主字体粗细    |  选择常规文本的粗细。  |
|    加粗字体粗细    |  选择粗体文本的权重。  |
|    回退字体    |  选择用于主要字体之外字符的字体。  |
|    字符变体    |  配置所选字体支持的 OpenType 风格集。 风格集允许您自定义特定字符或字形组的外观（例如，可选用带斜杠的零或  `a`  或  `g`  等字母的替代形态），无需更改字体本身。  |

> **Tip:**
> 要配置 IntelliJ IDEA 界面（工具窗口、工具栏、菜单）中使用的字体，请打开 IDE 设置 `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))，然后转到  `外观与行为 | 外观` 。 从   使用自定义字体   列表中，选择一种字体，并在   大小   字段中指定字体大小。
>
>
>
> 有关更多信息，请参见 [外观](settings-appearance.html)。

> **Tip:**
> 要配置控制台输出中使用的字体，请参阅 [自定义控制台字体](configuring-colors-and-fonts.html#custom-console-font)。

