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

Open
opened 2026-02-16 18:10:40 -05:00 by yindo · 2 comments
Owner

Originally created by @aaronmasm on GitHub (Feb 6, 2026).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @aaronmasm on GitHub (Feb 6, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] 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 2. 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 3. 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 4. 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 5. 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](https://github.com/tonsky/FiraCode), [JetBrains Mono](https://www.jetbrains.com/lp/mono/), [Cascadia Code](https://github.com/microsoft/cascadia-code)
yindo added the discussion label 2026-02-16 18:10:40 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 6, 2026):

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

  • #11955: Custom UI Font in Desktop/Web - requests the ability to use custom fonts for the UI and code blocks

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

@github-actions[bot] commented on GitHub (Feb 6, 2026): This issue might be a duplicate of existing issues. Please check: - #11955: Custom UI Font in Desktop/Web - requests the ability to use custom fonts for the UI and code blocks Feel free to ignore if this doesn't address your specific case.
Author
Owner

@SublimePeace commented on GitHub (Feb 14, 2026):

+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 :(

@SublimePeace commented on GitHub (Feb 14, 2026): +1, this is crucial not only for feels (customization), but perhaps more importantly for accessibility. I use the [Atkinson Hyperlegible Next](https://www.brailleinstitute.org/freefont/) 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 :(
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8724