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

Nerd fonts are not shown in gnome terminal and gvim font selection list #318

Closed
1bool opened this issue Jan 23, 2019 · 14 comments
Closed

Nerd fonts are not shown in gnome terminal and gvim font selection list #318

1bool opened this issue Jan 23, 2019 · 14 comments

Comments

@1bool
Copy link

1bool commented Jan 23, 2019

🎯 Subject of the issue

The cause should be that nerd fonts have proportional spacing property for mono spacing fonts. See attached image.

🔧 Your Setup

  • Tried a lot of mono fonts
  • Using gnome terminal
  • Using Ubuntu

★ Optional

2019-01-23 17-56-42

@durandj
Copy link

durandj commented Jan 28, 2019

I've been experiencing the same issue on Ubuntu 18.10. The issue seems to be that the Gnome Terminal application only accepts monospaced fonts and for some reason it's not recognizing these fonts as monospaced.

A possible temporary workaround is to set the system font to whichever font you want and then tell the Terminal application to use the system font instead of a custom font.

@dynofu
Copy link

dynofu commented Feb 8, 2019

i run into some similar issue and i believe the problem is nerd fonts does not declare spacing.
powerline font has no problem to be used in gvim but nerdfont simply show double width.

diff -u <(fc-query -b Hack\ Regular\ Nerd\ Font\ Complete\ Mono.ttf) <(fc-query -b Hack-Regular.ttf) 
--- /dev/fd/63	2019-02-08 14:05:53.641296122 -0800
+++ /dev/fd/62	2019-02-08 14:05:53.641296122 -0800
@@ -1,15 +1,16 @@
-Pattern has 22 elts (size 32)
-	family: "Hack Nerd Font Mono"(s)
+Pattern has 23 elts (size 32)
+	family: "Hack"(s)
 	familylang: "en"(s)
 	style: "Regular"(s)
 	stylelang: "en"(s)
-	fullname: "Hack Regular Nerd Font Complete Mono"(s)
+	fullname: "Hack Regular"(s)
 	fullnamelang: "en"(s)
 	slant: 0(i)(s)
 	weight: 80(f)(s)
 	width: 100(f)(s)
+	spacing: 100(i)(s)
 	foundry: "SRC"(s)
-	file: "Hack Regular Nerd Font Complete Mono.ttf"(s)
+	file: "Hack-Regular.ttf"(s)
 	index: 0(i)(s)
 	outline: True(s)
 	scalable: True(s)
@@ -17,7 +18,7 @@
 	capability: "otlayout:DFLT otlayout:latn"(s)
 	fontformat: "TrueType"(s)
 	decorative: False(s)
-	postscriptname: "HackNerdFontCompleteM-Regular"(s)
+	postscriptname: "Hack-Regular"(s)
 	color: False(s)
 	symbol: False(s)
 	variable: False(s)

the thing that matters is spacing: 100(i)(s)

@dyno
Copy link

dyno commented Feb 8, 2019

https://unix.stackexchange.com/questions/363365/command-to-list-all-monospace-fonts-known-to-fontconfig

The command fc-list can list all available fonts according to their properties. In your case one needs to search for the spacing corresponding to mono, that would be 100, so fc-list :spacing=100. Simpler form fc-list :mono should probably work too.

@astrolemonade
Copy link
Contributor

Is there any solution for this issue ? Beside the fact that they aren't recognised by the terminal the horizontal spacing is horrible!

@matyasselmeci
Copy link

As a workaround, is there something we can add to the fontconfig fonts.conf file to set the spacing appropriately?

@lmagomes
Copy link

lmagomes commented Nov 12, 2019

As a workaround, on pop os, I used dconf to force it.

I copied the otf files to ~/.local/share/fonts

and then ran:
dconf write /org/gnome/terminal/legacy/profiles:/<profile-id>/font "'Fura Mono NF 12'"

(you can tab complete the directory path, or do "dconf list /org/gnome/terminal/legacy/profiles:/" to find your profile id).

@cnscorpions
Copy link

@lmagomes it works, thanks

@nanobowers
Copy link

In case this helps for the Gnome Terminal aspect of this issue

Related to https://askubuntu.com/questions/593468/why-gnome-terminal-doesnt-display-a-specific-font-as-available , I found that after changing the setting Allow blinking text to Never (A bit below the custom font setting) let my newly installed nerd-font show up in the font list. (Using Gnome Terminal 3.38.1 on Fedora 33)

@lixiaoquan
Copy link

In case this helps for the Gnome Terminal aspect of this issue

Related to https://askubuntu.com/questions/593468/why-gnome-terminal-doesnt-display-a-specific-font-as-available , I found that after changing the setting Allow blinking text to Never (A bit below the custom font setting) let my newly installed nerd-font show up in the font list. (Using Gnome Terminal 3.38.1 on Fedora 33)

@nanobowers it works for me, thanks. BTW, after setting Allow blinking text to Never, I have to close all gnome-terminal sessions and start a new one to make it work.

@neo-ctataryn
Copy link

Confirmed that gVim for Windows also has this issue, the patched Nerd Fonts don't show up in the list of fonts when selecting them.

@Finii
Copy link
Collaborator

Finii commented Dec 1, 2021

Hmm, @neo-ctataryn can you tell me one example where it is not shown?

Tried one font, and it works 😬 :
image

Only one (the non-nf-mono one) installed:

image

Edit: Add details on which concrete font I tried

@Finii
Copy link
Collaborator

Finii commented Dec 1, 2021

On windows this can be related to #695, wanted to try that.

@Finii
Copy link
Collaborator

Finii commented Jan 30, 2023

@Finii Finii closed this as completed Jan 30, 2023
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests