Numderline
Numderline is a font patcher that uses OpenType font shaping trickery to make it easier to visually parse large numbers. It has multiple variants for different preferences, fonts and contexts.
I (Tristan Hume) was inspired to build this by my job at Jane Street involving staring at a lot of large numbers, mostly latencies in nanoseconds, and wanting to pick out larger quantities like milliseconds and microseconds.
See the code on Github to contribute or patch fonts of your choice.
Underlining
The flagship "Numderline" variant underlines alternating groups of 3 digits. It's what I use at work.
Download (hover to view):
DejaVuSansMono
UbuntuMono
DroidMono
Cousine
SauceCode
Lekton
Grouping
This variant squishes digits together into groups of 3. It's nice looking and works for most fonts but is annoying for editable text since it jumps around while typing.
Download (hover to view):
DejaVuSansMono
UbuntuMono
Hack
SauceCode
Bolding
For fonts with lots of weights, making alternating groups slightly bolder is an alternative to underlines.
Download (hover to view):
SauceCode
Commas
Inserting fake commas is a good option in proportional contexts where changing the width doesn't matter.
Download (hover to view):
DejaVuSans
Monospace Commas
By combining the grouping variant with tiny commas this variant adds commas while remaining monospaced.
Download (hover to view):
DejaVuSansMono
UbuntuMono
Hack
SauceCode
Debug
The debug version shows how the font uses shaping tricks to replace digits with alternate versions that track the position modulo 7.
Download (hover to view):
DejaVuSansMono
Notes
- These fonts only work in applications with proper font shaping support. This includes browsers, many native apps and the Kitty terminal. Unfortunately some apps that support basic ligatures don't support the fancy shaping features I use, including Sublime Text 3 and iTerm2. Other apps like Emacs and most terminals don't support shaping at all.
- The flagship underlining variant is my favorite, but it only works on fonts with a sufficiently wide, low and thin underscore like DejaVu Sans Mono. This could be fixed by synthesizing an underline contour for a font instead of using the underscore character, contributions welcome!
- "SauceCode" variants are based on the Source Code Pro font, but the SIL Open Font License prohibits derived fonts from using the same name.
- Unfortunately I couldn't get patching of fonts with existing ligatures to preserve the original ligatures, although it's probably possible with some debugging of arcane font stuff.
- All data in the example table is based on a random generation script, not any real data.