Scala filetype icon not rendering properly when using Inconsolata for powerline Nerd Font _Mono_
terminal in use : urxvt 256 color
font name: Inconsolata for Powerline Nerd Font Mono.otf from minimal folder
Xresources font settings:
URxvt.font: xft:InconsolataForPowerline Nerd Font:pixelsize=16:antialias=false:hinting=true
Screenshot:

Possible cause of error:
Other file type glyphs render properly except the scala glyph. The urxvt doesn't know how to render variable width font so it is likely that scala glyph in included in the font isn't mono
Yikes, yeah I can see a problem with even other glyphs as well.

Honestly it's been a long time since I've looked at what is happening with the single width glyphs, they don't all seem to get adjusted properly.
FWIW: urxvt tends to throw away too wide glyphs.
@jinmel Are you using the URxvt.letterSpace setting at all? I found that to have an impact on how many glyphs were not rendered by urxvt. I have to set it to -2 for spacing on Knack to look right.
It's worth mentioning @blueyed's fork https://github.com/blueyed/rxvt-unicode/tree/display-wide-glyphs. I use it myself and it works quite well: I don't even use the Mono versions of nerd fonts.
The way I understand it, instead of using a glyph's _spacing_ to determine it's rendering, urxvt uses each glyph's _width_ to render it. If a glyph is very slightly too big it'll try to render it, but if it's too big it'll just show the rectangle instead. The forked version fixes it to use spacing instead of width. The maintainer of the original repo won't merge the patch.
I had to build a new package on Debian, which is a mission if you're familiar with the process of doing it The Debian Way™. I had to get a patch, which I did by cloning the original urxvt git repo, adding the fork as a remote, fetching it, and then getting the patch like this: git diff origin/master...blueyed/display-wide-glyphs > display-wide-glyphs.patch.
See this Superuser answer by @blueyed for more information and a link to an Arch AUR for a pre-patched version.
@zeorin
Thanks! :)
It is currently not included in Arch's rxvt-unicode-patched however, because it caused crashes that I could not reproduce. I am glad it works for you! :)
I have looked into some minor issues with my branch during the last days and learnt a lot about urxvt's internals on the way.
I am experimenting with a hack that uses the font itself to get the width (instead of using the wcwidth system function, which is meant to return what the Unicode spec thinks).
Since a lot of (all?) of the glyphs in this font are from the private space, where the width is defined as ambitious, this should work better and is probably the way to go with codepoints from the private space?!
It will use this method inside of rxvt-unicode itself, and the injects wcwidth through LD_PRELOAD to the terminal's child process, communicating through pipes then..
(btw: with Unicode 9 emojis have a width of 2 now finally, but glibc is not yet updated for Unicode 9, and it does not affect the glyphs from this font)
See https://github.com/termux/wcwidth/issues/1, and the project itself for a C version that is Unicode 9 compatible.
Unfortunately both Vim and Neovim do not use the system's wcwidth function, but their own version, so you cannot inject a new one using LD_PRELOAD directly.
I think I should push my branch and not hijack this issue further.. ;)
The takeaway however is that urxvt is very strict in this regard.
This is probably still a problem but if anyone wants to attempt to see if the fonts in 0.9.0 branch help solve the issues go for it :smile:
Closing due to age of issue and that this has workarounds in terms of terminal or using one of the mono Nerd Fonts (single width glyphs).
Most helpful comment
@jinmel Are you using the
URxvt.letterSpacesetting at all? I found that to have an impact on how many glyphs were not rendered by urxvt. I have to set it to-2for spacing on Knack to look right.It's worth mentioning @blueyed's fork https://github.com/blueyed/rxvt-unicode/tree/display-wide-glyphs. I use it myself and it works quite well: I don't even use the Mono versions of nerd fonts.
The way I understand it, instead of using a glyph's _spacing_ to determine it's rendering, urxvt uses each glyph's _width_ to render it. If a glyph is very slightly too big it'll try to render it, but if it's too big it'll just show the rectangle instead. The forked version fixes it to use spacing instead of width. The maintainer of the original repo won't merge the patch.
I had to build a new package on Debian, which is a mission if you're familiar with the process of doing it The Debian Way™. I had to get a patch, which I did by cloning the original urxvt git repo, adding the fork as a remote, fetching it, and then getting the patch like this:
git diff origin/master...blueyed/display-wide-glyphs > display-wide-glyphs.patch.See this Superuser answer by @blueyed for more information and a link to an Arch AUR for a pre-patched version.