-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rectangles displayed instead of numbers of commits behind #145
Comments
Can confirm I have the same issue. Environment
|
You need to set a Nerd Font in your terminal. See here for more context. |
It does not seem to work for all Nerd Fonts. I tried Cascayda Cove (NF version of Cascadia Code, and my preferred font), Fira Code and Meslo. Out of those 3, only Meslo worked for me. |
They should be universally equal when it comes to those things but I'll double check! |
That's really weird. Are you sure the font that's set is correct? Because even the powerline symbol is broken, that one I haven't seen before. |
I installed the same font as @PhilipHaglund is using (BTW, very nice font) and I'm still having the same issue. |
Oh my Posh has no way to influence the font and uses the codes in the official Nerd Font cheat sheet. The character encoding of Powershell shouldn't influence this either (at least not with that output), although, as a test, does setting that to UTF8 change anything? |
You've configured your Terminal to use that font? |
@mgryszko this is that font in my terminal: |
Can confirm, using the microsoft provided PL version of Cascadia Code (it's bundled in their overall Cascadia Code release) https://github.com/microsoft/cascadia-code and version 3 of oh-my-posh does result in boxes for the git commit version numbers. Version 2 didn't do this. There is literally no other config to check. This is stock Windows Terminal (preview version in case that matters) with a from scratch settings.json with only the font choice specified. Even a fresh install of Powershell 7.1, but it happnes on 7.0 too. Did this on two separate machines even. Using oh-my-posh3 installed via What sort of useful info can we get to help debug this? Is there some possibility that the symbol being called in 3 is different than 2 and the font some people use doesn't have one of them? |
OK, so, there's nothing to debug in that case. The only thing needed is to create a config that uses the icons available in Cascadia Code. This is not a bug, it's actually by design as I use Nerd Fonts to have a wider range of icons. When using the nerd font version of Cascadia Code, I do get all correct symbols in my terminal, which is as expected. You can dump the current config with For these icons specifically, using Cascadia Code PL, these are the git icons which needs adjusting: "branch_identical_icon": "\u2261 ",
"branch_ahead_icon": "\u2191 ",
"branch_behind_icon": "\u2193 ",
"branch_gone_icon": "\u2262 " There will be other icons which don't map but hopefully this provides the information you were looking for. EDIT: looking at this I tried these glyphs in Nerd Font and they also work there. While this won't fix all icons (some are simply not available in Cascadia Code PL), I'll create a small adjustment that maps as many of these for the Git segment. |
I'm going to close this as I can't reproduce this with any NF set correctly and did my best to support Cascadia Code PL as much as I could. Let me know if there's anything else I can do. |
That fixed it on my end! Thanks! |
Just FYI, my problem was related to microsoft/terminal#3257. |
I just updated to oh-my-posh 3.53.1 beta and am having the same issues within Windows Terminal. I have installed different NF fonts using the 'install for all users' option but only Meslo seems to work (which is not my preferred font). @PhilipHaglund what worked for you (including any changes to terminal, encoding, etc.)? I had everything working great in v2 and really regretting moving to v3 at the moment. |
I just installed "CaskaydiaCove NF" as Administrator to "All Users". |
I also have the same problem still. Meslo works always, but Cascaidya does not work, whether it's installed for all users or not. Version: 3.53.1 FontFace: CascadyaCode NF (Installed for all users) |
Oh s**t. I mispelled the font name, it should of course be "CaskaydiaCove NF". Now it works. Ignore my previous comment :-) |
I must have made the same mistake as it is working for me now as well. Only issue remaining for me is getting GIT to change colors on status as it did in v2! |
@KyleKorndoerfer that's a feature, check the git segment docs, it should all be in there! |
@JanDeDobbeleer I got it after poking at it for a bit. What confused me initially was the reference to color for the various git states so I was using the angle bracket syntax instead of straight color numbers. All good now, thanks! |
It appears Windows users are a bit confused on how to get the glyphs working. The documentation helps a lot to install the OMP v3. So ensure you've it installed first, then follow these steps to get the fonts working.
"profiles": {
"defaults": {
"fontFace": "MesloLGL Nerd Font", Enjoy! |
what theme you use |
@hendripermana that's |
The link is broken |
@JanDeDobbeleer Where do I put these? I am using Cascadia Code PL & it looks like these icons using Git Branch are the only thing that is not working now. Everything else just works fine. |
@deadcoder0904 you can have a look at the hotstick theme for reference. |
@JanDeDobbeleer no I mean where does that file exist in my system? |
@deadcoder0904 you want to export the config and adjust it so you have something that stays changed as oh-my-posh gets updated. |
Thank you, this link works: https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.1.0 |
@luisfcevallos Did you manage to get the icons working? I can't get it to work using lsd. Even Github commits don't have an icon: |
@deadcoder0904 did you have a look at the font guide? |
@JanDeDobbeleer Yes & I don't know which font to install as there are so many & no one with the name Ideally, an automated script would've been good to install fonts. |
@deadcoder0904 font installs are a machine/terminal thing and not related in any way to oh-my-posh's functionality. The only thing I see is that your terminal is not properly configured, the font could be installed the right way, maybe the name of the font you set is wrong. |
@JanDeDobbeleer No, having done this countless times on Linux & Mac since 2015 & now Windows, I don't think its wrong as it changes the font perfectly fine. Here's my config: "profiles": {
"defaults": {
"startingDirectory": "%__CD__%",
"fontFace": "Cascadia Code PL"
},
"list": [
{
"commandline": "powershell.exe",
"cursorColor": "#FFFFFD",
"cursorShape": "filledBox",
"experimental.retroTerminalEffect": false,
"fontFace": "Cascadia Code PL",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell",
"startingDirectory": null,
"suppressApplicationTitle": true,
"tabTitle": null,
"useAcrylic": false
},
} Changing the PS: I can't access the nerdfonts.com site since I've probably been blocked by many sites last few months 😂 so apologies if u already have an answer there :) |
Managed to finally make it work. I guess I did download Powerline Fonts but I didn't download it Patched. I now installed Windows Compatible fonts like https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/CascadiaCode/Regular/complete/Caskaydia%20Cove%20Regular%20Nerd%20Font%20Complete%20Windows%20Compatible.otf & changed the name accordingly. "list": [
{
"commandline": "powershell.exe",
"cursorColor": "#FFFFFD",
"cursorShape": "filledBox",
"experimental.retroTerminalEffect": false,
"fontFace": "CaskaydiaCove NF",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell",
"startingDirectory": null,
"suppressApplicationTitle": true,
"tabTitle": null,
"useAcrylic": false
},
] |
I had this problem - the default font was being overridden by List. |
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. |
Prerequisites
CONTRIBUTING
guideDescription
Some non-Powerline symbols are not rendered correctly. Used font: Cascadia Mono PL.
Compare oh-my-posh 2.0.487 on Windows PowerShell 5.1:
with the oh-my-post 3.33.0-beta on PowerShell Core 7.0.3:
Environment
Steps to Reproduce
Set-PoshPrompt -Theme fish
Expected behavior: look&feel of oh-my-posh 2
Actual behavior: rectangles displayed instead of commits behind
The text was updated successfully, but these errors were encountered: