nerd-fonts
nerd-fonts copied to clipboard
RobotoMono "Mono" variant is too widely spaced
🎯 Subject of issue
The "RobotoMono Nerd Font Mono" seems to have been spaced more widely than the non-mono version "RobotoMono Nerd Font" Seems like this issue has been reported once in the past but didn't find a solution: #220 It partly affects terminals like kitty and Alacritty but these have cell spacing and sizing configuration options so it can be solved
Screenshots with detailed description are below
🔧 My current set-up
- RobotoMono Nerd Font 11
- GNOME Terminal, Tilix, Kitty
- Fedora Linux 33 x86_64
★ Screenshots
Tilix terminal - Using the "Mono" variant
Tilix terminal - After setting the non-Mono variant in GNOME Tweaks, wide spacing issue is resolved but icons and glyphs look bigger than "Mono" variant
kitty terminal - Solved the issue after setting "adjust_column_width" to "-1" in kitty's config file. Using the "Mono" variant, icon's size is correct
Examined this after creating #830
In Roboto there are some 'special' glyphs that are 'wider than normal' in the original font.
These are for example Eth
Ð , Dcroat
ď and ldot
ŀ.
The Nerd Font Mono variant takes the widest glyph and makes the font 'really monospaced', thus it needs to increase the 'normal' glyph's width.
We could exclude these specific glyphs, like in #830, but it is not so obvious if that is the right thing to do.
Edit: Add example image
Eth
and Dcroat
have some negative bearing, but not enough to keep the width constant.
I think this is a font specific quirk, they call themselves mono
:roll_eyes:
Any updates on this? I really love the font, but it's unusable as is, could someone make a version with forced char width even if it breaks some characters? Sorry, I am a total noob about the process, just trying to get the font working.
UPDATE
So I modified the patcher script on lines 662 and 664 to be
if self.font_dim['width'] < self.sourceFont[glyph].width:
self.font_dim['width'] = 1230
if xmax > self.font_dim['xmax']:
self.font_dim['xmax'] = 1230
If you modify it to be a constant value, you can get very close through trial and error, and you can get pretty good results, certainly good enough for me, it's a quick hack, and I only post it here for other strugglers who search for RobotoMono in issues
Thank you guys for creating a fantastic tool
Maybe we should add a font specific handling for the too-wide-chars, so that at least the release fonts are ok?
Fixed by #1062
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.