ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
53.86k stars 3.63k forks source link

How to install? (for urxvt) #287

Closed brontosaurusrex closed 5 years ago

brontosaurusrex commented 6 years ago

Debian Stretch,

  1. Downloaded version 2 of Fantasque font (Which I assume is already pached one)
  2. Unpacked
    Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf
    Fantasque Sans Mono Bold Nerd Font Complete Mono.ttf
    Fantasque Sans Mono Bold Italic Nerd Font Complete Mono.ttf
    Fantasque Sans Mono Italic Nerd Font Complete Mono.ttf

to ~/.fonts

  1. run

    fc-cache -vf ~/.fonts/

  2. Edited .Xresources like so

! old one
!URxvt.font: xft:FantasqueSansMono-Regular:size=12
! new one    
URxvt.font: xft:FantasqueSansMonoNerdFontCompleteM-Regular:size=12

The name i got from

fc-scan --format "%{postscriptname}\n" font.ttf
  1. No joy, doesn't work, font doesn't show in urxvt. Font does show in my gui font viewer with status 'installed'. edit: Font does work with tilix terminal.

Various links that should lead me to correct install procedure seems to be wrong.

p.s. This

fc-list -f "%{family} : %{file}\n" :spacing=100 | sort    ## list monospace fonts by family and file

doesn't include fantasques in its output.

ryanoasis commented 6 years ago

I'll have to test this out... Ideally the mono fonts should work in Urxvt but you are proving there is an issue. Thanks

efade commented 6 years ago

@brontosaurusrex you got the name wrong in your config. It should've been:

URxvt.font: xft:FantasqueSansMono Nerd Font:size=12

When looking for a font name, just type: fc-list | grep -i <keyword> In this case, if I typed fc-list | grep -i fantasque, I'll get this output:

/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Regular Nerd Font Complete Windows Compatible.ttf: FantasqueSansMono NF:style=Regular
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Italic Nerd Font Complete.ttf: FantasqueSansMono Nerd Font:style=Bold Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Regular Nerd Font Complete Mono.ttf: FantasqueSansMono Nerd Font Mono:style=Regular
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Italic Nerd Font Complete.ttf: FantasqueSansMono Nerd Font:style=Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Italic Nerd Font Complete Mono.ttf: FantasqueSansMono Nerd Font Mono:style=Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Italic Nerd Font Complete Windows Compatible.ttf: FantasqueSansMono NF:style=Bold Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Regular Nerd Font Complete Mono Windows Compatible.ttf: FantasqueSansMono NF:style=Regular
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono Windows Compatible.ttf: FantasqueSansMono NF:style=Bold Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Regular Nerd Font Complete.ttf: FantasqueSansMono Nerd Font:style=Regular
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Nerd Font Complete Mono.ttf: FantasqueSansMono Nerd Font Mono:style=Bold
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Italic Nerd Font Complete Mono Windows Compatible.ttf: FantasqueSansMono NF:style=Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Nerd Font Complete.ttf: FantasqueSansMono Nerd Font:style=Bold
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Nerd Font Complete Windows Compatible.ttf: FantasqueSansMono NF:style=Bold
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Italic Nerd Font Complete Mono.ttf: FantasqueSansMono Nerd Font Mono:style=Bold Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Italic Nerd Font Complete Windows Compatible.ttf: FantasqueSansMono NF:style=Italic
/usr/share/fonts/nerd-fonts/FantasqueSansMono/Fantasque Sans Mono Bold Nerd Font Complete Mono Windows Compatible.ttf: FantasqueSansMono NF:style=Bold

Look for the name before :style= section. That's the name that you should put in your config.

brontosaurusrex commented 6 years ago

efade: Thanks, so you are saying this is working for you? (Doesn't make any difference here, urxvt shows wrong font).

edit: Ok I got it, this

URxvt.font: xft:FantasqueSansMono Nerd Font Mono:size=12

Of course now it turns out this is incompatible with my non-default font line-height, but that's for another thread, solved.

ryanoasis commented 5 years ago

@efade thanks for the helping out @brontosaurusrex thanks for the follow-up and yes you are right that issue would be a separate issue, and I believe there are multiple issues in the repo about things like line-height and other things not being the same after patching.

It would be good to add some examples or more detailed help for URxvt in the wiki perhaps?

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.