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

[Proposal] Improve the aesthetics of underscores (adjust width and vertical alignment) #1581

Open
nmsmith opened this issue Mar 29, 2024 · 0 comments

Comments

@nmsmith
Copy link

nmsmith commented Mar 29, 2024

IMO underscores are quite messy in Fira Mono and Fira Code. A few tweaks could improve their aesthetics greatly.

Proposal 1: Reduce underscore width

With ligatures turned off, the gap between an underscore pair __ is really small, to the point where it's hard to discern, especially on low DPI monitors and smaller font sizes.

IMO making the underscore a tiny bit narrower looks a lot better. To illustrate this, I've attached two images. The first is Fira Code, and the second is Source Code Pro.

Screenshot 2024-03-29 at 9 19 57 pm Screenshot 2024-03-29 at 9 21 17 pm

The difference is subtle, but IMO the underscore spacing in the second image is nicer. (The difference is more apparent in my IDE.)

Proposal 2: Move underscores upwards, to align with square brackets

Underscores juxtaposed with square brackets are common in languages that support pattern matching. In most other monospace fonts that I've used, the underscore character is vertically aligned to the bottom of the bracket characters. Fira Code (and Fira Mono) places the underscore lower than that.

Here is a comparison between a few different fonts: Fira Code, Monaspace Neon, Hack, Jetbrains Mono, and Inconsolata. (Underscores appear on lines 1, 3, and 6 of the code snippet.)

Fira Code Monaspace Neon Hack Jetbrains Mono Inconsolata

Here's a rough mockup with the underscores narrowed + raised slightly. On the left is today's Fira Code; on the right is my suggested tweak.
Fira Code Fira Code underscores

This isn't a pixel-perfect mockup, but it gives a sense of what the change might look like.

@nmsmith nmsmith changed the title Make underscore slightly narrower [Proposal] Improve the aesthetics of underscores (adjust width and vertical alignment) Mar 30, 2024
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

No branches or pull requests

1 participant