terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Font rendering changes font look after typing i or j

Open ashemedai opened this issue 3 years ago • 7 comments
trafficstars

Windows Terminal version

1.14.1962.0

Windows build number

10.0.19043.0

Other Software

Not relevant.

Steps to reproduce

  1. Open a PowerShell or Debian/Ubuntu terminal
  2. Type something without i or j, say Th
  3. Look closely and type an i or j, say This

Expected Behavior

No change in the font rendering.

Actual Behavior

After typing the i or j you will notice a change in the rendering of the text.

image

In the zoomed in view you can see how some letters change, for example, the l is now 1 pixel taller and contains red subpixel rendering on the right. But you can also see some changes with the dash, a, and s. As if they all got bolded. This was on a Debian prompt with a Monokai colourscheme. But using a settings.json reset to default to make sure it wasn't a configuration issue on my side, you can as easily see this happen on a PowerShell 7 or Ubuntu prompt.

PowerShell: image

Interestingly enough, Command Prompt does not seem to exhibit this issue.

Also when you remove all the is and js in the sentence, the rendering reverts back.

Edit: Did some digging, thus far Cascadia Mono can reproduce this. Using Consolas or Fira Code does not trigger this behaviour.

ashemedai avatar Aug 05 '22 15:08 ashemedai

I'm having trouble reproducing this behavior. Long term we're currently planning to replace the default text renderer with a new one. It can be found in the Preview version of Windows Terminal and enabled in the settings menu by selecting any profile (including the "Defaults" one), navigating to "Advanced" and enabling "Enable experimental text rendering engine". That newer text renderer should theoretically not have this issue.

lhecker avatar Aug 06 '22 00:08 lhecker

I'll test the preview. Anything else I can do to help provide more details/background?

ashemedai avatar Aug 06 '22 09:08 ashemedai

I can replicate this with default 1.15.2002.0 as well.

Using the experimental text rendering engine option in 1.15.2002.0, however, seems to have eliminated the issue and renders similarly to what Command Prompt does, i.e. when you type T with Cascadia Mono, it immediately renders it at full height instead of the slightly taller height until you type that i or j.

Default vs experimental renderer: image

ashemedai avatar Aug 06 '22 11:08 ashemedai

Anything else I can do to help provide more details/background?

If this is fixed by the new experimental text renderer, then I'd say - to be entirely frank - it might not be worth it to fix it in the old default text renderer anymore. It's only a matter of time until we start rolling out the new one gradually to everyone after all.

But still, it might be helpful to be able to reproduce the issue. In order to do so I'd need to know what font size you're using, if you have any font features/axes set and what display scale you're using.

lhecker avatar Aug 08 '22 19:08 lhecker

Default, so Cascadia Mono at 12. Everything is at default Terminal settings.

2 QHD displays (2560x1440) with scale and layout (under display) set to 100%

ashemedai avatar Aug 08 '22 20:08 ashemedai

Apparently Cascadia Mono has a localized variant for Dutch: https://github.com/microsoft/cascadia-code/blob/017bde551af6af419cc5554c37bbdffa4f9388ed/sources/features/locl.fea#L29-L34

The new engine not handling this correctly might rather be a bug. 🤔 I'll have to investigate that...

lhecker avatar Aug 08 '22 21:08 lhecker

Oh wow, that makes sense and at the same time doesn't. I don't use my OSes in Dutch as I prefer English given the settings I have to work in. I do, however have this IME list configured: image image

I wonder if it somehow sees that English (Netherlands) and tries to kick off ligature combining when typing the i or j (despite it never doing that), which causes the change?

ashemedai avatar Aug 09 '22 06:08 ashemedai