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

Setting fontsize causing error #2444

Closed
idelice opened this issue Mar 25, 2024 · 3 comments
Closed

Setting fontsize causing error #2444

idelice opened this issue Mar 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@idelice
Copy link

idelice commented Mar 25, 2024

Describe the bug
I tried setting the font size in my init.lua:

if vim.g.neovide then
  vim.g.neovide_transparency = 0.6
  vim.g.neovide_window_blurred = true
  vim.g.neovide_unlink_border_highlights = false
  vim.g.neovide_refresh_rate = 120
  vim.g.neovide_remember_window_size = true
  vim.g.neovide_show_border = false
  -- vim.g.neovide_floating_blur_amount_x = 2.0
  -- vim.g.neovide_floating_blur_amount_y = 2.0
  vim.g.neovide_floating_shadow = true
  vim.g.neovide_floating_z_height = 10
  vim.g.neovide_light_angle_degrees = 45
  vim.g.neovide_light_radius = 5
  vim.o.guifont = ":h11" -- text below applies for VimScript
end

and I get the following error when opening a new neovide instance:
Screenshot 2024-03-25 at 22 25 43

Expected behavior
I expect the font size to be changed to the one i set and receive no errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [macOS 14.3]
  • Neovide Version [0.12.2]
  • Neovim Version [0.9.5]
@idelice idelice added the bug Something isn't working label Mar 25, 2024
@fredizzimo
Copy link
Member

You need to specify a font name before :h11, you can check available fonts with set guifont=*

@idelice
Copy link
Author

idelice commented Mar 26, 2024

You need to specify a font name before :h11, you can check available fonts with set guifont=*

I've already tried that and a couple of other suggested solutions from Reddit but none worked... can you please provide me an example of only changing the font size?

@fredizzimo
Copy link
Member

To change the font size you can you the neovide_scale_factor option. There are some examples in this discussion #2301 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants