Terminal: [v0.10] When two characters are ligatured, the first one becomes invisible

Created on 18 Mar 2020  路  36Comments  路  Source: microsoft/terminal

fig2

Environment

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.19582.0 Microsoft Windows NT 10.0.19582.0

Steps to reproduce

  1. Change font to the one with ligatures, for example Fira Code.
  2. Type --.

Expected behavior

The first - shouldn't disappear.

Actual behavior

The first - is disappeared.

Area-Fonts Area-Rendering Issue-Bug Priority-1 Product-Terminal

Most helpful comment

I am also having this issue, using 10pt Fira Code, no matter the zoom level, I just built from commit c0d704e734c54381af59dc0413b7aa19326a84ed

Here you can see the //, :: and www ligatures drawing incorrectly:
Screenshot of my terminal, showing the www, :: and // ligatures drawing incorrectly

All 36 comments

What font size are you using? What version of Terminal?

What font size are you using?

Default size i.e. 12.

What version of Terminal?

Windows Terminal (Preview)
Version: 0.10.761.0
Downloaded from Microsoft Store.

I am also having this issue, using 10pt Fira Code, no matter the zoom level, I just built from commit c0d704e734c54381af59dc0413b7aa19326a84ed

Here you can see the //, :: and www ligatures drawing incorrectly:
Screenshot of my terminal, showing the www, :: and // ligatures drawing incorrectly

We thought we'd fixed this with #4806, but perhaps we didn't.

Same here:
terminal-preview

"fontFace" : "Fira Code Retina",
"fontSize" : 12,
Windows Terminal (Preview)
Version: 0.10.761.0
Microsoft Windows [Version 10.0.18363.720]

Same here:
Ligatures issue

Versions

Windows Terminal (Preview)
Version: 0.10.761.0

Microsoft Windows [Version 10.0.18363.719]

Config

      "fontFace": "Fira Code",
      "fontSize": 9,
      "scrollbarState": "hidden",
      "padding": "5",

do you have an ETA for this issue @DHowett-MSFT ?
Thanks 馃憤

Unfortunately, I do not. Sorry.

By the way, I tried switching my font to Cascadia instead of Fira Code and this issue does not occur with Cascadia.

I'm using WT Version 0.10.781.0 and I can not seem to reproduce it. I'm also a Fira Code lover myself.

I'm on WT 0.10.781.0 and do reproduce this bug with Fira Code.

I'd bet this might have to do with not only the font face, but also the font size and display resolution. @FallenGameR (or anyone else reproing this), could you also make sure to share your fontSize and display resolution? Thanks!

@zadjii-msft here are the settings that causes this issue:

"fontFace" : "Fira Code",
"fontSize" : 10,

Resolution: 1920 x 1080
By the way, I tested with various fontSize values, and the issue is always the same

Reproduced with Windows Terminal 0.10.781.0, Fira Code 1.206, display resolution 1920x1200, every font size from 6 to 14.

Updating to Fira Code 2.000 fixed the issue and all ligatures show up correctly at all settings I'm able to test.

Ah. That's probably it. I'm at 2560 x 1600. I can't find a way to reproduce it.

Reproduced with Windows Terminal 0.10.781.0, Fira Code 1.206, display resolution 1920x1200, every font size from 6 to 14.

Updating to Fira Code 2.000 fixed the issue and all ligatures show up correctly at all settings I'm able to test.

The update to Fira Code 2.000 fixed the issue as well on my side

Same. Updating to Fira Code v.2 fixed the issues on my side.

Updating to v2 fixed the issue for me as well. Just FYI: make sure that when you are updating (or checking your font version numbers), you are looking at _all_ of the font faces in the settings page. I am embarrassed to say that, somehow, I had installed v2.0 of Light and Bold, while keeping version 1.2 around for Regular, Medium, and Retina. No idea how that happened. Just to be safe, I uninstalled the Chocolatey package that I had been using to automatically update the font face.

Updating to Fira Code 2 fixed the issue for me as well. I did have to manually remove all Fira Code fonts, then install the new ones. Overwriting didn't fix it.
fira-code-2-works

        {
            "acrylicOpacity" : 0.85,
            "closeOnExit" : true,
            "colorScheme" : "Campbell",
            "commandline" : "cmd.exe",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "filledBox",
            "fontFace" : "Fira Code Retina",
            "fontSize" : 12,
            "guid" : "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
            "name" : "Command Prompt",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : true
        },

Yep. Updating Fira Code to v2 fixed it. On one machine fonts were able to update the old version of themselves. On another machine v2 said that it was successfully installed, but v1.2 still remained and was picked up by default. Had to reboot and manually delete v1.2.

I'd bet this might have to do with not only the font face, but also the font size and display resolution. @FallenGameR (or anyone else reproing this), could you also make sure to share your fontSize and display resolution? Thanks!

2560x1600 - machine A
3240x2160 - machine B, 200% font scale
"fontSize": 14 - on both machines

Updating FiraCode to v2 solved the issue. Thanks!
No issues here

Updating the font fixed this yeah - doesn't seem to be a Terminal bug then?

It's still a Terminal bug, unfortunately. Thanks :smile:

It's still a Terminal bug, unfortunately. Thanks 馃槃

If It can be of any help...this worked before #4806

Thanks! 4806 describes the same bug as this, so it definitely worked before 4806 ;)

I thought I'd share my experience with this bug: I had an older version of the Firacode fonts hanging out in %APPDATA%\Local\Microsoft\Windows\Fonts that was being preferentially loaded instead of the 2.0 fonts I had installed into C:\Windows\Fonts. I was unable to delete the fonts in %APPDATA%\Local\Microsoft\Windows\Fonts despite using elevated command prompts, trying to close all handles to the fonts using Process Explorer (trying to do so resulted in invalid handle messages), and many other methods. The only thing that worked for me was using IObit Unlocker. After removing those font files, Terminal correctly picked up the newer FiraCode font and seems to be working normally now.

Windows 10 Version 1909 (OS Build 1836.752)
Terminal version: 0.10.781.0

Any ETA on this?

@privacyguy123 Unfortunately not at this time. I tried reproing this Friday, but I couldn't get this to happen on my machine at all with Fira Code 1.2. Hopefully someone else on the team will have a better chance at reproing this.

If we can't get a repro locally, we could try psychic debugging by looking at the changelog of what Fira Code changed on their side between 1.2 and 2.0. Maybe that would point us in the right direction of something we've done wrong.

It's also just possible that some of the rendering changes that are baking for 0.11 (#778/#5185) might just fix this, which might explain why I couldn't get a repro.

@zadjii-msft / @DHowett-MSFT : the bot can't complain about issue titles, but can you please fix invisible? 馃槈

@jsoref done

:trollface:

Technically, I suppose, I should say "it doesn't". It probably _could_.

Come on boys - new release and this was overlooked? It worked fine in earlier versions ...

Here is the f00king exact font it's happening with on my machine ;)
https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Medium/complete/Fura%20Code%20Medium%20Nerd%20Font%20Complete%20Windows%20Compatible.ttf

  • This is a purely graphical bug (the characters are still in the buffer, just not rendered for some reason)
  • With a trivial workaround (Upgrade the font, or pick _any other font_)
  • And the team doesn't have a local repro for this with the FiraCode v1.2 that other users are reporting an error with

    • EDIT: I just installed the font you linked, and that _does_ repro the bug for me, so that's helpful, thanks!

So no, this hasn't really bubbled up in our own priority list. Also, at least I was hoping that #5345 would just magically fix this (as there was quite a bit of renderer changes in that PR).

EDIT:

Even with the repro, I'm pretty sure this isn't going to make the 1.0 cut for the aforementioned reasons. If someone in the community were generous enough to contribute a fix, we'd probably take that though!

EDIT: Bug fixed by repatching my own Fira Code 1.2 with https://github.com/ryanoasis/nerd-fonts font-patcher script fixes this bug, perhaps the one they have uploaded is broken? 馃お

This bug occurred on my machine with FiraCode 4.0. The problem was resolved when I unblocked the FiraCode ttf files before installing them and restarted my terminal.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wid-Mimosa picture Wid-Mimosa  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

TayYuanGeng picture TayYuanGeng  路  3Comments

warpdesign picture warpdesign  路  3Comments

carlos-zamora picture carlos-zamora  路  3Comments