ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
52.86k stars 3.6k forks source link

Why Symbols Nerd Font Mono is not single-width? #1486

Closed zzhaolei closed 6 months ago

zzhaolei commented 6 months ago

use CommitMono Nerd Font Mono(brew install font-commit-mono-nerd-font):

image

use Symbols Nerd Font Mono(brew install font-symbols-only-nerd-font):

image

Is this a bug?

Finii commented 6 months ago

In your second image you mix two fonts, the symbol-only font and some text font. Their respective "cell" size can be different, and in your image they are different.

It depends on your terminal if two monospace fonts with different advance widths are rescaled to match each other's width.

zzhaolei commented 6 months ago

Maybe I understand your explanation🤔. I would use a combination of CommitMono and CommitMono Nerd Font Mono

Finii commented 6 months ago

Think like this:

(I did not look up the actual values, so the numbers are just examples)

Commit Mono has a width of 900. All glyph have that width. Commit Mono Nerd Font Mono also has 900. The Icons are scaled such that they match the width (in the patching process). Symbols Only Mono has a width of 1024.

Now if you mix Commit Mono and Symbols Only Mono the resulting font-combination has widths of 900 and 1024 and is not monospace anymore.