-
Notifications
You must be signed in to change notification settings - Fork 8.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
p10k prompt is not displayed correctly with AtlasEngine #16664
Comments
Given your font size of 9pt (FYI: not px - our font sizes are in pt) and an apparent line height of 15 pixels, I'm assuming that you're using a display scale of 100%, right? In that case, please delete your Meslo NF font and then download and install the latest version here: https://www.nerdfonts.com/font-downloads (At the time of writing the direct link is: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/Meslo.zip) This is because I found that the issue you've described does not occur on my PC in that case: But you can see there that the "s" in ssh has the exact same pixel height as yours and the white box is also 15px tall. BTW this is super opinionated, but I personally definitely recommend enabling ClearType if you're using a 100% scale monitor. It'll add a somewhat ugly blue line in the rounded box, but it'll make the text a lot more legible in my opinion. That aside, you can set fractional font sizes which allows you to solve this issue under most circumstances. Lastly, I consider this an issue with the font itself, as we simply draw the glyphs exactly as they were designed. The only text renderer simply didn't have this issue because it cut off any overly large glyphs or distorted them if necessary. That has caused a ton of issues in the past and I personally don't wish to open that can of worms again. 😟 But this is a common issue with a lot of fonts (including our own Cascadia Code), and we intend to ship this workaround at some point: #5897 As such I'll close this issue for now and I'd suggest upvoting and following #5897 if you're interested in seeing this resolved properly in the future (we loosely use upvotes to see what features to implement in the future). |
Your example has the same problem. One pixel bottom part is missing I have already tried all variations of this font, there are problems everywhere. And the problems are only when using AtlasEngine. And you released it with the default renderer. You must fix this. P10k uses its own version of the font and the developer says that the problem is in the terminal. |
I believe it's important to mention that your screenshot is exactly how DirectWrite renders that glyph and there's no missing pixel on our end: I do think it's weird though that the last row of pixels seems like it gets cut off by DirectWrite. I'll investigate why that occurs and if it's something we do wrong, I'll reopen this issue and use it to track a fix for the missing pixels. That aside, I always agreed that this is an issue with Windows Terminal and that it needs to be fixed urgently, if possible. But in my opinion #5897 presents the best path towards fixing the issue and that's why I closed your issue, as I considered it to be a duplicate. I don't mean to ignore your issue and I apologize if it felt that way. It's correct that we used to special case powerline glyphs in the past, but the way we did it was to "scale" glyphs to perfectly fit their box. This had a lot of subtle problems: "pixel perfect" fonts failed to work, font fallback didn't work correctly, and sometimes glyphs were misaligned. A lot of people complained about it over the years. Here's some: #8993, #13527, #13662, #14877 Scaling glyphs like that is something no other terminal did. If anything, they all use a technique as described in #5897 as it has none of the issues above, so I'll use #5897 to track a fix for this. I'll see if I can get it done sooner rather than later. |
Windows Terminal version
1.19.10302.0
Windows build number
22631.3085
Other Software
WSL Ubuntu latest
ZSH
p10k (rainbow theme)
MesloLGS Nerd Font (from p10k repo)
9px font size
Steps to reproduce
Setup
zsh
,p10k
, set rainbow theme by usingp10k configure
Select
MesloLGS NF
with a font size of 9px in the terminal settings with AtlasEngine enabled.Expected Behavior
Smooth borders of the prompt, like in this screenshot with AtlasEngine disabled
![image](https://private-user-images.githubusercontent.com/35394377/302143216-9098e73d-ff97-401e-8b2d-ca633fd149be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3ODEzOTMsIm5iZiI6MTczOTc4MTA5MywicGF0aCI6Ii8zNTM5NDM3Ny8zMDIxNDMyMTYtOTA5OGU3M2QtZmY5Ny00MDFlLThiMmQtY2E2MzNmZDE0OWJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA4MzEzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0M2JmODQ5M2M2OWE1MmY5ODNiMTg4MzYzMTc5MGExNTE1NzdlZmE0NzY3NWRlZTdmYjkxOWQ5NGM2ZGMxYjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.reUFFskicgPKZsajr-0Y9xQBNn5FpVDiHaPWBrHM794)
Actual Behavior
Incorrect prompt rendering
![image](https://private-user-images.githubusercontent.com/35394377/302143078-6b9d2921-1cf1-446d-96fd-2a7ce240ca61.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3ODEzOTMsIm5iZiI6MTczOTc4MTA5MywicGF0aCI6Ii8zNTM5NDM3Ny8zMDIxNDMwNzgtNmI5ZDI5MjEtMWNmMS00NDZkLTk2ZmQtMmE3Y2UyNDBjYTYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDA4MzEzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1YjdiZTRkOThiMzA5NTNiYmYwMzQxODU1NDk1NWRkMzlhMzUyODY5ZmVkZWVhNjk2NDJkNWVkYjg3ZmYzODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dtDI34yOmPBf6BE27xNir9tzcH_Bxj9LgTh9ENN8NYY)
The text was updated successfully, but these errors were encountered: