-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 fonts' italic text has wavy baselines #13987
Comments
Looks like the text is just formatted as italic by neovim. I'm sure whatever neovim config you're using has options for configuring how different elements are rendered - you can always disable it there. I'm sure there's a way to use font features to disable italics, though, I don't know it off the top of my head. |
Hi @zadjii-msft , that's right, that the comments are formatted in italics, that's defined in the colorscheme. Good point with the configuration, I will try that. |
@indika-dev Does wezterm support italics as emitted by client apps? @wez for some help. Maybe there's something in the default config that disables them for wezterm. (sorry for not being more familiar with wezterm. I probably should be.) |
Sorry, but I don't know, what you mean with "...italics as emitted by client apps". What I found in the documentation is this. But I didn't configure this. |
I mean along the lines of #5461. Apps like vim can tell the Terminal "I want this text to be italicized" in the same way they tell the Terminal "I want this text to be red". |
Yeah, wezterm supports italics ( My read of this issue is that the problem is that the italics have a wavy baseline in the image in the OP, which suggests to me an issue with how the glyphs are rasterized/hinted, rather than an issue with understanding whether italics should be enabled. If someone reported this to me in wezterm, I'd be curious about whether it was font specific: wezterm uses a feature of freetype to synthesize italics (by skewing the glyph) when no italic variant of the font is found, and that can behave differently from "normal" font rendering, and I wonder if there are parallels to that in the MS font shaper/rasterizer stack used in MS terminal? |
goodness gracious, thanks for that. I clearly didn't have enough coffee this morning and just figured OP meant "italic" when they said "wavy". Yea, the baselines do look a little wavy, don't they. Huh. @indika-dev can you give us your whole settings.json file/? The exact set of settings should help with a repro here. |
It's still pretty early! |
I took a look at #5461 and Nerd Fonts were mentioned. So, I tested a bit and it looks like, that the wavy lines only appear under certain Nerd Fonts:
|
Sure, here it is. |
Hey @lhecker, is this related to your glyph scaler? |
I see the same with Caskaydia Cove Nerd Font from https://www.nerdfonts.com/font-downloads (also using Neovim) It appeared fine before Terminal was updated to 1.16 this morning. |
@birtles That's because that font, just like FiraCode, doesn't ship with a proper italic variant. When DirectWrite "simulates" those italic glyphs, it doesn't correctly compute the so called "overhangs" (= how much a glyph is outside of the bounding box / cell) and this confuses the new text renderer. The original Cascadia Code ships with an actual italic variant which looks quite different (easily visible on the "f" character) and works correctly (because it's not simulated): I'm working on a fix, but I'm not 100% sure how to best approach it yet. |
This commit changes the glyph scale algorithm to prefer aligning glyphs to their baseline. This improves the visual appearance of simulated italic glyphs. However wide Emojis in narrow cells now look slightly worse without centering. Closes #13987 ## Validation Steps Performed * Use FiraCode which has no italic variant and instead uses simulated italics * Write italic text * Baseline is consistent ✅
This commit changes the glyph scale algorithm to prefer aligning glyphs to their baseline. This improves the visual appearance of simulated italic glyphs. However wide Emojis in narrow cells now look slightly worse without centering. Closes #13987 ## Validation Steps Performed * Use FiraCode which has no italic variant and instead uses simulated italics * Write italic text * Baseline is consistent ✅ (cherry picked from commit 97dc5c8) Service-Card-Id: 85767343 Service-Version: 1.16
🎉This issue was addressed in #14039, which has now been successfully released as Handy links: |
I'm sorry to reuse this closed thread. |
As mentioned above (#13987 (comment)) this issue was closed with a hotfix, that didn't address the entire problem. The proper, thorough fix is #14959 which has first shipped in v1.18.1421.0. Could you try out the latest Windows Terminal Preview (v1.18.1462.0) and see if the issue still occurs for you? |
I'm using the latest official version shipped in the windows store (I think? There is no update button available): |
It's fixed starting v1.18.1421.0, which at the time of writing is only available as Preview. FYI That Preview in particular version was released over 3 months ago. It's unlikely you'll find major bugs in it. You can use it to bridge the gap until 1.18 is the stable version (= within a month). Actual development versions of Windows Terminal are not released in the Windows Store, but rather tested by the team for a while before being released. |
That's strange! The latest version available in the store for the Stable channel is 1.17 |
Windows Terminal version
1.16.2523.0
Windows build number
10.0.19043.0
Other Software
neovim 0.7.2 (WSL2)
FiraCode NF, 12pt as Terminal Font
colorscheme github_dark
Steps to reproduce
Open a java source code file and comments are wavy, non-comment code lines are as expected
Expected Behavior
Open a java source code file and comments look the same way as other code lines
Actual Behavior
comment lines are wavy
The text was updated successfully, but these errors were encountered: