Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

docs: Add missing font fallback documentation (#55779)

asdfer27ca0526293f
diff --git a/docs/src/appearance.md b/docs/src/appearance.md
index 26c268e28c1..00aff71b736 100644
--- a/docs/src/appearance.md
+++ b/docs/src/appearance.md
@@ -65,24 +65,30 @@ Like color themes, icon themes support separate light and dark variants:
## Fonts
-Zed uses three font settings for different contexts:
+Zed uses three font settings and their fallback counterparts for different contexts:
-| Setting | Used for |
-| ---------------------- | ------------------------- |
-| `buffer_font_family` | Editor text |
-| `ui_font_family` | Interface elements |
-| `terminal.font_family` | [Terminal](./terminal.md) |
+| Setting | Used for |
+| ------------------------- | ------------------------- |
+| `buffer_font_family` | Editor text |
+| `buffer_font_fallbacks` | Editor text |
+| `ui_font_family` | Interface elements |
+| `ui_font_fallbacks` | Interface elements |
+| `terminal.font_family` | [Terminal](./terminal.md) |
+| `terminal.font_fallbacks` | [Terminal](./terminal.md) |
Example configuration:
```json [settings]
{
"buffer_font_family": "JetBrains Mono",
+ "buffer_font_fallbacks": ["Nerd Font"],
"buffer_font_size": 14,
"ui_font_family": "Inter",
+ "ui_font_fallbacks": ["Nerd Font"],
"ui_font_size": 16,
"terminal": {
"font_family": "JetBrains Mono",
+ "font_fallbacks": ["Nerd Font"],
"font_size": 14
}
}
diff --git a/docs/src/reference/all-settings.md b/docs/src/reference/all-settings.md
index b6e9ab745fd..a0eed002c67 100644
--- a/docs/src/reference/all-settings.md
+++ b/docs/src/reference/all-settings.md
@@ -4500,6 +4500,24 @@ The name of any font family installed on the user's system
}
```
+### Terminal: Font Fallbacks
+
+- Description: The font fallbacks to use for text in the terminal. Uses the buffer's font fallback if unset.
+- Setting: "font_fallbacks"
+- Default: `null`
+
+**Options**
+
+For example, to use Nerd Font as a fallback, add the following to your settings:
+
+```json [settings]
+{
+ "terminal": {
+ "font_fallbacks": ["Nerd Font"]
+ }
+}
+```
+
### Terminal: Font Features
- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.