Closed RiccardoMPesce closed 1 year ago
I had a similar problem with Deja Vu Sans Mono on gnome-terminal. It improved for me when I switched to the "Mono" variant. What happens if you patch with --mono
?
(I think @ryanoasis is also working on fixing these problems in the non-mono variants, but his work on that isn't finished yet.)
Patching it with ./font-patcher-py3 -c --mono -ext otf -out ~/.local/share/fonts/NerdFonts src/unpatched-fonts/DroidSansMono/Droid\ Sans\ Mono\ for\ Powerline.otf && fc-cache -fv
keeps giving me the same issue.
@RiccardoMPesce Ah you are using the py3 version of the patcher right? I haven't updated that yet.
You did pull the latest of master
?
Anyway here are the results of Droid for me:
Let me update the py3 version and you can retry :smile:
@ryanoasis thanks for the effort. Unfortunately, the blue vertical line persist. Can it be the fact that I am using otf instead of ttf?
EDIT. it is the same. However, the blue line is less noticeable.
EDIT. it is the same. However, the blue line is less noticeable.
Well that is at least some good news. I was going to say maybe you needed to clear your font cache and close all terminals.. but it sounds like you are seeing a difference?
Also for me the powerline glyph was more appropriately vertically centered. Did you notice any change with that as well?
Also, would you mind posting an updated screenshot?
As you can see in the directory line, the blue line is less noticeable. :) Glyphs are okay now, are centered and there is a better padding around them.
EDIT. Later I will try tweaking oh_my_zsh and powerlevel9k a bit, as the problem seems to be derived from the back that the standard background color of blue is a feature of oh_my_zsh. I will update this as soon as I get everything done.
EDIT 2. the command echo $color
gives me this output
none normal bg-blue 31 bold no-standout bg-magenta faint no-underline bg-cyan standout no-blink bg-white underline 33 41 01 blink no-reverse bg-default 27 no-conceal reverse conceal 30 31 08 39 02 32 24 45 35 05 34 30 39 47 black 23 red green 43 yellow 36 blue magenta 37 cyan 03 white 44 35 default 40 28 07 46 04 33 37 40 22 34 42 00 30 30 25 49 bg-black 36 32 bg-red bg-green bg-yellow
Maybe this is what should be changed. How do I do it?
@RiccardoMPesce Thanks for the updates. I'm unsure how to change those items in oh_my_zsh at the moment. We can look into this more...
Problem is the same here with Adobe Source Code Pro
font and the last version of patcher :
Do you have any solution for this problem ?
@RiccardoMPesce did you manage to solve this? How?
@fpaterno Could you please open a seperate issue if you have the same problem detailing your terminal config please?
I'm getting this same issue on pretty much all the fonts used in windows. Its really gross looking :(
I have the same issue with Inconsolata Nerd Font and i made some tests. Screenshots posted below are taken with bash shell, but same thing occurs with zsh so it's shell indipendent (in some previous posts it was suggested that the issue may occur because of zsh or oh-my-zsh, but that's not the cause). Also i tested with two different terminal emulators: st and xterm With Inconsolata for Powerline (link) everything is smooth as it should be (screenshot 3 and 6), so the issue must be with Nerd Font patch. Inconsolata for Powerline NOTE: Screenshots taken inside tmux, but behavior is the same outside of it.
Problem occurs on st with Inconsolata Nerd Font
st -f "Inconsolata Nerd Font:pixelsize=30"
Same on st with Inconsolata Nerd Font Mono
st -f "Inconsolata Nerd Font Mono:pixelsize=30"
No problems with Inconsolata for Powerline (not Nerd Font)
st -f "Inconsolata for Powerline:pixelsize=30"
Even worse on xterm with Inconsolata Nerd Font (1px bottom right gaps)
xterm -fa "Inconsolata Nerd Font:pixelsize=30"
Even worse on xterm with Inconsolata Nerd Font Mono (2px bottom right gaps)
xterm -fa "Inconsolata Nerd Font Mono:pixelsize=30"
No issues with on xterm with Inconsolata for Powerline
xterm -fa "Inconsolata for Powerline:pixelsize=30"
So i checked the glyphs and they look a bit different: Inconsolata for Powerline: Inconsolata Nerd Font Mono: And that might be the cause.
EDIT Can confirm the issue is with the glyphs in Nerd Font patch. With FontForge i exported powerline glyphs from Inconsolata for Powerline and imported them to Inconsolata Nerd Font Mono and everything is working fine.
The line appears because of subpixel antialiasing. Check this setting in .Xresources: Xft.rgba
Line appears if it is set to "rgb" and disappears if value is set to "vrgb"
xrdb -query | grep Xft.rgba
Xft.rgba: vrgb
I'm running on Ubuntu MATE with GNOME Terminal, and I tried @dfokin 's fix, but it didn't work. What I ended up doing is switching to https://github.com/powerline/fonts/tree/master/Hack for my font. Works like a dream.
I am presenting this issue as well with nerd-fonts last version (commit 5f748cdb104a241ec8ac229f24518f3f867e8eb2) from master branch and "SauceCodePro Nerd Font Mono Medium", 12px:
in more detail:
I did the git pull, then run the install.sh script, reboot the system and the vertical line still persists.
I am using Fedora 32 with gnome-terminal 3.36.1.1 and the following configuration:
The antialiasing in GNOME Tweaks 3.34.0 is the following:
Appreciate any help to get this fixed.
Thanks.
Once I uninstalled packages from https://github.com/silenc3r/fedora-better-fonts the glyphs started to look better on the terminal. The left-side arrows look good now. The right-side one is still showing the vertical line on it:
and changing the terminal font size from 12 to 11, fixed completely:
I've been fighting the vertical line issue for a while. I finally ended up cheating and just editing the powerline character and extending it to the left so it overlaps the preceding character. I haven't seen this suggested anywhere else. It wouldn't work for everyone, but with my setup it's perfect since the preceding character is always a space of the same color.
FWIW, I personally wouldn't want to disable subpixel antialiasing, because it's there to make fonts look better, but it seems like there's no silver bullet here so everyone just has to pick the best solution for them. :shrug:
I would probably recommend against changing antialiasing to VRGB unless your monitor is actually VRGB though. Greyscale antialiasing should look better than incorrectly configured RGB antialiasing.
postprocess script:
import fontforge, sys, os
f = fontforge.open(sys.argv[1])
glyph = f[0xE0B0]
bb = glyph.boundingBox()
pen = glyph.glyphPen(replace=False)
pen.moveTo(bb[0],bb[1])
pen.lineTo(bb[0],bb[3])
pen.lineTo(bb[0]-150,bb[3])
pen.lineTo(bb[0]-150,bb[1])
pen.closePath()
os.unlink(sys.argv[1])
f.generate(sys.argv[1])
prompt (Dejavu Sans Mono 12pt): powerline glyph:
https://github.com/ryanoasis/nerd-fonts/issues/156#issuecomment-602170101
Thank you! This was what fixed it for me. I was spending hours fussing with fontforge, and even considered doing exactly what the post above is showing (extending the triangle with a small block).
Using rgba
produced slightly better results in my opinion compared to vrgb
, but the blue lines do indeed appear when set to rgb
.
Here is a table of how each setting renders for me if it's of use to anyone having this issue, I'm using st with wideglyph and font2 patches. | rgb |
vrgb |
rgba |
---|---|---|---|
Notice how vrgb
has a lot more noisy subpixel red/blue compared to rgba
.
PS I used xzoom to magnify my terminal for these screenshots, it was very handy for visualizing this issue.
There is also
but I'm not sure we should go that route, especially because different terminal emulators handle 'overhanging' glyphs differently and might just scale the 'overhang' away. A lot very(?) widespread ones allow specifically no left side bearing (overhang to the left) kitty
, Windows Terminal
, alacritty
, iirc...
The aliasing on the other hand, usually universally works; but some terminals have their own antialias-setting apart from the system's :roll_eyes:
Edit: 780 works especially good with terminals that support fully proportional fonts, like tilix
If you see a line an the right-pointing-trianguar thing but not on the left-pointing one, ... there was a bug in the patcher that could result in exactly that, iirc. maybe we should investigate 780 further. I stopped work in that to pursue other problems :grimacing:
Description is in the commit message of https://github.com/ryanoasis/nerd-fonts/pull/780/commits/f528ffb2998a610fe0cc484ec224dd0ddbf7f7ad
Just noticed the 'real repair' commits have been merged already (within #764), so since v2.2.2
the negative bearing should work.
If you still see lines only on right pointing things and not on left pointing things that will most probably be a terminal issue that does not allow left bearings (overlap).
(Not that I see the non-Mono glyph (right), WHY does it extend over the right side border?)
The issue is gone for me on v2.2.2 :partying_face: I've removed my patches and it still looks good.
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.
Hello, I am using Oh My Zsh theme PowerLevel9k with nerd-fonts. I use Gnome-Terminal, on Antergos (which is Arch Linux). As my font, I both have patched with the font-patcher-py3 the following:
The first one is the src/ font patched, while the second one is a vanilla patched. Using both them gives the same effect.
This is the effect I get (the vertical blue line after the prompt), after changing the background color to that gray. Not only with this font, but with all the nerd fonts.
Here it is my .zshrc file:
If I remove all the
POWERLINE9K_..._BACKGROUND
, the default background is blue.How do I solve it? Thanks.