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

Wrong spacing before punctuation characters in Nerd Font version #3

Closed
IgorKrupenja opened this issue Nov 5, 2019 · 17 comments · Fixed by #4
Closed

Wrong spacing before punctuation characters in Nerd Font version #3

IgorKrupenja opened this issue Nov 5, 2019 · 17 comments · Fixed by #4

Comments

@IgorKrupenja
Copy link

  1. Install Monego Nerd Font on a Mac.
  2. Enable the font in an app (reproducible at least in iTerm and VSCode).
  3. Try typing something containing some punctuation, e.g. "This is a test:'.

image

Notice how : and ' look as if there is a space in front of them even though there isn't.

@cseelus
Copy link
Owner

cseelus commented Nov 5, 2019

Hey @krupenja. The issue seems to stem from Ligaturizer. Does this version without ligatures work for you?

@IgorKrupenja
Copy link
Author

No, sorry, the problem persists even with the version without ligatures from your comment.

@prashaantt
Copy link

prashaantt commented Mar 7, 2020

Reporting in with the same issues.

Liga Monego/Monego Nerd Font:

image

Monego:

image

Notice the different kerning in erv, . and ;.

Otherwise I really dig your font. Have you been able to figure a fix for this yet @cseelus?

@cseelus
Copy link
Owner

cseelus commented Mar 9, 2020

@prashaantt Currently I'm not using Monego, so I can't test, but PRs are welcome.

@matteematt
Copy link
Collaborator

Did anyone ever find a fix for this because I just downloaded them and I am having the same issue

@matteematt
Copy link
Collaborator

Any movement on this?

@cseelus
Copy link
Owner

cseelus commented Mar 3, 2022

I've just recreated the Nerd Font version with different ligature settings, as the kerning issues are caused by Ligaturizer (see my comment above). Still not ideal, but unless the Ligaturizer kerning issue is resolved, there is not much I can do about it.

@cseelus cseelus closed this as completed Mar 3, 2022
@matteematt
Copy link
Collaborator

Hi I am going to try look into this issue myself, but I need to ask a few questions to kind of know where to start. I see in the linked comment here that the issue seems to be from using the ligatures. Am I correct in thinking that ligatures are the things where a syntax such as => gets turned into one arrow symbol? If so, why does the nerd font that doesn't have the ligatures have the issue? Or does the nerd font automatically create the ligatures?

@cseelus
Copy link
Owner

cseelus commented Mar 5, 2022

Hi @matteematt, the Nerd Font version is based on the version with the ligatures and yes, those are special characters that replace => and others.
Did you test the new version?

@matteematt
Copy link
Collaborator

@cseelus yeah unfortunately it still seems like an issue. It seems to affect hardly any of the symbols but unfortunately with it affecting the . symbol which is used loads in programming it makes it look very strange
I don't know anything about fonts, ligatures, and kerning. So going to have to learn about it and see if I can come up with anything. Will be unlikely but I really like the font so I think it is worth a go

@cseelus
Copy link
Owner

cseelus commented Mar 5, 2022

I'm on macOS and the dot seems to be looking good now:
Screen Shot 2022-03-05 at 21 58 08

Here are some other programming fonts, for comparision:

Screen Shot 2022-03-05 at 21 57 12 Menlo (macOS monospace font that followed after Monaco)

Screen Shot 2022-03-05 at 21 56 48 PT Mono

Still, the letter-spacing/kerning isn't optimal, so if you manage to improve upon the current state with Ligaturizer and Nerd Fonts, I'd be more than happy to merge it.

@matteematt
Copy link
Collaborator

I haven't checked MacOS (can check tomorrow once I use my work laptop). This is the issue I am seeing on my PC though (Arch Linux + Alacritty)
before_1
before_2
You can really notice the issue with the placeholder symbols I am using to represent spaces in the yaml files, but you can also see in the Haskell file that the dot on line 29 is very obviously mismatched (same with the # and some other symbols).

I have made some progress and I have tested it on machine and it looks good to me. Here are the same two examples.

after_1
after_2

I was going to make a draft PR so you could check them on your machine (or so I could check them on my Mac) but it seems I don't have rights to push to this repo. Is that something you need to allow, or do I need to make a PR another way? Sorry I haven't really contributed to any public repos before

@matteematt
Copy link
Collaborator

Another issue I would like to fix too is the font underlining. Here is a font with underlining that you can see goes underneath the text
image
But the underlining seems to intersect with the text in this font slightly
image

@matteematt
Copy link
Collaborator

Fixed that too I think
image

@cseelus
Copy link
Owner

cseelus commented Mar 6, 2022

@matteematt, seems you made great progress improving the font. I’ll check it out when I’m back in my computer.

To make a PR in a public Github repo, you have to follow these steps: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

@cseelus cseelus reopened this Mar 6, 2022
@cseelus
Copy link
Owner

cseelus commented Mar 6, 2022

@matteematt I‘ve added you as a collaborator, so you should be able to open a PR here directly.

@matteematt
Copy link
Collaborator

@cseelus I have created a PR with the fixed nerd font. Feel free to test it out and let me know any issues. I have now tested on MacOS too and it seems to work fine. However, I have noticed the ligature symbols themselves are still not fixed - more info on the PR. I personally don't use ligatures though

@cseelus cseelus closed this as completed in #4 Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants