spacebar icon indicating copy to clipboard operation
spacebar copied to clipboard

Support opentype font feature tnum (tabular numbers)

Open liangch opened this issue 3 years ago • 2 comments

With mono font, the numbers in status bar look fine. Is it possible to have proportional font with tabular numbers font feature supported?

In CSS world, the feature looks like this https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings

Inter font is one great proportional font with tnum feature. https://rsms.me/inter/#features/tnum

Thanks Liang

liangch avatar Oct 16 '20 05:10 liangch

Hi Liang 👋

Thanks for raising this. To be honest, I'm not entirely sure what I'm looking at here... 😬
This is the first front-end project I've maintained and I'm not all that familiar with things like font rendering.

If you're able to elaborate a bit more, perhaps it's something I could research.
Or hopefully someone better versed in such matters may be able to lend a hand 🙏

cmacrae avatar Nov 18 '20 16:11 cmacrae

I believe this is a feature nice to have. The date field in status bar has numbers, e.g. when '11:11' goes to '11:13', the field will became a bit wide, as '1' is thin compared to '3'. The tabular font feature makes all numbers at the same width.

You can find about tabular numbers at below links.

https://blog.graphiq.com/finding-the-best-free-fonts-for-numbers-25c54002a895?gi=d8e350ea89c4

https://www.typotheque.com/fonts/choosing_numerals

liangch avatar Nov 19 '20 06:11 liangch