Open ray-x opened 3 years ago
Currently neoray doesn't have an ability for rendering emojis, sorry for that. It seems like your font does not have this glyph and kitty uses some sort of another symbol font. Neoray currently can only render glyphs if it is in the specified user font or in default font.
Yes. I am using nvim-web-devicons plugin. So some of the fonts are from devicons but not in nerd fonts. Also noticed that the ligature is not working.
I have the same issue despite registering the Nerd Font:
[TRACE] [NEORAY] Regular: Fira Code Retina Nerd Font Complete.otf
[WARNING] [NEORAY] Font has no bold italic face.
[WARNING] [NEORAY] Font has no italic face.
[WARNING] [NEORAY] Font has no bold face.
Here's the same part in my terminal using the same font:
Oddly enough, many other icons work in Neoray, so maybe it's just the arrow symbol that happens to be missing 🤔
However, what matters more to me is that ligatures aren't supported:
Do you know if this is a limitation of the font rendering library that's being used?
I solve this by using a manually patched nerdfont. But it took lots of efforts. Would be great neoray can load the graph vector from a built-in default font.
@ray-x @reykjalin Currently neoray using x/image/opentype font library which is a new library and maintained by only one person (I think). It's a complete opentype parser and uses x/image/vector for rasterizing fonts. Both libraries are almost complete, well written in pure go by google devs. This is the reason why I choosed them. But vector library is not drawing well in low dpi lcd monitors like cleartype or freetype and opentype parser library doesn't supports ligatures and emojis. Adding this features requires hard work but I believe golang devs will add them if we open an issue and when they have some free time. But this is not something I can do.
And one simplest solution for missing glyphs is find the actual fonts where these glyphs are coming from and then I can pack them with default font.
Other solution is we can add a new option for letting users to give some alternative font names to neoray and then neoray can use them in order for missing glyphs.
The last solution is like second, but instead asking to user, we will define some default symbol fonts per platform and use it if they available. These font's are not guaranteed to be in the user's system especially for linux.
The last two solutions disadvantage is neoray will load the fonts even when they don't need to be used and will increase memory consumption. Also I haven't got some free time for doing these soon.
Personally I think it's fine to wait for the libraries to add support for these icons/ligatures — no rush from my end. Thank you for the work on neoray, it's great!
Please complete the following information:
Describe the bug Some font failed to render
Steps to reproduce Can not render emoji Also some font failed to render:
Left: in kitty, same font Right: neoray
Your neoray config in init.vim (Only the part that concerns neoray!)
Crash log if available (may be generated by neoray after crash)
Debug output (you can generate starting neoray with --verbose option) [DEBUG] [NVIM] Neovim started with command: nvim --embed [TRACE] [NVIM] Neovim version 0.6.0 [DEBUG] [NVIM] Attached to neovim as an ui client. [TRACE] [NEORAY] Glfw version: 3.3.4 Cocoa NSGL EGL OSMesa [DEBUG] [NEORAY] Monitor count: 1 Selected monitor: Built-in Retina Display [DEBUG] [NEORAY] Video mode &{Width:1792 Height:1120 RedBits:8 GreenBits:8 BlueBits:8 RefreshRate:60} [DEBUG] [NEORAY] Glfw window created with size 800 600 [DEBUG] [NEORAY] Monitor diagonal: 15.95 pdpi: 264.98 ldpi: 144.00 [DEBUG] [NEORAY] Using logical dpi. [DEBUG] [NEORAY] Input callbacks are initialized. [DEBUG] [RENDERER] Initializing opengl. [TRACE] [RENDERER] Opengl Version: 4.1 ATI-3.10.22 [DEBUG] [RENDERER] Vendor: ATI Technologies Inc. [DEBUG] [RENDERER] Renderer: AMD Radeon Pro 5300M OpenGL Engine [DEBUG] [RENDERER] GLSL: 4.10 [DEBUG] [NEORAY] Loading default font. [DEBUG] [NEORAY] Default font loaded. [DEBUG] [NEORAY] Requesting deprecated options. [DEBUG] [NEORAY] Checking user options. [DEBUG] [NVIM] Option CursorAnimTime is 0.04 [DEBUG] [NVIM] Option Transparency is 0.95 [DEBUG] [NVIM] Option TargetTPS is 120 [DEBUG] [NVIM] Option ContextMenuOn is true [DEBUG] [NVIM] Option WindowSize is 120 40 [DEBUG] [NEORAY] Loading font Victor Mono with size 14 [TRACE] [NEORAY] Regular: Victor Mono Regular Nerd Font Complete.ttf [TRACE] [NEORAY] Bold Italic: Victor Mono Bold Italic Nerd Font Complete.ttf [TRACE] [NEORAY] Italic: Victor Mono Italic Nerd Font Complete.ttf [TRACE] [NEORAY] Bold: Victor Mono Bold Nerd Font Complete.ttf