microsoft / cascadia-code

This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.
Other
25.16k stars 797 forks source link

Feature Request: Add support for numderline (easier number parsing) #592

Open kazuoteramoto opened 2 years ago

kazuoteramoto commented 2 years ago

Description of the new feature/enhancement (with images if possible)

Visually parsing a large sequence of numbers like 1570068719 can be tricky. Tristan Hume introduced a solution called numderline. The basic idea is to use variants based on the context. I'm using it with cascadia code with a good success.

To illustrate, this is currently my setup (this repo have the needed code to patch the font, I'm using the following parameters --no-underline --shift-amount 90 --squish 1)

image

I think that something subtle is enough for daily use.

Proposed technical implementation details (optional)

The two linked pages have more details, its uses font shaping, but I'm not sure of the details. I'm hoping this can be toggled by a font feature if implemented upstream.

I'm bringing this issue here because I think this can be better integrated in the original font, two reasons I see:

aaronbell commented 2 years ago

Interesting.

Thinking through it, I don't think it would be particularly difficult to implement. Perhaps narrow the numbers by 10% or 20%, then create a variant of each where it is off to the right, centered, and off to the left.

Then it'd just be a question of the OT code to implement.

PaulDempsey-ms commented 2 years ago

Note that digit grouping conventions are culture-specific (not all cultures group into uniform 3s)