-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is a good question to summarize all the facts (it is spread all over at the moment I think). (Please ignore all line spacings in my example images, assume they are correct. I was just too laze to create 'correct' images and it has not really any relevance to what I talk about here. It is always about left-right dimensions a.k.a. width.) The aim [1] of Nerd Fonts is to provide fonts for programming. Most programming happens with monospaced fonts. That means that all letters have the same width and what you in effect get is a 'grid' of characters. Like this Monospaced: Each letter (glyph) has the same width But now we want to have some symbols. Like the github logo If we insert that into a monospaced font and keep the monospaced-promise (all stuff has the same width), we have this: There are a lot of circular icons like that. Usually letters are taller than wide. That means for monospaced fonts that the icon needs to be scaled waaay down to fit the width. It appears rather small and not tall enough. If the icon would be scaled for correct tallness (like in the proportional example) it would fill more than one width: The font ist not monospaced. So, now we identified one way to create a patched font: The strictly monospaced font (on the right), which is called "But the icons are so small!" When we make the icons bigger we have two possibilities: We can insert the icon with its correct width, like on the left side. The icon is just wider than normal letters: We do not need to take any precautions, but ... our strict grid is gone. Furthermore a lot of programming text editors would not take that font. They want monospaced fonts and you can not even select that font, or the oversized glyphs are scaled down by the client to fit the 'grid'! "But I want to use my usual terminal emulator with the fonts!" That is where the right solution comes in. Here the icon's width is 'standard width', but when the icon is drawn it extends into the next space. You show one example as topmost image, the cloud that seems to be bigger than one 'cell': Now all glyphs in the font have the same width and the font is detected as 'monospaced'. It can be used in all the places. But ... the user has to make sure that there is enough free room after the icon. This method has become so widespread that a lot of programs assume this. They insert a 'blank' after a symbol. Terminal emulators detect them as '2 cells wide' and handles them accordingly. Sometime they decide on actual blanks after the icon. This is the ordinary If you use the font in a GTK context, the best would be a Here are some topics that also talk about this. The Nerd-Font-naming will be different in some.
There a lot more Issues, all wrought around this problems, and it usually turns out as 'terminal emulator user' vs. 'GUI user'. [1] Well, that does not hold anymore I believe. But let's call it "one of the prime goals" or such. Edit: Add footnote |
Beta Was this translation helpful? Give feedback.
-
Remark: Some might think that the Here, also, it is the author's duty to check that there is no ugly overlap in the output. |
Beta Was this translation helpful? Give feedback.
This is a good question to summarize all the facts (it is spread all over at the moment I think).
(Please ignore all line spacings in my example images, assume they are correct. I was just too laze to create 'correct' images and it has not really any relevance to what I talk about here. It is always about left-right dimensions a.k.a. width.)
The aim [1] of Nerd Fonts is to provide fonts for programming. Most programming happens with monospaced fonts. That means that all letters have the same width and what you in effect get is a 'grid' of characters. Like this
Monospaced: Each letter (glyph) has the same width
Proportional: Each glyph has the room it needs, small are small and wide have …