I'm having some bugs with the "space" in vscode

The space character renders correctly in all other editors but not in vscode (https://code.visualstudio.com/). I’ve tested in AndroidStudio, JetBrains and other editors and they’re all fine.

We don’t seem to have full control of the whitespace and null characters and perhaps vscode is displaying a different whitespace character in the editor.

This is a monospace font.

1 Like

Hello Rita and welcome to this forum.

I tried it with my own mono spaced font and I found that:

If I name the font correct as in the font book (on mac), than I have all space right (see A)
But if I name the font incorrect, then the spaces are smaller than the other letters.

Please check it on your case as well.

Greetings, Jens.

This doesn’t work for me. The font name is the exact family name as in FontBook SkribbleMono.
Some interesting things about my setup.

  • The font is being developed in Windows, but tested by my developer on a Mac system
    Investigating vscode further I found it is built on top of the MonacoEditor. This editor uses the   | U+00A0 character in place of default space characters.
  • This font is created from scratch with a custom width.

When I change the character in a web-browser to be a standard space character it all works as expected.
The main problem is how to add all the potential whitespace characters to the font set and force them to be monospace width.
Did you start your font afresh or did you use another font to generate your monospace font? I’m guessing you did the latter which would explain why all the whitespace characters are working fine.

1 Like

Hello,
I’m sorry it took me a while to find a solution to your problem. You first need to set the character set to a uniform width with MONO and make sure that the space character also has the same width.

(A ) Double click on the word “Space”.
(B ) Enter the name “U+00A0”.
(C ) Confirm the overwriting of the nonbreakspace with »replace«.

Greetings, Jens.

1 Like

Thank you so much for your help :grin: Everything is working now!
Hope you have a great day

1 Like