Skip to content

fix(app): support comma-separated font family input - #50801

Closed
Veld101 wants to merge 1 commit into
anomalyco:devfrom
Veld101:multi-font-input
Closed

Veld101 wants to merge 1 commit into
anomalyco:devfrom
Veld101:multi-font-input

Conversation

@Veld101

@Veld101 Veld101 commented Sep 23, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #48259

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The UI, code, and terminal font settings accepted only one family. family() wrapped the whole input in one pair of quotes, so entering Iosevka, LXGW WenKai Mono produced "Iosevka, LXGW WenKai Mono" 閳?a single unknown family 閳?instead of a fallback stack.

stack() now splits the value on commas, normalizes each segment through family(), and drops empty segments:

const families = value
  .split(",")
  .map(family)
  .filter((f) => f.length > 0)
if (families.length === 0) return base
return `${families.join(", ")}, ${base}`

family() also trims each segment, so Inter, system-ui keeps bare identifiers unquoted while LXGW WenKai Mono is quoted because it contains spaces. All three settings go through stack(), so UI, code, and terminal fonts get the same behavior.

How did you verify your code works?

Added tests to settings font families:

  • Custom Sans, Fallback and Fira Code, monospace produce a joined stack with the default appended
  • Inter, system-ui keeps bare identifiers unquoted
  • Custom Sans, , ,Other drops the empty segments; ,, falls back to the default stack

Removing the change makes the two new tests fail.

bun test --conditions=solid --preload ./happydom.ts ./src/settings/model.test.ts   # 20 pass, 0 fail
bun run check                                                                      # 35/35, lint + typechecks

Screenshots / recordings

Not a layout change; this only changes how a configured value is parsed into a CSS font stack.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Note: this targets �2; the repository default branch is dev.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential duplicate found:

This PR has the identical title and appears to address the same feature for supporting comma-separated font family input. Since PR #50801 is the current PR, PR #50350 is likely a duplicate or earlier attempt at the same fix. You may want to check which one is more recent and whether one should be closed in favor of the other.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Support configurable font fallback stacks in Desktop settings

1 participant