Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The width of the half-width space appears doubled in VSCode #7

Closed
pddg opened this issue Jul 7, 2019 · 6 comments · Fixed by #99
Closed

The width of the half-width space appears doubled in VSCode #7

pddg opened this issue Jul 7, 2019 · 6 comments · Fixed by #99

Comments

@pddg
Copy link

pddg commented Jul 7, 2019

Hi. I'm a developer and not very familiar with fonts.
Please let me know what happened when using this awesome product.

Environtment

  • macOS 10.14.5 Mojave
  • VSCode 1.36.0
  • iTerm2 3.2.9
  • PyCharm Professional 2019.1.3

I installed the SF Mono Square following your instruction on README. And open the folder containing fonts, then, double clicked and installed them.

What is the problem?

I want to use this font on VSCode, but the half-width space looks like doubled.

sf-mono-doubled

And the line height behaves strangely with default value 0. It uses the size of font if it specified 0.

スクリーンショット 2019-07-07 14 18 02

But I specify the line height manually (as same as editor font size), It behaves normally.

スクリーンショット 2019-07-07 14 36 09

These behaviors do not appear in other applications such like iTerm2 or PyCharm.

スクリーンショット 2019-07-07 14 18 25

スクリーンショット 2019-07-07 14 44 37

This phenomenon could not be confirmed with other fonts (Menlo, Monaco, Ricty Diminished with-icons...etc).

Question

  1. Is this a bug?
  2. Do you know the workaround for this?
@delphinus
Copy link
Owner

hmm... It seems that VSCode sees some other properties in fonts than other apps. I will investigate this deeper. Wait minutes.

delphinus added a commit that referenced this issue Jul 8, 2019
This commits is a temporal solution for #7.
delphinus added a commit that referenced this issue Jul 8, 2019
This commits is a temporal solution for #7.
delphinus added a commit that referenced this issue Jul 8, 2019
This commits is a temporal solution for #7.
@delphinus
Copy link
Owner

for the “space” glyph

I've released v1.1.1 for a temporal workaround for this. This installs source fonts named “SF Mono 1x2”.

スクリーンショット 0001-07-08 15 03 44

SF Mono 1x2 is a part of SF Mono Square and has half-width glyphs only. You can set it as fontFamily in VSCode, and SF Mono Square as the fallback.

  • "SF Mono 1x2", "SF Mono Square"

スクリーンショット 0001-07-08 15 09 08

This makes good for such texts above.

スクリーンショット 0001-07-08 15 25 46

for line height

In general, VSCode adjusts the line height by calculating with some properties of fonts. SF Mono Square and the original SF Mono have this properties and VSCode inserts some spaces between lines even if lineHeight == 0. It is the spec.

So if you feel annoying the extra space, you should supply the same value as the font size into Line Height.

@pddg
Copy link
Author

pddg commented Jul 8, 2019

@delphinus It's working as I expected. Thank you!

@delphinus
Copy link
Owner

welcome ;) I will investigate further, later.

@shungo27
Copy link

shungo27 commented Jul 21, 2019

I can not see full-width space with VSCode "SF Mono 1x2", "SF Mono Square".

@delphinus
Copy link
Owner

@pddg Sorry for toooo late. This is fixed in the release v3.1.0, I think. Check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants