hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

Cannot load custom font. #8

Closed DasOhmoff closed 3 years ago

DasOhmoff commented 3 years ago

Hello :wave: :) Thank you for your support!

I tried using different fonts using neoray, but that does not seem to be working.

Here is the font that I have installed: image

Here is my .vimrc config line:

set guifont=UbuntuMono_NF:h8

And here is neorays output on startup: image

If I use the same configuration on some other gui client, then it seems to work correctly.

hismailbulut commented 3 years ago

First make sure your font is not .ttc font. Currently neoray doesn't support them. Second try with the family name. Like Consolas, UbuntuMono\ NF eg. If it can't find with family name you need to write a name from file name. Let's say your font family name is UbuntuMono NF and it couldn't find from it and font's file names are like these:

Now if you set guifont to 'Ubuntu\ Mono' or 'Ubuntu_Mono' (leading common words) It will find all of them and determines which one is regular, italic eg. I know this is not like you used to. But finding a font from it's family name is not an easy thing and it changes os to os. This is why most of the gui clients uses qt like frameworks. I did a lot of research in the beginning to find a library that just does that. But I couldn't find. Anyway I hope you can find your font from it's file name. Let me know whether you success.

DasOhmoff commented 3 years ago

Hello, I have not tested your suggestion yet, I did not come to it until now, have a lot of stuff to do. I will inform you when I test it :)

DasOhmoff commented 3 years ago

I know this is not like you used to. But finding a font from it's family name is not an easy thing and it changes os to os.

It's all cool brother, don't worry <3 :)

If it can't find with family name you need to write a name from file name.

Ah yes! That is it. Now it seems to work, setting the fonts file name resolves the issue!

Sorry for keeping this open for so long, it seems this was easier to fix than I expected.

hismailbulut commented 3 years ago

I uploaded new version and started the close some issues. I thought you fixed your issue and forgot to write here and I closed this one also. I am glad you success!

DasOhmoff commented 3 years ago

thank you :)