Vscode: Proportional fonts are rendered as fixed width fonts in the terminal

Created on 6 Oct 2017  路  18Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.17.0
  • OS Version: macOS 10.12.6

Steps to Reproduce:

  1. Select a proportional font. (I use https://blog.golang.org/go-fonts)
  2. Open the terminal and do something. Text is rendered as if the font is a fixed width font.

screen shot 2017-10-06 at 08 23 37


Reproduces without extensions: Yes/No

*out-of-scope feature-request integrated-terminal

Most helpful comment

I found out that it is possible to use a different font in the terminal. Currently I have this setting:

{
    "editor.fontFamily": "Go",
    "terminal.integrated.fontFamily": "Go Mono",
    \\

So it is possible to use a proportional font in the editor and a fixed width one in the editor

Things look ok now.

screenshot from 2017-10-06 12-09-27

All 18 comments

I've the same results on Win 10 Pro x64 / VSCode 1.17.0 while using a custom "editor.fontFamily"-setting.
grafik

By using the standard font family the problem is gone
grafik
grafik

I found out that it is possible to use a different font in the terminal. Currently I have this setting:

{
    "editor.fontFamily": "Go",
    "terminal.integrated.fontFamily": "Go Mono",
    \\

So it is possible to use a proportional font in the editor and a fixed width one in the editor

Things look ok now.

screenshot from 2017-10-06 12-09-27

Proportional fonts are just as valid as monospace fonts for coding. It would be nice to have better rendering in the terminal since the extra spacing makes proportional fonts difficult to read (they seem to have even wider spacing than monospace fonts). For now I'm setting terminal.integrated.fontFamily to a monospace font similarly to @mmzeeman's tip.

Update settings to "terminal.integrated.fontFamily": "Monaco", it works for me.

Resetting the font does not solve the problem.

You are right. It is a workaround, you have to use a monospaced font in the terminal.

I set the terminal font for "terminal. Integrated. FontFamily" is still doesn't work, so that the terminal can make me look very pain

@Hideer you need to use a monospace font, variable width fonts are not supported within the terminal.

Hey, I'm in need of this "terminal.integrated.letterSpacing": 0.25, when will something like this be added, or is there a way I can achieve this currently?

@matt3224 decimal letter spacing would only be added after proportional font support is added. Font rendering is currently done on a canvas and every character is drawn on a grid and their texture cached to boost performance, because of this their x,y coordinates need to be integers (otherwise they would be blurry).

@Tyriar how far along is the proportional font support?

@matt3224 it's not planned

@Tyriar But you closed #35695 in favor of this one and now it's not planned? As far as I can see on xtermjs/xterm.js#1044, letter spacing is supported by xterm, right? So could we at least get that on VS Code?

I mean, I just wanted to have 1px more between each character because right now they just feel weird. And that 1px between each character would render the terminal much more closely to how Windows Command Prompt renders. It's just 1px, it's an integer and their texture could still be cached without a performance hit, right?

@rfgamaral it was actually an oversight that I didn't bring in letterSpacing as a setting in vscode, this comment is wrong https://github.com/Microsoft/vscode/issues/35695#issuecomment-336171007, I must have missed it.

I'll add this in the May release as that's trivial. Tracking in https://github.com/Microsoft/vscode/issues/49566 to make sure it gets done/verified. Sorry about the hassle and thanks for calling this out.

@Tyriar No problem, thank you :)

I had the same issue. because I imported settings from someone else. (I'm using linux, imported settings from a mac)
Go to Settings > filter settings to show modified settings >> there i deleted everything in front of the font field. restart the IDE.
if you import settings using a service such as Settings Sync. It may be because you are trying to use a font that is not currently installed on your computer.
also a reminder usually terminals, code editors are only support mono-space fonts.

screenshot from 2018-10-05 20-28-00

@dulara1994 remember you can also use font fallbacks, so you can have fonta, fontb, monospace as your font config if the fonts aren't on all your OS's.

Closing as font fix, you should be using a monospace font in a terminal. If you're experiencing this issue you can fix it by configuring the terminal.integrated.fontFamily setting to use a monospace font.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrkiley picture mrkiley  路  3Comments

biij5698 picture biij5698  路  3Comments

ryan-wong picture ryan-wong  路  3Comments

borekb picture borekb  路  3Comments

chrisdias picture chrisdias  路  3Comments