-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Some symbol glyphs show up as clipped. #442
Comments
thanks for all the details and even digging into this! really appreciate it |
why this seems to happen with people using arch linux and some twm? |
…nts/issues/442 + updated a few other things
@ffernand do you still face this issue? |
@siduck76 In my original post, I have a patch that I used to rebuild nerd-fonts and had no issues since then. I found the problem using git-bisect, but I was reluctant to create a PR out of the patch because it's not clear to me why it works. Not that the patch is suspect, just that I know little of how font-patcher works 😅 So I leave the patch here as a clue for devs on how to fix this problem. |
ughh
ughh when's the next release :( . Been waiting for it since ages now lol. It'll come with updated version of linux distro logos which I needed so kinda excited. |
I have been using this patch for a year now, and never saw any issue. The fonts are working perfectly. I even changed my icon font several times, and they all worked perfectly. Great work, and I think it could be merged :) |
Nerd fonts have a bug where glyphs are cut off. - Switch to mono fonts - Increase size See: ryanoasis/nerd-fonts#442
Would be solved by #764 |
@Finii, is there a set of zips like https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/*.zip built with your patch? I'm using NixOS, so can alter the package spec to pull a patched release, but don't have the setup to build the fonts myself. I'd really like to test whether this solves the issue I experienced. I'm currently pinned to 2.0.0 as 2.1.0 is unusable for me. |
Unfortunately no. Which font are you after? |
I use DejaVu Sans Mono Nerd Font in Polybar and Hasklug in my terminal and editor. However, the NixOS package installs the whole set of fonts. Don't worry about it, I have no need for anything that 2.0.0 doesn't have. I just thought I'd test it out to see if this resolves the issue for me. |
I can create you these, so you can try them and it helps us decide how to handle that in the future? |
Sure, if you can send me URLs where the package manager can pull them from, I'll give it a try. |
Probably fixed with |
Can anyone confirm that this fixed it for them? In xfce4 terminal, I am still getting clipped icons with UbuntuMono 2.2.2: In addition, in polybar, UbuntuMono and Hack (non-mono) also still have the clipping, see polybar/polybar#991 Hack: UbuntuMono: |
I'm still seeing issues in polybar. |
@patrick96 From the images you provided that is not clipped. What you miss is to insert a blank after the symbol like
@fiskhest I must admit I do not know |
Maybe we should (really, soon) add a |
@Finii Thanks for the clarification, #940 cleared up some things for me. Do I understand correctly that the non-mono fonts basically have wide icons that extend over more than one cell (but still single cell text characters) and it's the terminal emulator's job (or any other application wanting to display them) to add the appropriate spacing after the wide icons? polybar is a status bar where the user can basically put arbitrary text. Just so you can get an idea, here is a screenshot of my polybar: Many of our users use nerd fonts because they get a font that has all the icons they want and can also render text. Text and icons can be arbitrarily mixed, so conceptually polybar has to do a similar job as terminal emulators (just on a single line). The fonts used by polybar are user-defined, so we can easily advise people to adapt their font choices. If I understood everything correctly, advising people to use a non-nerd-fonts font for text rendering and add What I don't quite understand is why |
@patrick96 Thanks for the Polybar explanations and link. I will have a look there.
Well, I do not know for sure, but I guess Polybar is more like an 'proportional' environment. Which means that the Symbols should have an advance-width that covers the full symbol, and not more. If you would go the terminal emulator way, a bigger symbol would be 2 'calls' wide in advance width, but only cover 1.5 widths in reality, left aligned. So you can never center anything properly. Another data point is maybe this comment: #731 (comment) I believe the 2-font-setup (one 'normal' text font and the
A and B are useful in terminal emulators or other 'strict text grid' usecases. C is good for proportional context like 'create a presentation' or 'MS word text file' or 'A book with symbols' or often GUI contexts. In the past we had Issues that people expect B and got C; while in other times people expected C and got B. I see a roughly equal request for B and C, it is just a different audience. Technically the C people could obtain their goals in different ways, while B can not be achieved easily and consistently by other means (then providing it here). Historically Nerd Fonts came from the terminal emulator (A/B) context, but meanwhile GUI use is not uncommon anymore. For this reason my ... target would be to provide all 3 variants here - in the future. And then educate users which font they really want. And even then this would have side effects that need careful planning and code changes and maybe a different distribution model. Well. Interesting as it is, let me first answer this question
The The If we want to provide the C fonts, or if someone wants to self-patch them, it is easy by just adding that See also
These are more comment for ME, so that I do not forget
@patrick96 Your input is welcome (as everyone's), maybe visit new discussion -=> #951 Edit: Add secondary packaging consideration point |
When you write this here, I wonder how Connect #658 |
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. |
🎯 Some symbole glyphs show up as clipped.
v2.0.0 of the Ubuntu Mono Nerd Font Complete (double-width version, not mono-version) now truncates/clips certain glyphs.
An example is the battery glyph (which I think comes from font-awesome). The top of the image below represents the font generated by nerd-font v2.0.0... and the bottom image with the clipped glyphs represents the font generated using nerd-font v2.1.0
Using git-bisect, I was able to trace the problem to this commit: cf625d4
After playing with the content of the commit against v2.1.0 of
font-patcher
, the following patch fixes the problem for me. It removes the negative bearings after setting the glyph width (undoing the partial change in that commit). But at this point, I'm out of my element. I'm not sure why this fix works for me, or if it introduces other problems.The only clue for the change was a comment included in the original commit that suggested the opposite messed up glyph widths somehow...
🔧 Your Setup
Which font are you using?
Ubuntu Mono Nerd Font Complete.ttf (double-width)
Which terminal emulator are you using?
xfce4-terminal
Are you using OS X, Linux or Windows? And which specific version or distribution?
ArchLinux (latest updates)
The text was updated successfully, but these errors were encountered: