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

Glyph smaller than character #127

Closed
4 tasks done
kiuKisas opened this issue Jan 26, 2017 · 63 comments
Closed
4 tasks done

Glyph smaller than character #127

kiuKisas opened this issue Jan 26, 2017 · 63 comments

Comments

@kiuKisas
Copy link

Requirements

If you are not sure whether or not what you are reporting is actually an issue or you have a general question please message in the Gitter Chat Room

By posting an issue you acknowledge the following:

  • A brief but descriptive title of your issue
  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have read or at least glanced at the FAQ
  • I have read or at least glanced at the Wiki

These items you must provide answers to. Make sure to add all the information needed to understand the issue so that someone can help. If the info is missing we'll add the 'Needs more information' label and may choose to close the issue until there is enough information.

^ ----- Please remove all of the above and this line before posting your issue ----- ^

Subject of the issue

Glyph looks smaller than characters in neovim, with vim-devicons

Your Setup

  • Knack Nerd Font (download from the github)
  • termite with zsh
  • Arch Linux - kernel 4.8.13-1-ARCH

Optional

2017-01-26-135412_958x1050_scrot

@jayywolff
Copy link

jayywolff commented Jan 27, 2017

I can also confirm the small icons, and I have the same setup but except I'm on the Fura Mono Font

Arch Linux : x86_64 Linux 4.8.13-1-ARCH
AUR pkg version : nerd-fonts-complete 1.0.0-1

I have this issue with every font I've tried so far
including (inconsolata, fura mono, meslo, terminess, dejavu sans, knack)
This is not just a terminal specific issue Ive noticied this in termite, i3bar , & gvim

2017-01-27-001017_1920x1080_scrot

@ryanoasis
Copy link
Owner

Ouch. Thank you both for the details. I will try to take a look this weekend if I get the chance

@ryanoasis
Copy link
Owner

Can either/both of you tell me the exact font using? Most importantly if it ends in Complete Mono ?

@jayywolff
Copy link

I'm using FuraMonoForPowerline Nerd Font Regular 11 in the terminal.

@jayywolff
Copy link

jayywolff commented May 5, 2017

This very likely may not have been an upstream bug. I noticed all of the affected users are running the AUR version of nerd-fonts. There was an update to the AUR package today where the package maintainer noted he removed he removed the "single-width-glyphs" variant fonts from the package so the system would use the "non-single-width-glyphs" fonts. I can confirm the upgrade of the AUR package nerd-fonts-complete 1.0.0-2 -> 1.0.0-3, fixed this bug for me. If OP can confirm, mark this issue as closed.

@ryanoasis
Copy link
Owner

@jayywolff Thanks for the update. Good observation on those affected.

I think the root cause/fix is to make sure the 'mono' versions internal name have 'mono' somewhere so they don't conflict with 'non-mono'. Right now if you install both it is seen as one, as far as I know.

selection_010

@ryanoasis
Copy link
Owner

@kiuKisas can let us know if @jayywolff suggestion works for you?

Thanks 😄

@ruro
Copy link

ruro commented May 7, 2017

I seem to be having the same issue. I am using the Knack Regular Nerd Font Complete Mono font. I installed it by downloading the .ttf files from the 1.0.0 branch. Arch (Manjaro): Linux 4.9.24-1.

Most characters are so small, that they are pretty much not usable as glyphs and indicators. Some of the characters are as big as they should be. For example the powerline symbols are normal sized, while the various git logos are very small.

Compare sizes:
echo "\nSmall :\uf300\uf460\ue70a\ue258\nSo-so :\uf000\uf072\nNormal:\ue285\uf245\n"
screenshot_20170507_141114

From Character Map App:
screenshot_20170507_141449

I don't think this is font dependent, or at least not just Knacks fault, because previously I had this same issue with Sauce Code Pro. I even think the same characters were small.

@ryanoasis
Copy link
Owner

@ruro thanks for the details. can you please try the Knack Regular Nerd Font Complete (non-mono) variant?

the Mono variants it is expected that the glyphs are a bit on the small size (to main scale in a fixed-width glyph)

@ruro
Copy link

ruro commented May 9, 2017

@ryanoasis I will try it, when I get home, however that doesn't make much sense to me. The characters, that are too small are even smaller than English letters as well as some other Mono-spaced characters. There is enough space in a character to increase the size of the icon. Or at least it looks like that to me.

If it works with non-mono font, that wouldn't really be a fix, since these fonts are mostly used for terminals and you can't use mono-spaced fonts in terminals. If increasing the size of icons is not possible in mono-spaced fonts, could you make 2 character wide variants for the small icons. I.e. the left part character + the right part? Thank you.

@ryanoasis
Copy link
Owner

@ruro Okay sure let me know how it goes. 😄

As for the size, I think it just looks that way as you say. It is a bit deceiving until you highlight or change the background color that it becomes more obvious:

selection_001

The first 2 glyphs look like they could be a bit larger but not much without the ratio changing (stretching)

@ruro
Copy link

ruro commented May 13, 2017

Well. I tried the regular size font. As expected, the characters are bigger, but it is completely broken in terminal. The git-in-a-circle character is still small btw, but whatever.
spectacle m20477

Is there really no way to have the cake and eat it? Maybe something hacky, like splitting the smaller characters into 2 monospaced parts.

Or maybe allow non-monospace characters, but have their width be a multiple of a single character, so then you could do something like this in terminal:

<double width icon><zero width char> is the same length as
<normal character><normal character> both in terms of visual size and char count

Edit: I just realized, that I am probably reinventing the wheel with my 'suggestions'. Noticed that the non-monospaced variant is sometimes referenced as "double width" in the Readme. Facepalm. I will have to look more closely into that.

P.S. Konsole and Yakuake don't seem to support double width characters. Can somebody reccomend a drop down terminal that does?

@ryanoasis
Copy link
Owner

@ruro First thanks for your thoughts and ideas. I can sense some frustration you may have had, if so sorry about that 😟

Is there really no way to have the cake and eat it? Maybe something hacky, like splitting the smaller characters into 2 monospaced parts.

Hmm yeah this is an interesting idea. I actually thought about doing something like this too for issues we've had with ambiguous glyph width handling in Vim but I am not sure how feasible it is and managing this I can see being a nightmare 😟

For the "double width" sorry if there was any confusion. If you have any ideas for making things more clear in the readme please let me know.

So I guess you realized that the way to go is to use the 'double width' variant (depending on terminal support).

P.S. Konsole and Yakuake don't seem to support double width characters. Can somebody reccomend a drop down terminal that does?

Guake Terminal seems to support non-mono fonts.

@ruro
Copy link

ruro commented May 20, 2017

Hm-hmmm. I tried the double-width variant with Guake. The big characters work well, but now the powerline arrows are slightly misaligned the '<' arrows have a small space between them and the next block, while the '>' arrows are vertically a little smaller than the whole 'line'. Here's a screenshot:
screenshot_20170521_014818

Actually, maybe the git symbol is a bit too small. But it works unexpectedly good overall.
screenshot_20170521_015051

P.S. What I find weird, is that the U+E0B4 and U+E0B6 work fine (they are the round powerline symbols), while U+E0B0 and U+E0B2 have the issues described above.

@ryanoasis
Copy link
Owner

@ruro Thanks for the details.

Can you tell me which font and font size you are using by the way?

Hopefully the alignment issues will at least be mostly solved in v1.1.0, here is how it is showing for me:

selection_006

As for the GitHub logo you can try to use the 'other' set:

selection_007

@ryanoasis
Copy link
Owner

Fonts just uploaded... probably won't improve anything here but if anyone would like to test them out that'd be great 😄

@shibumi
Copy link

shibumi commented Sep 15, 2017

Hello,
I have installed the following Fonts:

https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraCode/Bold/complete/Fura Code Bold Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraCode/Light/complete/Fura Code Light Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraCode/Medium/complete/Fura Code Medium Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraCode/Regular/complete/Fura Code Regular Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraCode/Retina/complete/Fura Code Retina Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraMono/Bold/complete/Fura Mono Bold for Powerline Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraMono/Medium/complete/Fura Mono Medium for Powerline Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/FiraMono/Regular/complete/Fura Mono Regular for Powerline Nerd Font Complete Mono.otf
https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v1.0.0/patched-fonts/Inconsolata/complete/Inconsolata for Powerline Nerd Font Complete Mono.otf

However when I want to choose a font in qterminal I see only these fonts:

I can confirm the small glyphs, too:

But now starts the funny part. In my i3blocks statusbar I have the right size of the glyphs:

But that seems to have something todo with: https://github.com/gabrielelana/awesome-terminal-fonts
I have installed them as well and when I remove them I have small icons just like in my terminal..

EDIT: With termite I have the same behaviour. Some icons are big some others are small when I set just 'Inconsolata' there. But when I excplicitly set InconsolataForPowerline Nerd Font there then all icons are small..

@ryanoasis
Copy link
Owner

Thanks @shibumi sorry for the very late reply. I'll try to take a look at Inconsolata

@benbuch
Copy link

benbuch commented May 29, 2018

This is also a issue with SauceCodePro Nerd Font Mono. i have tried both the nerd font complete from aur and also download from nerdfont's website.
2018-05-29-143958_1920x1080_scrot

@yoyoys
Copy link

yoyoys commented Jun 9, 2018

same problem on DejaVu Sans Mono but only in Ubuntu (18)
terminal: hyper 2.0
screenshot on ubuntu:
image

same font, my mac works fine:
image

@parthsharma1996
Copy link

I have the same issue. I am on Arch using the patched Iosevka font

@FelipeMarcelino
Copy link

Same here. Fura Code and Iosevka in arch with i3

@ghost
Copy link

ghost commented Sep 13, 2018

Same problem here with Archlinux using any of the nerd fonts (i3wm)

@jayywolff
Copy link

jayywolff commented Sep 13, 2018

Currently using the AUR package nerd-fonts-complete 2.0.0-5
Still running Arch, i3wm, termite as my terminal emulator.

When using Iosevka Nerd Font, I dont have the issue with tiny icons, but I do have an issue with the equal sign taking up the space of 3 characters (which makes the font un-usable for me). I have to use a non-patched version of Iosevka and just deal with the tiny icons but at least the equal sign is normal.

@ghost
Copy link

ghost commented Sep 13, 2018 via email

@jayywolff
Copy link

@myrage2000 what do you have for your "URxvt.font" setting in .Xresources? I've never been able to get icons to work at all in urxvt

@ghost
Copy link

ghost commented Sep 13, 2018 via email

@iamkarlson
Copy link

Hi guys, I'm not sure that it works for all but simply removing the font and installing it again solved my problem in windows env. Just make sure that you used the right file for the right OS

@jayywolff
Copy link

jayywolff commented May 7, 2019

Any update on this issue? weird thing is that it works perfectly on my Manjaro install but not on my Arch...

I have it working for me on Arch on multiple machines, and Ive gotten it to work on Ubuntu as well, but it doesn't just work out of the box, I've never got it working for any font in urxvt, and I cant get it working with any mono-spaced fonts. I've gotten used to not using mono fonts, its worth it for me, would rather have awesome icons for all the things than equal width characters.

I feel like its been different to get it working on every machine but I haven't done it enough times to be sure. I think the trick is using a non mono font & making sure you have the correct fallback font(s) installed/configured.

Im still using the Iosevka Nerd Font Complete. In my setup I must also have the stock Iosevka font installed from Arch's repo or else it doesn't work properly

@sztomi
Copy link

sztomi commented Jun 2, 2019

I also have a problem with the glyph sizes. I've found the following:

  • gnome-terminal doesn't let me select the nerd fonts at all. There was another thread somewhere explaining that some value is not set in to fonts which causes this (I can't find that now, unfortunately)
  • in Kitty, I get the small glyphs issue
  • in Konsole, I initially can't select them, but when I check "show all fonts", it lets me select the nerdfonts and they render correctly (i.e. no small glyphs!)

Kitty:

image

Konsole:

image

I think this missing value is related to the incorrect rendering.

@sstark
Copy link

sstark commented Jun 21, 2019

* gnome-terminal doesn't let me select the nerd fonts at all. There was another thread somewhere explaining that some value is not set in to fonts which causes this (I can't find that now, unfortunately)

gnome-terminal only lists fonts that are marked monospaced, which seems is not the case for nerd fonts. You can trick it to use them anyway by unchecking "user font" in gnome-terminal and choose the font you want as the system-wide monospace font in gnome-tweaks.

More on-topic: With lsd it is simple to show the issue by comparing the output of lsd --icon-theme fancy with lsd --icon-theme unicode. The latter for instance shows correctly sized folder icons, the fancy version (which uses all the extra glyphs) doesn't.

@nsklaus
Copy link

nsklaus commented Aug 11, 2019

i have the issue too, i installed the already patched inconsolata version, then i ran fc-cache -f -v.
this is on ubuntu 19.04, i3wm and st terminal. the letters are normal but the symbols are very small.
less than half the height of the letter.

i've installed another nerd font, (the DejaVuSansMono Nerd Font)
and apparently the size of glyphs is good with that one.
maybe the small icon problem concerns specificaly the patched inconsolata fonts.

@computercam
Copy link

@sztomi If you're using kitty, you will have to set the symbol map to the non-monospaced version of your nerdfont.

It gets set to the monospaced version automatically due to the fact kitty will automatically use monospace fonts by default.

Ex:
symbol_map U+E000-U+FFFF [NERD_FONT_NAME]

you can find your installed fonts with

fc-list | cut -d: -f2 | sort -h | uniq | grep -i nerd

@Alexey104
Copy link

Alexey104 commented Feb 12, 2020

I have the same issue with most of fonts, but 'nerd-fonts-ubuntu-mono' work fine for me in any terminal on Arch:
screenshot

@paperbenni
Copy link

I have the problem in dwm and its a lot worse there

@atreyasha
Copy link

With the recent upgrade in the Arch AUR of nerd-fonts-complete to version 2.1.0-1, I experienced the issue of glyphs becoming very small compared to characters. I am usingi3-gaps and my font configuration is:

font pango: 3270 Nerd Font 8.5

I solved the problem by uninstalling the nerd-fonts-complete AUR package and only installing the 3270 complete font package directly from this repository. Perhaps there was some conflict with the large nerd-fonts-complete package. Hope this information could help someone else facing a similar problem.

@jaisharx
Copy link

Issue becomes apparent when compared with how the default vscode's terminal shows the exact same glyphs, also I'm using the cascadia code in both the terminal.

Annotation 2020-05-22 075739

Annotation 2020-05-22 080227

We can see clearly how the arrow, tilde or the X is shown in both the terminal, there's a huge difference. The arrow and the X almost makes it apparent.

@scarolan
Copy link

scarolan commented Jul 18, 2020

I have this issue on WSL but only in Windows Terminal. Visual Studio Code's built in terminal renders the glyphs at the right size.

VSC Terminal:
image

Windows Terminal:
image

EDIT:
I was able to fix this by updating to Meslo Nerd Font here:
https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k

I also upgraded my zsh theme to powerlevel10k, sizing issues are gone.

@Animeshz
Copy link

+1 fonts with Mono suffix have been suffering with the issue from my experience...

@colinli
Copy link

colinli commented Sep 5, 2021

Hi, sorry to jump in, I might have a similar problem:
I have just downloaded and installed the Ubuntu Mono Nerd Font, using it in iTerm on Mac OS X, and the glyphs appear pretty small (especially the Directory icon).

Here is a screenshot:
image

I arrived here through this project (LSD), and its homepage shows a screenshot with much better-sized icons:
image

Do you think it's the same issue or am I doing something wrong?
Thanks for the help!

Exactly the same issue.
MacOS big sur
LSD 0.20.1
iTerm2 3.4.9
Nerd Font Meslo, hack

@YanDoroshenko
Copy link

Having the same issue, Arch Linux, Alacritty, DejaVu Sans Mono.

Tried installing different packages from AUR, using the install script, nothing seems to work.

@Finii
Copy link
Collaborator

Finii commented Apr 25, 2022

@Animeshz @colinli
+1 fonts with Mono suffix have been suffering with the issue from my experience...

Well... Mono means the font is monospaced, i.e. the width of the symbols are limited to the same size as the letters.

image

The upper example is 'too small'? In fact it is not too small, it is just monospaced. The 'document' icon has the same width as the letter c i moved below.

On the other hand, the 'ok' behavior is has no monospaced icons, 'document' icon is as wide as a full a and half of the m.

If you want to have big (wider than letters) icons you can not use Nerd Font Mono fonts.

I guess that is the problem in a lot cases here. Unfortunately people do not tell which exact font files they use, and as there are too many variants it is hard to tell what they use or misuse.

@atreyasha @YanDoroshenko
I solved the problem by uninstalling the nerd-fonts-complete AUR package and only installing the 3270 complete font package directly from this repository.

This is also a problem. The AUR packages are rather far behind and the fonts there have issues that are already solved here.

@scarolan
I have this issue on WSL but only in Windows Terminal.

Windows Terminal has a specific handling of the fonts, and it re-scales individual glyphs if it sees fit (i.e. to make the font monospaced (see above)).

@Finii
Copy link
Collaborator

Finii commented Apr 25, 2022

Arch and how they broke it for everyone else: #634 -> #764, detailed information in #731 (comment) ff

On naming #746 and what Mono Nerd Font Mono means ;-)

@schovi
Copy link

schovi commented May 16, 2022

Any solution I can use to solve this by myself?

I have this "Comic Code" font with added glyphs font-patcher -c and the result looks:

CleanShot 2022-05-16 at 17 16 58@2x

I tried iTerm2 and Terminal with the same output.

@YanDoroshenko
Copy link

I'm using DWM and configuring it to use a larger Nerd font works like a charm:

static const char *fonts[]          = { "DejaVuSansMono:size=9:antialias=true:autohint=true", "DejaVuSansMono Nerd Font:size=12:antialias=true:autohint=true"};

@Finii
Copy link
Collaborator

Finii commented May 17, 2022

@schovi Your issue looks different. The issue is that the 'line' is higher than the powerline symbols, right?

@schovi
Copy link

schovi commented May 17, 2022

@schovi Your issue looks different. The issue is that the 'line' is higher than the powerline symbols, right?

@Finii probably? (I am really a font noob :) ). Other patched fonts by myself look good, so it is probably related to this specific one?

@ZhaoZuohong
Copy link

Here is a simple workaround on linux with fontconfig.

Since glyths in monospaced fonts are smaller, we can combine glyphs in sans-serif font and normal characters in monospaced fonts. For example, I personally use DejaVu Sans Mono as main font, and take glyphs from NotoSans Nerd Font, so I write these settings in ~/.config/fontconfig/fonts.conf:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fontconfig>
  <dir>~/.fonts</dir>
  <match>
    <test name="family">
      <string>monospace</string>
    </test>
    <edit binding="strong" mode="prepend" name="family">
      <string>DejaVu Sans Mono</string>
      <string>NotoSans Nerd Font</string>
    </edit>
  </match>
</fontconfig>

Now those glyphs are bigger. Here is the result:

image

@Finii
Copy link
Collaborator

Finii commented Jan 30, 2023

Here another link with explanantions for people that find this issue

Some people reported reinstalling helped. This is because the font family naming is broken and the system takes the wrong font file - sometimes. This will be fixed in v3.0.0 (major version because the font family names need to change).
See also #1015 as an example.

@Finii Finii closed this as completed Jan 30, 2023
colorsakura added a commit to colorsakura/dotfiles that referenced this issue Mar 14, 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