nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

RobotoMono "Mono" variant is too widely spaced

Open rrobertobt opened this issue 3 years ago • 4 comments

🎯 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 Screenshot from 2021-03-21 23-13-30

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 Screenshot from 2021-03-21 23-14-07

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 Screenshot from 2021-03-21 23-31-00

rrobertobt avatar Mar 22 '21 05:03 rrobertobt

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 ŀ.

image

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

Finii avatar May 14 '22 18:05 Finii

Eth and Dcroat have some negative bearing, but not enough to keep the width constant.

image

I think this is a font specific quirk, they call themselves mono :roll_eyes:

Finii avatar May 14 '22 18:05 Finii

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

Image of the result

Thank you guys for creating a fantastic tool

delinx avatar Aug 09 '22 04:08 delinx

Maybe we should add a font specific handling for the too-wide-chars, so that at least the release fonts are ok?

Finii avatar Aug 15 '22 11:08 Finii

Fixed by #1062

Finii avatar Jan 28 '23 22:01 Finii

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.

github-actions[bot] avatar Jul 31 '23 00:07 github-actions[bot]