githubnext / monaspace

An innovative superfamily of fonts for code
https://monaspace.githubnext.com
SIL Open Font License 1.1
13.14k stars 219 forks source link

Digit 0 height doesn't match other digits in some applications #145

Closed Reedbeta closed 1 month ago

Reedbeta commented 7 months ago

Unsure if this is a font issue or a renderer issue, or an intersection of both, but I thought I'd start here.

Example string: [Version 10.0.19045.3693]

Here's how it renders in Windows Terminal, with Monaspace Neon: Windows Terminal

The 0 in 19045 is visibly shorter than other digits. But the 0's in 10.0 appear to be the right height.

Looks similar in VSCode: VSCode

Looks more correct in Visual Studio 2022: Visual Studio 2022

Looks good in Firefox as well: Firefox

Firestar-Reimu commented 7 months ago

Why the 0's in 10.0 is much wider than other digits? Is it a ligature like 0.0 -> eyes?

alexeyten commented 7 months ago

@Firestar-Reimu that's “Texture Healing” https://monaspace.githubnext.com/

Reedbeta commented 7 months ago

Aesthetically, I don't love the wide zeroes - they look incongruous next to the other digits for me - but that's another issue. 🙂 The mismatched heights, though, seem like an actual bug somewhere.

ToxicFrog commented 7 months ago

I just came here to report an issue that I think might be the same thing. This is in VScode with ligatures enabled:

image

And disabled:

image

In both cases we get a lot of unusually short zeroes, but if ligatures are enabled the 0 following the leading 1, and only that 0, is the correct height. This is in vscode and you get the same effect with any non-false setting of fontLigatures, including ones that should be turning off texture healing.

ToxicFrog commented 7 months ago

On further reading, the "any non-false setting" is #118 which is a vscode bug, so this is in fact a texture healing bug with monaspace. 'calt' off gives short zeroes everywhere, 'calt' gives a mix of short and normal zeroes.

Finii commented 6 months ago

It would be interesting to know if you use the static or the variable font version?

Finii commented 6 months ago

The different zeros do have different heights, just by one unit, but nevertheless, that rounds either up or down when "hinting".

In this regard it would be also interesting if the behaviour you encounter changes if you change the font size by 1 or 2 pt. Or maybe look at ridiculously big letters like 60 pt, is the difference still one pixel?

Screenshot 2023-12-19 at 20 13 45

Ignore the different position, the XY display on the bottom of the glyhs shows the green point at 1484 and 1485

idan commented 1 month ago

Fixed in ca8015b27bdc6d8e1201b1ad722f4ae3c38970d0