rohit-px2 / nvui

A modern frontend for Neovim.
MIT License
1.73k stars 50 forks source link

Use font metrics for the letter 'M' instead of 'W' #126

Closed arafatamim closed 2 years ago

arafatamim commented 2 years ago

Fixes font display quirks and inconsistencies.

Examples

Inspired by this neovide commit.

rohit-px2 commented 2 years ago

First off, thanks for the PR! I am a little confused as to why this is happening. The neovide commit is a little different since it was using the average character width which could be affected by double-width characters/nerd font characters. I used "W" since it is the widest character in most fonts, is that not the case for Jetbrains Mono? Also if it is monospace then all characters should have the same width..

arafatamim commented 2 years ago

Ok I opened up nvui today and the JetBrains issue no longer occurs. No idea why. Looks like I was too quick to open this PR, so I'm closing this as it's no longer relevant.