Skip to content

[Feature]: Support configuring fallback font(s) or an ordered font list for Editor (and Terminal) #42938

Open

Description

@Satsrag

Problem or use case

Currently, Editor font family (as well as Terminal font family) uses a single-font picker (FontAutocomplete) that only lets users select one font family at a time.

In our workflow, we work with fonts that rely on Unicode Private Use Area (PUA) glyphs alongside specialized script glyphs (for example, Mongolian fonts such as Menk Qagan StdEx Tig, or custom icon/symbol PUA fonts) mixed with regular source code:

  1. Coding font + PUA fallback font: If we set a standard programming font (e.g., JetBrains Mono or SF Mono) as the primary editor font, there is no way in Settings to specify a secondary/fallback font for PUA or script-specific code points. Worse, Orca's built-in FALLBACK_FONTS chain includes "Orca Nerd Font Symbols" and Nerd Fonts covering U+E000–U+F8FF, which can intercept PUA code points before the OS can fall back to our PUA font.
  2. PUA/script font + secondary font: Conversely, if we set the PUA/script font (e.g., Menk Qagan StdEx Tig) as the primary Editor font family, we cannot configure a secondary fallback font to control how Latin/CJK/code glyphs missing or undesirable in the primary font are rendered.

Typing a raw CSS comma-separated stack manually into Editor font family breaks FontAutocomplete suggestions (No matching fonts.), requires manual quoting for font names containing spaces, and is not discoverable.

Proposed solution

Allow configuring either:

  1. A JetBrains IDE–style Primary Font + Fallback Font setting under Settings → Editor (e.g., Editor font family + Editor fallback font family, each using FontAutocomplete), or
  2. An ordered font list / fallback font stack (add, remove, and reorder installed fonts via FontAutocomplete), similar to what feat(terminal): add configurable fallback font stacks #8428 proposed for the terminal, applied consistently to Editor font family (Monaco file editors, diff views, notebook cells, and Markdown code blocks).

Important detail for PUA users: user-configured fallback fonts should be placed ahead of Orca's built-in defaults (including "Orca Nerd Font Symbols" and Nerd Font fallbacks):

Primary font → User-defined fallback font(s) → Orca built-in defaults

Alternatives or additional context

Activity

  1. Pr1p commented on Nov 17, 2026

    @Pr1p
    Contributor

    Verified the mechanism behind both reported cases, for whoever picks the design up:

    The fixed chain intercepts PUA before the OS can fall back. buildFontFamily (src/shared/styles/monospace-font-family.ts) appends a constant FALLBACK_FONTS chain after the user's single family, and it deliberately puts Orca Nerd Font Symbols / Symbols Nerd Font Mono in that chain to cover U+E000–U+F8FF — so for PUA code points those bundled fonts always claim the glyph before the OS per-glyph fallback would ever consult an installed PUA font like Menk Qagan. That's case 1, confirmed by construction.

    A manual comma-separated stack is structurally impossible, not just unsupported by the picker. The same function quotes the entire trimmed setting as one family: a value like JetBrains Mono, Menk Qagan StdEx Tig becomes the single quoted family "JetBrains Mono, Menk Qagan StdEx Tig" — which no OS resolves, hence the picker's "No matching fonts" and the broken rendering. So today the setting can only ever name one family.

    Both surfaces the issue names share this one function — callers include shared/editor/editor-typography.ts (Editor) and shared/terminal/appearance/terminal-platform-defaults.ts + terminal-appearance.ts (Terminal) — so a design that lets buildFontFamily accept an ordered user list would cover Editor and Terminal in one change.

    For context: #8428 (open since July) already proposes configurable fallback font stacks for the Terminal half; this request is the Editor-and-Terminal generalization of it, so maintainers will likely want one design covering both rather than two.

  2. Pr1p commented on Nov 17, 2026

    @Pr1p
    Contributor

    Taking the smallest slice of this that needs no design decision: making the existing single font setting accept a comma-separated ordered stack (PR shortly). The full pickers/ordered-list UX (and how it composes with #8428's Terminal fallback setting) stays with maintainers.

    Concretely, buildFontFamily currently quotes the whole setting value as one family — my earlier comment shows why that makes a typed stack structurally impossible. The change splits the entered value on commas outside quotes, strips each family's surrounding quotes, quotes every family individually, and appends the unchanged fallback chain. Both the Editor and Terminal typography settings go through this one function, so a stack like JetBrains Mono, Menk Qagan StdEx Tig now works in both places today — PUA glyphs get a shot before the bundled Nerd chain — with zero new settings or UI. Plugin family names contain no commas and keep their whole-name special handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions