Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.toml setting for specifying fallback fonts #2240

Closed
comiluv opened this issue Jan 5, 2024 · 4 comments · Fixed by #2244
Closed

config.toml setting for specifying fallback fonts #2240

comiluv opened this issue Jan 5, 2024 · 4 comments · Fixed by #2244
Labels
enhancement New feature or request

Comments

@comiluv
Copy link

comiluv commented Jan 5, 2024

Is your feature request related to a problem? Please describe.
Neovide previously enabled users to set up fallback fonts for CJK characters, emojis, etc. within the init.lua file under vim.o.guifont. This was achieved by specifying fallback fonts after the default fonts. For instance, an example setup would be vim.o.guifont = "consolas, Noto_Color_Emoji:h11", indicating a fallback to the Noto Color Emoji font for character sets not available in Consolas.
However, with the release of Neovide 0.12.1, users now have the ability to configure fonts and font features in the config.toml file. While this enhancement is a great addition to Neovide, it currently lacks the capability for users to establish fallback fonts to accommodate diverse requirements.

Describe the solution you'd like
Add an option to specify a fallback font in config.toml file

Describe alternatives you've considered
I think support for fallback fonts in config.toml would be best for symmetry

@comiluv comiluv added the enhancement New feature or request label Jan 5, 2024
@comiluv comiluv changed the title [request] config.toml setting for specifying fallback fonts config.toml setting for specifying fallback fonts Jan 5, 2024
@TwIStOy
Copy link
Contributor

TwIStOy commented Jan 7, 2024

You can also specify fallback fonts in config.toml. Like,

[font]
normal = [ "Symbols Nerd Font Mono", "FiraCode" ]

Sorry for the document of this feature is not clear.

@comiluv
Copy link
Author

comiluv commented Jan 7, 2024

Thank you for your reply.
I tried setting up fallbacks using "Noto Emoji" from Google but have trouble getting it work properly.
I started with consolas as the default font and Neovide looks like below:
화면 캡처 2024-01-07 150237

and if I add Noto Emoji to display emojis on Neovide with specific fonts,
Neovide screen looks like below: emoji is displayed in Noto Emoji's monochrome emoji as expected but alphanumerics aren't displayed in consolas
화면 캡처 2024-01-07 151400

If I swap "Noto Emoji" and "consolas" position in config.toml like below, alphanumerics are displayed using consolas, but the emoji is displayed in some kind of Windows default, where monochrome emoji from Noto Emoji is expected.
화면 캡처 2024-01-07 151419

TwIStOy added a commit to TwIStOy/neovide that referenced this issue Jan 7, 2024
@TwIStOy
Copy link
Contributor

TwIStOy commented Jan 7, 2024

Ah, It's an issue about parsing these configurations. Please try #2244. It seems work now!

@fredizzimo fredizzimo linked a pull request Jan 8, 2024 that will close this issue
Kethku pushed a commit that referenced this issue Jan 8, 2024
* swap item order in enum, fix: #2240

* add more test cases
@BatmanAoD
Copy link
Contributor

It seems that even in config.toml, fallback is "noisy" as described in this issue: #2533

Is that intentional? I use the same vim/neovide config across all my machines, and don't necessarily have my preferred fonts set up on all of them, and my preferred pre-installed font depends on the OS. So the "silent fallback" behavior was very convenient for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants