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

[Feature Request] Support specifying fallback fonts #42

Closed
statiolake opened this issue Jan 18, 2022 · 3 comments
Closed

[Feature Request] Support specifying fallback fonts #42

statiolake opened this issue Jan 18, 2022 · 3 comments

Comments

@statiolake
Copy link
Contributor

statiolake commented Jan 18, 2022

The issue #29 is closed but it would be great to have font fallbacking. I'm Japanese and we're using CJK characters in addition to ASCII characters, so I need to set ASCII coding fonts (like Consolas) and fallbacking CJK fonts (like Meiryo). Though current version does fallback to the system default font, I want to specify the font by myself.

If you are interested, you can look at an experimental implementation in my fork: statiolake@123002b. I tried to implement basic font fallbacking similar to Nvui. It basically works for me, but a there's also a problem: you can now decide which font to fall back to, but instead, it won't fall back unless you set it to do so. Default fallback no longer occurs.

@tejasvi
Copy link

tejasvi commented Feb 11, 2022

See equalsraf/neovim-qt#614. The implementation might get complicated to avoid slowing down the startup (one of the USP of nvy).

@statiolake
Copy link
Contributor Author

In my understanding, equalsraf/neovim-qt#614 is the slowdown caused by Qt framework, not by Windows or DirectWrite itself. Moreover, font fallbacking is already supported in Nvy, just specifying fallback fonts is not supported.

@statiolake statiolake changed the title [Feature Request] Support fallback fonts [Feature Request] Support specifying fallback fonts Feb 11, 2022
@RMichelsen
Copy link
Owner

I agree that having the option to specify the fallback font instead of it defaulting to Consolas would be good, we just need to modify the "parser" (https://github.com/RMichelsen/Nvy/blob/master/src/nvim/nvim.cpp#L163) and decide on how it should be specified in the init.vim. It's not a huge task I'll see if I can find some time to do this soon, if not feel free to open a PR.

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

No branches or pull requests

3 participants