-
Notifications
You must be signed in to change notification settings - Fork 1
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
Deprecated: wcwidth callback via socket / OSC escape sequences #1
base: master
Are you sure you want to change the base?
Conversation
This make rxvt-unicode recognize Font Awesome [1], which only has glyphs in the Private Use Areas (PUA) (xf000 - xf2b4), which are not tested by `rxvt_font_xft::load`. But is also has a glyph for 0x020 (Space). This patch fixes the font from being ignored with the following message: > urxvt: unable to calculate font width for > 'FontAwesome-4:slant=0:weight=200:minspace=True', ignoring. Not all glyphs will be displayed by rxvt-unicode (e.g. 0xf243 (fa-battery-1) is too wide still), but most of them will show up. 1: http://fontawesome.io/
`--enable-wcwidthcallback` needs the #ifdefs still.
This makes Zsh not think the wcwidth is broken, which makes it use its internal one.
Update: I'm using another approach by now, which uses a custom OSC escape sequence to query the |
This one works fine, but it crashes from time to time with "Can't connect to socket..." or something like that. It's rare but it happens. I just tried your previous hack : exg/rxvt-unicode@master...blueyed:display-wide-glyphs However, I'm interested in that another approach (OSC escape sequence), so it would be great if you could upload that patch somewhere. Thanks. |
@kajzersoze The OSC escape sequences worked better than the socket, but are a) also slowish in general, and b) do not work if there is no tty attached, e.g. with tmux. See also the README: https://aur.archlinux.org/cgit/aur.git/tree/README.md?h=rxvt-unicode-cvs-patched-wideglyphs I have the OSC approach only locally (though it evolved quite a bit, allowing to toggle it etc), and would require some cleanup/work before pushing it somewhere. And given that it is not working too well also, it's not really worth it. |
Feel free to report it at https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide. |
I see, well never mind the OSC method then. I think I see what might be the problem, I'm not using AUR, I'm on gentoo and I just made a patch from the link I gave earlier, from that AUR package link you gave above I can see there are 3 more patches beside the main one (I just used enable-wide-glyphs.patch, wish I knew about this AUR package, it would save me some time making manually that patch :) ), so that's why maybe I was having issues with couple of glyphs, I don't think sgr-mouse-mode.patch is related but those other two might be. btw I think I tried every possible scenario trying to fix this issue urxvt has with powerline fonts and only your hack helped, nothing else, so big thanks for making this ! |
@kajzersoze |
Okay, well actually I think it might be my bad, I'll try it in a min and let you know, I forgot that this hack relies on adding whitespace after a glyph, it's probably that, will let you know as soon as I try. |
Yeah that did it! It was my mistake, sorry about that. |
Awesome! |
Indeed, didn't know that, very useful, I had URxvt*letterSpace: -2 :) |
See the README in the branch: https://github.com/blueyed/rxvt-unicode/blob/wcwidth-hack/README.md.
Done as a PR to allow for comments / review.