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

Cannot be used with urxvt #3681

Closed
Mikaela opened this issue Jun 10, 2014 · 26 comments
Closed

Cannot be used with urxvt #3681

Mikaela opened this issue Jun 10, 2014 · 26 comments

Comments

@Mikaela
Copy link

Mikaela commented Jun 10, 2014

Related config:

URxvt*font: xft:DejaVu Sans Mono:pixelsize=11, xft:unifont:pixelsize=11, xft:Andale Mono:pixelsize=11, xft:Inconsolata:pixelsize=11, xft:FontAwesome:pixelsize=11

Error:

urxvt: unable to calculate font width for 'FontAwesome:slant=0:weight=100:pixels
ize=11:minspace=True', ignoring.

Version: 4.0.0~dfsg-1

@tagliala
Copy link
Member

Any hints on what we can do to fix this?

@Mikaela
Copy link
Author

Mikaela commented Jun 11, 2014

No, sorry. I only tried with that config and always when Awesome char comes, I get that error in the terminal where I executed urxvt to see errors.

@andornaut
Copy link

I'm also hitting this issue. You might find it easier to reproduce by starting urxvt with:

urxvt -fn "xft:Font Awesome"

@rebasar
Copy link

rebasar commented Feb 9, 2015

Can confirm. On Debian Wheezy with backports repo enabled. Relevant package versions:

fontconfig: 2.9.0-7.1
libxft2: 2.3.1-1
rxvt-unicode: 9.15-2+deb7u1
reb@terra:~% fc-list| grep Awesome
/home/reb/.fonts/fontawesome-regular.ttf: FontAwesome:style=Regular
reb@terra:~%

If you need any other information, I will be happy to provide.

@tagliala
Copy link
Member

check other icon fonts (like glyphicons) and let us know if you experience the same issue

@rebasar
Copy link

rebasar commented Feb 10, 2015

Hi,

I don't have glyphicons installed (due to licensing issues) but I do have Pomodoro, Trellicons and Octicons installed and I get the same issue with those too.

@tagliala
Copy link
Member

@rebasar thanks for the feedback. Maybe there are issues with the PUA?

Since this is not related to fontawesome I need to close this request but feel free to comment

@Anachron
Copy link

Anachron commented Jan 6, 2016

@tagliala I also have this issue and would like it to be resolved. =)
What information do you need further to dig into it?

Edit:

 $ fc-list | grep awesome
/usr/share/fonts/TTF/fontawesome-webfont.ttf: FontAwesome:style=Regular
$ sudo pacman -Qe | grep font
ttf-font-awesome 4.5.0-2

inside .Xresources

URxvt.font:             xft:Droid\ Sans\ Mono:pixelsize=12:Regular,xft:Font\ Awesome:antialias=true:pixelsize=12

@tagliala
Copy link
Member

tagliala commented Jan 6, 2016

@Anachron sorry but I have no hint on how to solve this.

Please try the .otf version of fontawesome or other webfonts (glyphicons, material design icons, elusive icons, octicons, ionicons...).

If also other webfonts have the same issue so this is probably something that does not depend on fontawesome

@Anachron
Copy link

Anachron commented Jan 6, 2016

It works with powerline symbols for example. 👍

@pinpox
Copy link

pinpox commented Feb 15, 2016

I'm still having this exact issue. Has there been found a solution somewhere?
Using the rxvt-unicode-patched version from the AUR (Arch linux)

@shellkr
Copy link

shellkr commented Apr 30, 2016

I have it working when using xft:SauceCodePro NF:pixelsize=9 as a fallback in ~/.Xresources. The font can be found at https://github.com/ryanoasis/nerd-fonts.

FontAwesome working

rxvt-unicode (urxvt) v9.22 - released: 2016-01-23
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr
+zh+zh- ext,fade,transparent,tint,XIM,frills,selectionscrolling,wheel,slipwheel,cursorBlink,
pointerBlank,scrollbars=plain+rxvt+NeXT+xterm

@blueyed
Copy link

blueyed commented Oct 20, 2016

This is a bug in rxvt-unicode, which only looks at chars that are not included in the font when determining its width. The fix is to also consider spaces in this process: http://lists.schmorp.de/pipermail/rxvt-unicode/2016q4/002308.html.

@blueyed
Copy link

blueyed commented Oct 20, 2016

But rxvt-unicode will still have problems with wide glyphs, with a width of 1 cell according to wcwidth.
Check out ryanoasis/nerd-fonts#92 (comment) and the comments around it.

@blueyed
Copy link

blueyed commented Oct 20, 2016

This issue will show itself when starting rxvt-unicode from another terminal, where you should then see a message like the following when a glyph from the font is attempted to be used:

urxvt: unable to calculate font width for 'FontAwesome-4:slant=0:weight=200:minspace=True', ignoring.

@ghost
Copy link

ghost commented Feb 7, 2017

@blueyed What is that patch supposed to fix? I have FontAwesome as a fallback font in urxvt and I applied that patch (successfully) to rxvtfont.C, but I still can't get it to work.

@blueyed
Copy link

blueyed commented Feb 7, 2017

@poisonby
There are other issues you might run into now, e.g. that urxvt considers the glyphs to be too wide.
Try some glyphs that are narrow, and more likely to fit into a cell.

@ghost
Copy link

ghost commented Feb 8, 2017

@blueyed

You're right, some characters seem to work (like \uf07d), though most doesn't work. Is there no way to get all characters to work, or is the only option to switch to another terminal emulator?

Thanks.

@blueyed
Copy link

blueyed commented Feb 8, 2017

I have two hacks in this regard (see my fork). Not much love for this by default.. ;)
blueyed/rxvt-unicode#1

Using another approach locally since a while.

@ghost
Copy link

ghost commented Feb 8, 2017

@blueyed

I actually compiled and installed it by messing with ABS, didn't see that you had a README there so it appears I missed a few build options. I'm running Arch though so I'll try your PKGBUILD. =) I'll update if it works.

@ghost
Copy link

ghost commented Feb 8, 2017

@blueyed

It worked! Thanks for the help. An effect from this though is that I had to switch URxvt.letterSpace from -1 to -2 to set the correct spacing. The characters seem to show up regardless though. =)

@guest73
Copy link

guest73 commented Jun 22, 2017

Hi @blueyed, I tried your hack and it kind of worked for me. The only problem is, I am used to rxvt-unicode-256color. With your patched version I cannot make it to use 256 colors. Can we have the patch for 256color version?

@blueyed
Copy link

blueyed commented Jun 22, 2017

@guest73
Which one have you tried?
I recommend my first approach: https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide.
It is available in AUR: https://aur.archlinux.org/packages/rxvt-unicode-cvs-patched-wideglyphs/

@guest73
Copy link

guest73 commented Jun 22, 2017

@blueyed
Thanks for responding. I used the one from here https://github.com/blueyed/rxvt-unicode/blob/wcwidth-hack/README.md. But the problem is I am on Debian and I am not so skilled in all this mumbo-jumbo. Debian has 2 packages rxvt-unicode and rxvt-unicode-256color. I think your patch was for the first one. I think the first one has something like max_colors#88, max_pairs#7744 and the second one max_colors#256, max_pairs#32767 according to terminfo but I am really not sure what it is all about.

@blueyed
Copy link

blueyed commented Jun 22, 2017

So you are building your own .deb then?
You should use the patch(es) from https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide then.
When building from source (or in general), the PKGBUILD might come in handy for guidance: https://github.com/blueyed/PKGBUILD-rxvt-unicode-wide/blob/master/PKGBUILD

It is pretty offtopic here though, so let's stop there.

@dhruvinsh
Copy link

well if anyone still looking for solution, Nerd patched font did work for me without any issue.
20190330_145338

my .Xresources file has this config:

URxvt.font: xft:SF Mono:size=12,xft:Inconsolata Nerd Font Mono:size=11 
URxvt.letterSpace: -1 

main font is SF Mono and fallbacks to Nerd patched font.

System
Ubuntu 18.04
rxvt-unicode (urxvt) v9.22 - released: 2016-01-23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants