Skip to content

[FEATURE]: Add font customization support to opencode.json config #12503

Closed as not planned

Description

@aaronmasm

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like to request the ability to configure custom fonts (font family, size, and weight) through the opencode.json configuration file, similar to how VS Code handles editor.fontFamily in its settings.

Proposed implementation:
Add new optional fields to the config schema:

{
  "$schema": "https://opencode.ai/config.json",
  "editor": {
    "fontFamily": "Fira Code, JetBrains Mono, monospace",
    "fontSize": 14,
    "fontWeight": 400,
    "fontLigatures": true
  }
}

Alternatively, this could be part of the tui configuration:

{
  "$schema": "https://opencode.ai/config.json",
  "tui": {
    "scroll_speed": 3,
    "diff_style": "auto",
    "fontFamily": "Fira Code, monospace",
    "fontSize": 14,
    "fontLigatures": true
  }
}

What are the benefits of implementing this?

  1. Enhanced developer experience:

Programming-optimized fonts like Fira Code, JetBrains Mono, Cascadia Code, and Monaspace dramatically improve code readability with ligatures and better character distinction (0 vs O, 1 vs l vs I)
Developers can match OpenCode's font with their other editors for consistency

  1. Accessibility:

Some developers need larger font sizes for visibility
Dyslexia-friendly fonts like OpenDyslexic or Lexend can be configured
Font weight adjustments help with eye strain and contrast preferences

  1. Branding and theming:

Organizations and teams can enforce brand-consistent typography
Custom themes could include recommended fonts as part of the complete visual identity
Professional recording/streaming setups benefit from carefully chosen fonts

  1. Cross-platform consistency:

Currently, font rendering depends on terminal configuration, which varies across iTerm2, Warp, Windows Terminal, Alacritty, etc.
Having font config in OpenCode ensures consistent appearance regardless of terminal choice

  1. Integration with existing workflow:

Config-based font management aligns with OpenCode's philosophy of JSON-driven configuration
Could be combined with theme selection for complete visual customization
Would complement the existing theme option perfectly

Additional considerations:

Font fallback chains ensure compatibility across systems
fontLigatures toggle allows users to enable/disable programming ligatures
Config could validate against installed system fonts or provide helpful warnings
Could support both global (~/.config/opencode/opencode.json) and per-project settings

Example use case:
A developer working on a BrandX-branded project could ship an opencode.json with:

{
  "theme": "brandx",
  "editor": {
    "fontFamily": "Fira Code, monospace",
    "fontSize": 13,
    "fontLigatures": true
  }
}

This ensures every contributor sees the codebase with optimal, consistent typography that complements the custom theme.

References:

VS Code: https://code.visualstudio.com/docs/getstarted/settings#_font
Popular coding fonts: Fira Code, JetBrains Mono, Cascadia Code

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Feb 6, 2026
  2. github-actions commented on Feb 6, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if this doesn't address your specific case.

  3. SublimePeace commented on Feb 14, 2026

    @SublimePeace

    +1, this is crucial not only for feels (customization), but perhaps more importantly for accessibility. I use the Atkinson Hyperlegible Next font everywhere, which is a completely free official font made by the Braille Institution to aid users with poor vision to be able to easily discriminate common confusion characters like 8B, Iil|, etc. Unfortunately I can't use it in OpenCode :(

  4. o-nix commented on Apr 7, 2026

    @o-nix

    Zoom level != font size, we need this.

  5. assigned and unassigned on Apr 26, 2026
  6. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  7. trestini commented on Jun 14, 2026

    @trestini

    Currently it appears to not be possible. I've done some research, and apparently any solution for this in opencode (TUI) is limited to the support of the terminal emulator you're using. The font itself is a property of the emulator, not of the running terminal. xterm defined a control sequence for changing fonts [1], but most modern terminal emulators don't support it (iterm2, alacritty, kitty, and others). There's an open issue on WezTerm from 2023 discussing it [2].

    [1] https://www.xfree86.org/current/ctlseqs.html (P s = 5 0 → Set Font to P t )
    [2] wezterm/wezterm#4181

  8. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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