Skip to content

feat: support all monospaced fonts installed on the local system#647

Merged
datlechin merged 4 commits intoTableProApp:mainfrom
nexxai:add-more-fonts
Apr 9, 2026
Merged

feat: support all monospaced fonts installed on the local system#647
datlechin merged 4 commits intoTableProApp:mainfrom
nexxai:add-more-fonts

Conversation

@nexxai
Copy link
Copy Markdown
Contributor

@nexxai nexxai commented Apr 9, 2026

Problem

I wanted to use a monospaced font that wasn't one of the 4 default included ones (specifically JetBrains Mono) but was obviously unable to as the list was hardcoded.

Solution

I replaced the hardcoded font option flow with a shared runtime resolver that discovers installed monospaced font families and uses them in both settings UI and runtime theme font resolution. The resolver keeps System Mono as a safe default and fallback when a saved font is unavailable. Theme storage remains string-based and backward-compatible, and docs/tests were updated to cover dynamic listing and fallback behavior.

This is my first contribution to this repo so if I'm missing anything, please let me know.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@nexxai
Copy link
Copy Markdown
Contributor Author

nexxai commented Apr 9, 2026

I have read the CLA Document and I hereby sign the CLA.

github-actions bot added a commit that referenced this pull request Apr 9, 2026
datlechin

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

@datlechin datlechin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR, but have few things to fix:

  • isRecommended and displayName seem like definded but no read anywhere
  • availableMonospacedFamilies() make it static let instead

@nexxai nexxai requested a review from datlechin April 9, 2026 04:48
@nexxai
Copy link
Copy Markdown
Contributor Author

nexxai commented Apr 9, 2026

Sorry about the extra properties. I had been trying out a couple different features I've been thinking about and forgot to git add -p here. I've removed them and switched the availableMonospacedFamilies to a static let property.

@datlechin
Copy link
Copy Markdown
Collaborator

Hi @nexxai, thanks for the quick update. Also, please update the tests as well. Currently, the test still has parentheses around EditorFontResolver.availableMonospacedFamilies().

@nexxai
Copy link
Copy Markdown
Contributor Author

nexxai commented Apr 9, 2026

Yeah, I guess that would be helpful to include in the commit too.

@datlechin datlechin merged commit 721e378 into TableProApp:main Apr 9, 2026
1 check passed
@nexxai nexxai deleted the add-more-fonts branch April 9, 2026 05:00
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.

2 participants