Files
tty7/docs/customization/fonts.mdx
T
l0ng-ai 00e1aa8218 docs: correct claims that no longer match the code
Audited every page under docs/ against the source. Fixes for what the
code actually does:

- agents: the status vocabulary is idle/working/waiting/done, not
  running/waiting/idle; hook rows grow a separate Uninstall button; the
  Settings table labels read "Copilot CLI" and "Grok Build"; Copy Session
  ID lives in the tab's context menu, not the pane's
- cli: `pane ls --all` reports the owning workspace id, not "tty7-cli";
  document bare `tty7 [PATH]` as the GUI launcher it is instead of listing
  it as unimplemented; note `active_tab` and the `diagnostics` array; wait
  also defaults to $TTY7_PANE
- git: the branch dropdown is a plain list with no search box and no
  stash-and-switch, and checkout is not a palette command; quote the diff
  overlay's own overflow notice rather than the sidebar's
- window: the unread marker tracks a finished agent turn, not any output;
  rows cannot be dragged across groups; the sidebar and `tty7 tab ls`
  resolve labels differently; drop Toggle Commit History and Checkout to
  from the palette's Git group; ~/.ssh/config aliases are not palette
  entries
- terminal: Ctrl+R dedups by command text and shows no directory; Esc does
  not dismiss a ghost suggestion; document Cmd+Enter
- remote: GSSAPI is an ordinary Auth choice, not a managed-connection-only
  mechanism
- fonts: Maple Mono NF CN leads the chain on Windows and Linux only; list
  the real per-platform defaults
- settings paths: the three Links settings and per-pane history were filed
  under the wrong sections
2026-08-11 14:35:54 +08:00

85 lines
3.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Fonts"
description: "The bundled default, fallback chains, ligatures, and why CJK needs a word."
---
**Settings → Appearance → Typography** covers the everyday choices; the rest is
`config.json`.
| Setting | Default | |
|---|---|---|
| **Font family** | Hack | Picked from fonts installed on your system |
| **Font size** | 15 px | The terminal grid |
| **Interface font size** | 16 px | Everything outside the grid (1224) |
| **Line height** | 1.4 | A multiple of the font size |
| **Bold font** / **Italic font** | — | Distinct faces, when you want them |
| **Font ligatures** | off | Contextual alternates stay off unless you ask |
## Hack is bundled
The default font ships inside the binary. It renders identically on every
machine without relying on a system install, so a fresh laptop looks like the
one you set up last year.
## Fallbacks
`font_family` is the primary face; `font_fallbacks` is an ordered list tried in
turn for anything the primary lacks.
```json
{
"font_family": "JetBrains Mono",
"font_fallbacks": ["Maple Mono NF CN", "PingFang SC", "Apple Color Emoji"]
}
```
Leave `font_fallbacks` out and you get the platform's default chain:
| | Default fallbacks, in order |
|---|---|
| **macOS** | Menlo · Hasklug Nerd Font Mono · Maple Mono NF CN · PingFang SC · Apple Color Emoji |
| **Windows** | Maple Mono NF CN · Cascadia Mono · Microsoft YaHei · Segoe UI Emoji |
| **Linux** | Maple Mono NF CN · DejaVu Sans Mono · Noto Sans CJK SC · Noto Color Emoji |
Each ends in faces the host OS actually ships, and those stock names are
appended to whatever list you write yourself — so a `config.json` copied from
another platform still resolves.
## OpenType features
`font_features` passes tags straight through to the shaper:
```json
{
"font_features": { "calt": true, "liga": 1, "ss01": true, "zero": false }
}
```
A tag must be four alphanumeric characters; `true`/`false` map to `1`/`0`.
Anything malformed is skipped with a log line rather than failing the whole
config.
## CJK and the two-column grid
<Info>
A cell is one advance of the primary face, and a wide (CJK) character is
pinned to exactly two of them. A CJK fallback sits flush in its slot only if
its ideographs advance **twice** the primary's Latin advance.
</Info>
Bundled Hack advances 0.60205em, so a two-column slot is 1.2041em — while every
stock CJK face (Microsoft YaHei, PingFang SC, Noto Sans CJK) advances 1.0em.
Those glyphs get left-aligned in the slot, leaving a ~0.2em gap on the right of
every character.
[Maple Mono NF CN](https://github.com/subframe7536/maple-font) is in every
platform's default chain for exactly this reason: 0.6em Latin, 1.2em CJK, an
exact two-cell fit against Hack. It leads the chain on Windows and Linux, and on
macOS sits behind Menlo and Hasklug, which cover Latin and Nerd Font glyphs
first. It is referenced by name only, never bundled (~20 MB per weight) —
install it and tty7 picks it up with no config change.
If you want CJK set *tight* rather than merely even, change the **primary** face
instead. One that advances 0.5em — Sarasa Mono SC, say — makes two columns
exactly 1.0em.