gitpod icon indicating copy to clipboard operation
gitpod copied to clipboard

Weird font in terminal

Open nitish771 opened this issue 5 years ago • 37 comments

Bug description

terminal shows weird font. It is showing vertically half chars.

Screenshot at 2021-05-02 12-02-11

Steps to reproduce

When i launched gitpod.io it was there.

Expected behavior

No response

Example repository

No response

Anything else?

No response

nitish771 avatar May 02 '21 06:05 nitish771

Could you go here and scroll down to the demo: https://xtermjs.org/? Do you get the same effect there? If so it is an issue with font on your operating system.

akosyakov avatar May 03 '21 06:05 akosyakov

the font of xtermjs works absolutely fine. The problem is only in gitpod.io terminal. Font in editor and sidebar is good.

nitish771 avatar May 04 '21 15:05 nitish771

This is happening to me lately, too. I tried on both Brave and Firefox, and it seems they are both affected. image

filiptronicek avatar May 04 '21 20:05 filiptronicek

You can investigate values of terminal.integrated.fontFamily and editor.fontFamily settings. VS Code relies on underlying browser/operating system fonts to render based on these values. Maybe you can check what happens if you use the same fonts in other websites (i guess the same) or try to change the value to find better fonts.

akosyakov avatar May 05 '21 08:05 akosyakov

I tried changing terminal.integrated.fontFamily to Helvetica, this solved the problem, the font was looking good, even when I then proceeded to delete the setting, it displayed the default font without any issues.

filiptronicek avatar May 05 '21 14:05 filiptronicek

I tried changing terminal.integrated.fontFamily to Helvetica, this solved the problem, the font was looking good, even when I then proceeded to delete the setting, it displayed the default font without any issues.

changing font to Helvetica didn't help but monospace did the work.

nitish771 avatar May 05 '21 14:05 nitish771

I don't think, that this should be closed, having to change the font is not the thing that should be the fix. I am using all default settings, which means that this affects more people, right?

filiptronicek avatar May 05 '21 14:05 filiptronicek

@akosyakov could you please reopen this?

filiptronicek avatar May 11 '21 19:05 filiptronicek

I'm having the same issues. Changing the font family in Settings does fix it temporarily, but if you open a new terminal or restart the workspace then the issue recurs.

Screenshot 2021-05-14 at 08 46 20

lechien73 avatar May 14 '21 07:05 lechien73

Any thoughts on this? It's getting quite frustrating to have to reset the terminal font every time I create a new terminal or restart the workspace.

lechien73 avatar May 19 '21 13:05 lechien73

Any thoughts on this? It's getting quite frustrating to have to reset the terminal font every time I create a new terminal or restart the workspace.

Yeah It is annoying. This solution is temporary. Even i say just for a few minutes.After you change font after 5 minutes it starts showing that same (weird) font again. I'm not even sure that is a kind of font. So I have to come to settings every 5-6 minutes to change fonts to anything (even wrong or empty works) then once time limit is reached same process.

nitish771 avatar Jun 01 '21 13:06 nitish771

So I have to come to settings every 5-6 minutes to change fonts to anything (even wrong or empty works) then once time limit is reached same process.

Yes, exactly the same here. I had read about issues with VS Code and the terminal, so I'm hoping when (if) the changes made in this PR go live in Gitpod that the problem will be solved. Until then, I need to keep settings.py open and continually reset the font in the terminal which, when you're making tutorial videos based on Gitpod, is extremely frustrating.

lechien73 avatar Jun 01 '21 16:06 lechien73

@lechien73 thanks for linking upstream issue, I hope too that it is gone with next VS Code upgrade

akosyakov avatar Jun 07 '21 03:06 akosyakov

Should be fixed via #4403

akosyakov avatar Jun 08 '21 02:06 akosyakov

@filiptronicek Could you try whether you can reproduce against https://ak-vscode-update.staging.gitpod-dev.com/workspaces/

akosyakov avatar Jun 15 '21 07:06 akosyakov

In the meantime, we've added a Python file to our template that runs on startup and toggles the font, thereby fixing the issue. Here's the code:

# Fixes the font issue on Brave browser
# Matt Rudge
# June 2021

import json
import os

BASE_PATH = os.environ.get("GITPOD_REPO_ROOT")

with open(f"{BASE_PATH}/.vscode/settings.json", "r+") as f:
    content = json.loads(f.read())

    if "terminal.integrated.fontFamily" not in content:
        print("Terminal Font Fix: adding Menlo font")
        content["terminal.integrated.fontFamily"] = "Menlo"
    else:
        print("Terminal Font Fix: removing Menlo font")
        content.pop("terminal.integrated.fontFamily")

    f.seek(0, os.SEEK_SET)
    f.write(json.dumps(content))
    f.truncate()

lechien73 avatar Jun 15 '21 11:06 lechien73

@filiptronicek Could you try whether you can reproduce against ak-vscode-update.staging.gitpod-dev.com/workspaces

Looks like I can't access this environment, @akosyakov! image

filiptronicek avatar Jun 15 '21 12:06 filiptronicek

Let's hope it is gone after June release.

akosyakov avatar Jun 18 '21 02:06 akosyakov

Still an issue

image

sauravhiremath avatar Jun 30 '21 16:06 sauravhiremath

June release it not yet out.

akosyakov avatar Jul 01 '21 02:07 akosyakov