Skip to content

feat(settings): preview each font in its own typeface in font pickers - #33254

Merged
nwparker merged 4 commits into
stablyai:mainfrom
Rayyan34:feat/font-picker-in-font-preview
Nov 2, 2026
Merged

nwparker merged 4 commits into
stablyai:mainfrom
Rayyan34:feat/font-picker-in-font-preview

Conversation

@Rayyan34

@Rayyan34 Rayyan34 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The font pickers in Settings show each font name in that font.

What Changed

Before: The IDE Font, Editor Font, and Terminal Font lists show every name in the app UI font. To compare fonts, you must select one, look at the result, open the list again, and scroll back.

After: Each option in these lists shows its name in its own font. These items do not change:

  • the check mark on the selected font
  • keyboard navigation
  • filtering
  • the limit of 320 rendered rows
  • the existing terminal hover preview
  • the text input

How it works: FontAutocomplete is shared by all three pickers. It now sets an inline font-family on each option name. It uses the existing buildAppFontFamily() function. That function quotes font names safely and adds the app UI fallback fonts. If a font does not load, the option shows in the normal UI font. No new function or prop is added.

Why

You judge fonts one at a time when you have many installed (#21685). This change lets you compare them in one scan of the list.

Design decision: Issue #21685 also suggests a sample string next to each name, for example ABCabc 0123 Il1 O0 {}[]<>|. This PR does not add it. A long string on each row makes the list busier and wider. Showing the name in its own font gives the same preview with less visual noise. A sample string can be added in a follow-up PR if the maintainers want it.

Other option not used: An opt-in prop on FontAutocomplete. All three pickers would turn it on, so it would never be off. The component API stays unchanged.

Linked Issue

Closes #21685

Visual Proof

Before:
Before

After:
After

Testing

  • I tested these changes manually on my computer
  • I added or updated automated tests

Platforms tested manually: Windows only. I did not test macOS, Linux, or SSH.

Steps to verify:

  1. Open Settings > Interface > Appearance.
  2. Click the IDE Font input or its chevron.
  3. Check that each font name shows in its own font.
  4. Do the same for the Editor and Terminal font pickers.

Automated tests: I added a test to SettingsFormControls.font-autocomplete.test.tsx. The test checks two things: the first font family of each option is its own name, and the input has no inline font family. The test failed before the change.

I also ran the settings test folder, pnpm tc:web, and oxlint on the changed files. I did not run the full pnpm test or pnpm build. CI covers these.

AI Disclosure

I wrote this change with OpenCode and Anthropic Claude (claude-sonnet-5-5). I reviewed the change and ran it locally.

Agent skill upstream boundary

  • Not applicable. This change does not copy or translate any upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: Font names come from the OS font list. JSON.stringify quotes them inside buildAppFontFamily(). They go only into a CSS font-family value.
  • Cross-platform: The change is plain CSS font-family. It has no OS-specific code. I tested only on Windows.
  • Remote SSH, mobile, folder workspaces: Not affected. The change is in the desktop Settings UI only.
  • Backward compatibility: No change to settings, IPC, or saved data.
  • Performance: The list already renders at most 320 rows. Fonts load as rows render.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I attached before and after screenshots for the UI change
  • I reviewed the change for correctness, security, and performance
  • I considered cross-platform, SSH/remote, and path/shortcut impact
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass, or CI covers them

Maintainer additions (rebased by the Orca team)

Rebased onto current main. The original commit and its authorship are kept. Thanks @Rayyan34! Two small commits on top:

  1. perf: option rows get content-visibility:auto with contain-intrinsic-size:auto 20px (the content box inside py-2). Each row loads its own font, so without this the first open shapes all 320 rendered rows in 320 different fonts. Now only the rows visible in the scroll area load; the rest load as you scroll. Skipped rows still measure the real 36px row height (checked across all 260 rows), so the scroll height does not jump.
  2. fix: OS-shipped symbol fonts (Webdings, Wingdings 1–3, Marlett, Symbol, MT Extra, Bookshelf Symbol 7, URW D050000L, Standard Symbols PS) keep their name in the UI font. In their own font the name renders as pictographs or Greek letters and can't be read. The "default" row (empty value) also keeps the UI font.

Closes #21685

#11155 (preview terminal font changes without leaving Settings) is not closed here. Settings already has a live xterm preview: it is the terminal preview under Terminal Themes, and it shows the highlighted terminal font while you browse the picker. #11155 asks for a preview next to the Font Family and Font Size controls. That is a separate layout change, left for a follow-up.

Visual proof

Before (main) After
IDE font, dark before dark after dark
Terminal font, light before light after light

Symbol fonts before and after the readability fix:

symbols before fix symbols after fix

Merge-risk assessment: Low

  • One renderer component (FontAutocomplete).
  • No settings, IPC, schema or font-enumeration changes. src/main/system-fonts.ts is untouched.
  • Mixed client and server versions are unaffected.
  • content-visibility needs Chromium 85+ and contain-intrinsic-size: auto needs Chromium 95+. Every Electron version Orca ships has both.

Negative user-facing tradeoffs

  • Rows now look less uniform: different fonts have different widths and x-heights, and some names truncate sooner. Row height is unchanged (36px).
  • Symbol fonts outside the known list (third-party icon fonts that map Latin letters to symbols) still render their name as symbols. You can still type to filter for them.
  • When you scroll quickly to an unseen part of the list, each row's font loads as it appears. In practice this is not visible.

Validation

  • pnpm tc:web passes. oxlint and oxfmt pass on the changed file. pnpm test src/renderer/src/components/settings/SettingsFormControls.font-autocomplete.test.tsx passes (18 tests).
  • Real app on macOS (257 system fonts): dev build launched in the background (ORCA_BACKGROUND_LAUNCH=1) with a throwaway userData and HOME, driven over CDP. Checked:
    • IDE and terminal pickers in light and dark.
    • Filtering.
    • Keyboard navigation: 120 × ArrowDown keeps the highlighted row in view, rendered in its own font.
    • Symbol fonts.
    • All 260 rows measure 36px.
  • Review: one Opus sub-agent flagged symbol fonts (fixed). Codex (gpt-6.1-sol, xhigh) flagged that contain-intrinsic-size sizes the content box, so skipped rows reserved 52px instead of 36px (fixed and re-measured: all 260 rows are 36px).

Perf

I ran perf-scan on the diff. Measurements use the dev build on macOS with 257 fonts, via CDP Performance.getMetrics, opening the IDE font picker:

First open: layout First open: task Warm open (median of 5): wall / style / task
main 1.2 ms 264 ms 85 ms / 8 ms / 46 ms
PR as submitted 278 ms 665 ms 130 ms / 12 ms / 60 ms
this branch 45 ms 346 ms 85 ms / 7 ms / 49 ms
  • On main, the first open's total wall time (about 10 s) is dominated by the existing system font enumeration IPC, which this PR does not touch.
  • After the content-visibility change, the remaining cost of the first open is roughly the 8 visible rows' fonts.
  • The list is already capped at 320 rows. Virtualizing it isn't needed now that offscreen rows skip layout.
  • Windows (DirectWrite) and Linux (fontconfig) font lookups are per family and happen at layout, so the same bound applies. I did not measure them on those hosts.

@Rayyan34
Rayyan34 marked this pull request as ready for review October 24, 2026 20:56
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3eab9106-06ae-434f-b714-abcf95b4380b
Commits

Reviewing files that changed from the base of the PR and between a02badf and c172874.

Files selected for processing: 2
  • src/renderer/src/components/settings/FontAutocomplete.tsx
  • src/renderer/src/components/settings/SettingsFormControls.font-autocomplete.test.tsx

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ac4c71d-7e07-4785-882f-7734e726ff49
Commits

Reviewing files that changed from the base of the PR and between 5ee74f4 and a02badf.

Files selected for processing: 2
  • src/renderer/src/components/settings/FontAutocomplete.tsx
  • src/renderer/src/components/settings/SettingsFormControls.font-autocomplete.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Font autocomplete suggestions now render each font name in its corresponding typeface. The input retains its default UI font. A test checks the suggestion typefaces and confirms the input has no inline font family.

Severity of issue fixed: Low

Merge Risk: Minimal · previous review a02ba

No actionable merge-blocking risk is established for this UI-only change.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Issue [#21685] requires each font entry to render in its own typeface and includes a short sample string with ambiguity-prone glyphs and bracket characters. FontAutocomplete.tsx implements the typef… Add the requested sample string beside each font name in FontAutocomplete, including the glyphs described by [#21685], and add automated test coverage for the sample content and its rendering.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title "feat(settings): preview each font in its own typeface in font pickers" matches the main change. The diff makes FontAutocomplete render each option's name in its own font through buildAppFon…
Out of Scope Changes check Passed The diff is limited to the shared FontAutocomplete rendering change and its focused automated test. The change supports the font-list preview objective in [#21685]. No unrelated settings, IPC, persi…
Description check Passed The description is complete and relevant. It explains the user-facing change, implementation, rationale, linked issue, visual proof, testing, platform coverage, risks, AI use, maintainer validation, a…
Full details: Title check

Explanation

The title "feat(settings): preview each font in its own typeface in font pickers" matches the main change. The diff makes FontAutocomplete render each option's name in its own font through buildAppFontFamily(), and adds a test for it. The title is specific and uses a conventional commit prefix. It is slightly long at 69 characters, but it stays on the primary change.

Full details: Out of Scope Changes check

Explanation

The diff is limited to the shared FontAutocomplete rendering change and its focused automated test. The change supports the font-list preview objective in [#21685]. No unrelated settings, IPC, persistence, or UI behavior changes are present.

Full details: Description check

Explanation

The description is complete and relevant. It explains the user-facing change, implementation, rationale, linked issue, visual proof, testing, platform coverage, risks, AI use, maintainer validation, and checklist status. The required ELI5 and Risk headings are not used exactly, but the required information is present elsewhere, so this is acceptable.

Full details: Linked Issues check

Explanation

Issue [#21685] requires each font entry to render in its own typeface and includes a short sample string with ambiguity-prone glyphs and bracket characters. FontAutocomplete.tsx implements the typeface preview with buildAppFontFamily(font), and the new test verifies the option families and unchanged input style. The PR does not render the requested sample string, and the test does not cover it.

Resolution

Add the requested sample string beside each font name in FontAutocomplete, including the glyphs described by [#21685], and add automated test coverage for the sample content and its rendering.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nwparker
nwparker force-pushed the feat/font-picker-in-font-preview branch 3 times, most recently from 13a876f to efd214f Compare November 2, 2026 06:23
@nwparker
nwparker force-pushed the feat/font-picker-in-font-preview branch from efd214f to c172874 Compare November 2, 2026 06:35
@nwparker
nwparker merged commit e1ff15e into stablyai:main Nov 2, 2026
72 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Render font names in their own typeface in the font list

2 participants