Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overpass Nerdfont kerning is incorrect #703

Closed
4 tasks
InfoSec812 opened this issue Dec 3, 2021 · 10 comments · Fixed by #1062
Closed
4 tasks

Overpass Nerdfont kerning is incorrect #703

InfoSec812 opened this issue Dec 3, 2021 · 10 comments · Fixed by #1062
Labels
Milestone

Comments

@InfoSec812
Copy link
Sponsor

🗹 Requirements

  • A brief but descriptive title of your issue
  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have read or scanned the FAQ
  • I have read or scanned the Wiki

🎯 Spacing issues in Overpass Nerdfont

When I use Overpass Nerdfont the spacing between letters is mishandled.

image

🔧 Your Setup

  • Overpass Nerdfont Mono
  • It happens in all of them on Linux as well as in my IDEs
  • Linux

★ Optional

@ryanoasis
Copy link
Owner

It's strange because even the unpatched Overpass is displaying strangely in gnome terminal for me just like your screenshot.

Selection_097

However something like gedit both patched and unpatched Overpass look fine 🤔

Selection_098

@InfoSec812
Copy link
Sponsor Author

Hmmm. I have no issues with the unpatched Overpass Mono from Google Fonts. Also, I have issues with the patched version in EVERY application, not just Gnome terminal.

@InfoSec812
Copy link
Sponsor Author

Example:

Konsole with Overpass Mono (unpatched)
image

Konsole with Overpass Mono (patched)
image

@Finii
Copy link
Collaborator

Finii commented Dec 21, 2021

Hmm, dowloaded Overpass-Mono from G-Fonts and patched with HEAD. Shows ok in Tilix.

image

I can not, however, select it with Gnome Terminal. But it (Terminal) looks different to yours:

image

But then, no wonder:

$ ttfdump Overpass\ Mono\ Regular\ Nerd\ Font\ Complete\ Mono.ttf  | grep 'advanceWidthMa|maxCompositePoin|xAvgCharWi'
	 advanceWidthMax:	        1517
	 maxCompositePoints:	 94
	 xAvgCharWidth:		 1232

@Finii
Copy link
Collaborator

Finii commented Dec 21, 2021

Well ... if I use a font-patcher where the ScaleGlyph stuff is fixed (i.e. what I work on at the bottom of #695), it shows up in my Gnome Terminal and looks good.

image

This does not mean the patch of #695, but this unpushed stuff:

CommitDate: Mon Dec 20 14:57:56 2021 +0100

    font-patcher: Redesign ScaleGlyph parameter

    [why]
    While patching for --mono with Font Awesome we get glyphs that are
    too wide, for example '_520' (0xF22B). In the symbol font original
    it is about 1918 wide. According to ScaleGlyph FONTA_SCALE_LIST
    it shall be scaled as 0xF17A - which is only 1664 wide.

    This results in too wide symbols in the patched font.

If you want to try, just set all *_SCALE_LIST to None. Well, the symbol sizes will be non-optimal, but the font otherwise will be real 'Mono'. The commit is a bit more complex and I'm still undecided which stategy of two I prepared is better.

@Finii
Copy link
Collaborator

Finii commented Jan 6, 2023

This is fixed in 2.2.2
Note that we use the otf instead of ttf now.

$ ttfdump Overpass\ Mono\ Regular\ Nerd\ Font\ Complete\ Mono.otf  \
| grep 'advanceWidthMa|maxCompositePoin|xAvgCharWi'
	 advanceWidthMax:	 1232
	 maxCompositePoints:	 1232
	 xAvgCharWidth:		 1232

All widths consistent.

@Finii Finii closed this as completed Jan 6, 2023
@luciodaou
Copy link

I'm having this issue on Overpass-Mono-NF 2.3.1 installed through scoop on Win11:
image

Windows Font says 2.3.0, somehow.
image

The issue happens with the file downloaded from directly from GitHub too:
https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Overpass/Mono/Regular/complete/Overpass%20Mono%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.otf

@Finii
Copy link
Collaborator

Finii commented Jan 21, 2023

Sorry to hear that you have problems, will have a look right away.

The v2.3.1 is actually marked in the font files as v2.3.0 because only very few font files got any change with the bugfix version, and it was clear to me we will need a 2.3.2 anyhow ;)

@Finii
Copy link
Collaborator

Finii commented Jan 21, 2023

Confirmed.
I really need to implement a warning for unexpected widths. Thanks for reporting!


Adding more information here along the way (to prevent spamming ppl with emails)

Hmm, there IS a warning Extended glyphs wider than basic glyphs:

$ fontforge font-patcher src/unpatched-fonts/Overpass/Mono/Regular/overpass-mono-regular.otf --mono
Copyright (c) 2000-2022. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20220308
 Based on sources from 2022-06-16 10:08 UTC-ML-D-GDK3.
PythonUI_Init()
copyUIMethodsToBaseTable()
Nerd Fonts Patcher v2.3.0 (3.4.4) executing
     Glyph widths 616 / 616 - 1232 and Panose says "monospace -1" ([0, 0, 5, 9, 0, 0, 0, 0, 0, 0])
Redistributing line gap of 266 (133 top and 133 bottom)
Extended glyphs wider than basic glyphs
Very wide and short font, disabling 2 cell Powerline glyphs
Adding 177 Glyphs from Seti-UI + Custom Set 
╢████████████████████████████████████████╟ 100%
Adding 198 Glyphs from Devicons Set 
╢████████████████████████████████████████╟ 100%
Done with Patch Sets, generating font...
Nerd Fonts: Tweaking 1/1
Changing flags from 0xB to 0x3
Changing lowestRecPPEM from 8 to 3
   Overpass Mono Regular Nerd Font Mono
   \===> 'Overpass Mono Regular Nerd Font Mono.otf'

Found the problem... was a typo in the code :-(

Thanks for reporting, PR on the way.

@Finii Finii reopened this Jan 21, 2023
@Finii Finii added this to the v2.3.2 milestone Jan 21, 2023
Finii added a commit that referenced this issue Jan 21, 2023
[why]
With commit
  99c2608  font-patcher: Fix more 'Nerd Font Mono' too wide

the glyphs 'ij' and 'IJ' are exempted from the advance width
calculation, because some fonts (i.e. Overpass Mono) defines them as two
cell wide glyphs (Hello? 'Mono'?)

For some obscure reason it was 'IJ' and 'J circumflex' that were
exempt, not 'ij'.

[how]
Exempt correct code.

Fixes: #703

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Jan 22, 2023
[why]
With commit
  99c2608  font-patcher: Fix more 'Nerd Font Mono' too wide

the glyphs 'ij' and 'IJ' are exempted from the advance width
calculation, because some fonts (i.e. Overpass Mono) defines them as two
cell wide glyphs (Hello? 'Mono'?)

For some obscure reason it was 'IJ' and 'J circumflex' that were
exempt, not 'ij'.

[how]
Exempt correct code.

Fixes: #703

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@github-actions
Copy link
Contributor

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 github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
With commit
  99c2608  font-patcher: Fix more 'Nerd Font Mono' too wide

the glyphs 'ij' and 'IJ' are exempted from the advance width
calculation, because some fonts (i.e. Overpass Mono) defines them as two
cell wide glyphs (Hello? 'Mono'?)

For some obscure reason it was 'IJ' and 'J circumflex' that were
exempt, not 'ij'.

[how]
Exempt correct code.

Fixes: ryanoasis#703

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants