[Feature]: File editor ignores font weight — Monaco never receives fontWeight, so code can't match the terminal
- Dominant language
- TypeScript
- Stars
- 71.3k
- Forks
- 4.7k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 475
Description
### Problem or use case
The editor lets me opt out of the terminal **font family** and follows the terminal **font size**, but there is no way to control its **font weight** — and it does not inherit the terminal's either. Whatever `Font Weight` I set for the terminal, file views and diffs render at Monaco's default weight, so the same font looks lighter in the editor than in a terminal pane right next to it.
Digging into the renderer: the Monaco options object is built with `fontFamily` and `fontSize` but no `fontWeight`, so Monaco falls back to `EDITOR_FONT_DEFAULTS.fontWeight` ("normal") regardless of `terminalFontWeight`.
**Environment**
- Orca 1.4.197, macOS (darwin arm64)
- Terminal: Font Weight 600
- Editor: Editor Font Family "Cascadia Code PL", editor zoom 0
**What already works**
Family and size are consistent between the two views, so this is the one typography setting left out:
- `resolveEditorFontFamily` → `editorFontFamily || terminalFontFamily || "monospace"`
- `computeEditorFontSize` → `terminalFontSize + editorFontZoomLevel`
With the terminal at weight 600 and the editor inheriting the same family, a file open in the editor still renders at normal weight, so the two panes disagree on how heavy the same font looks. There is no user-side workaround in the editor direction: the only lever is the terminal's Font Weight, which moves the terminal and leaves the editor where it was.
### Proposed solution
Mirror the existing `editorFontFamily` design rather than introducing a new shape:
1. Add an `editorFontWeight` setting, opt-in, defaulting to a value that keeps following `terminalFontWeight` — so nothing changes for anyone who does not touch it.
2. Reuse the terminal's existing 100–900 normalization instead of duplicating validation.
3. Pass it into the Monaco options wherever `fontFamily` already goes.
Since the editor already inherits the terminal font family and size, inheriting — and being able to override — the weight feels like the natural completion of that design.
### Alternatives or additional context
This is the same shape as #14257 (line height): a terminal typography setting the file editor has no way to match. The two could reasonably be solved together, since they touch the same option object.
Happy to open a PR for this.
Contributor guide
Research direction
Start at the renderer's Monaco options object, then trace the existing resolveEditorFontFamily and computeEditorFontSize paths and the editorFontFamily setting design. Add the editor weight inheritance and override behavior described in the issue, reuse the existing terminal weight normalization, and confirm the resolved weight reaches Monaco wherever fontFamily is configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100