Skip to content

Add support for single Fallback Font#51

Open
ibutra wants to merge 2 commits into
hismailbulut:masterfrom
ibutra:master
Open

Add support for single Fallback Font#51
ibutra wants to merge 2 commits into
hismailbulut:masterfrom
ibutra:master

Conversation

@ibutra

@ibutra ibutra commented Dec 10, 2025

Copy link
Copy Markdown

I have added support for a single fallback font which can be provided in the guifont option with comma seperation.
I needed this as even though the comments in the code suggest the default Font should have Nerd Symbols they were not rendered for me and this way I can provide the Nerd Symbols Font simply as fallback.

So far I have not implemented multiple fallbacks as I think this just increases memory usage and is hardly ever a usecase but if needed I can change it to also support an arbitrary number of fallback fonts.

Also feel free to just reject this PR as I haven't asked beforehand and it simply might not fit your vision.

If there is anything else I should change just let me know.

P.S.: I accidentally also commited a fix for windows where for me the generated fontlist.txt was always empty as the dispatched goroutine wasn't fast enough to lock the mutex. Hope it is fine to leave in, otherwise I will move it out.

@hismailbulut hismailbulut left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I really like the idea and appreciate the work you have done here but there is a problem which the guifont size is not extracted per font here. The code should handle size of both fonts separately. Other than that we can also improve this idea by making this more dynamic and make it accept more than two fonts which will implement code readability and make users specify more than two (maybe ten) fonts at the same time. I can add those myself but I don't want to take credit from your work. Also I am sorry for being this late to review because I had an injury on my hand required months of treatment. I hope you will work on this further and let me know if you will or not. Thank you so much.

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