FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Digit 9 height inconsistent with rest

Open ghost opened this issue 2 years ago • 8 comments

Question

Is alignment of digits of default stylistic set (no feature selected) supposed to be equal at top and bottom bounds? I really like Fira Code overall, yet cannot use it at the moment as I fail to ignore the seeming inconsistency. Maybe there's a solution.

Observation

I cannot quite tell if 9 is misaligned or actually taller than the other digits, but in different terminals on Wayland (foot, alacritty, kitty, wezterm) it sticks out anytime there's a 9 on display within other digits: image

After taking a screenshot and marking the bottom, it looks like 3 is the same: image

And looking at the top, 1 doesn't align with 9 and seems like neither does it with 3 (slightly): image

Same result with GTK3's font renderer: image

ghost avatar Mar 17 '23 00:03 ghost

Overshoot - Google Fonts Glossary https://fonts.google.com/knowledge/glossary/overshoot

Overshoot (typography) - Wikipedia https://en.wikipedia.org/wiki/Overshoot_%28typography%29

This Optical Illusion Tricks You Into Thinking That Typeface Letters Are the Same Height https://slate.com/human-interest/2015/04/tobias-frere-jones-explains-the-optical-illusion-that-tricks-our-brains-into-perceiving-typeface-letters-are-of-equal-height.html

Normal practice.

kenmcd avatar Mar 17 '23 02:03 kenmcd

Thanks for the typography knowledge, TIL. Is it a deliberate stylistic choice in Fira Code?

ghost avatar Mar 17 '23 02:03 ghost

Is it a deliberate stylistic choice in Fira Code?

Yes. You will find overshoot in most fonts. Overshoot above the cap height, and overshoot below the baseline. To appear visually the same height.

kenmcd avatar Mar 17 '23 02:03 kenmcd

Thanks for sharing more knowledge. Not arguing sytlistic choice, only trying to learn more even if there's no technical solution given the design constraints of the typeface.

To appear visually the same height.

Does that mean the style is perceived as equal height by humans with a differently wired visual cortex than mine? I mean, 9 and 3, two round shaped glyphs, distinctly break out of the box for me in source code.

ghost avatar Mar 17 '23 02:03 ghost

It shouldn’t be that noticeable on low font sizes. Can you show 100% screenshots where you can see 9 and 3 breaking out of the box?

tonsky avatar Mar 17 '23 12:03 tonsky

In Alacritty at size 13 Fira stays inside the box. To check, open the screenshots and zoom in.

If I zoom in and out, I can see undershoot at some of the small sizes and overshoot at anything above 13. Increasing size further away from 13 seems to render inside the box at some sizes and go back to overshoot at most sizes. Some cyclic back and forth from overshoot to fitting inside the box.

size 13 ok

image

size 12 miniscule undershoot at bottom, easy to overlook

image

size 10 overshoot

image

size 11 overshoot

image

size 15 overshoot

image

ghost avatar Mar 18 '23 04:03 ghost

Wait, you mean at the bottom? Because all your screenshots have perfectly flat top

tonsky avatar Mar 18 '23 15:03 tonsky

Yes, from what I've noticed, it's all at the bottom. 9 jumps from overshoot to fit-in and back while cycling font size in alacritty. Size 13 is one of the levels where it stays inside. And at size 12 there's a miniscule undershoot.

ghost avatar Mar 18 '23 19:03 ghost