cseelus / monego

The beloved Monaco monospaced font, recreated with a bold and italic variant. Finally.
399 stars 36 forks source link

Wrong spacing before punctuation characters in Nerd Font version #3

Closed IgorKrupenja closed 2 years ago

IgorKrupenja commented 4 years ago
  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 commented 4 years ago

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

IgorKrupenja commented 4 years ago

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

prashaantt commented 4 years ago

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 commented 4 years ago

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

matteematt commented 3 years ago

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

matteematt commented 2 years ago

Any movement on this?

cseelus commented 2 years ago

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.

matteematt commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Fixed that too I think image

cseelus commented 2 years ago

@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 commented 2 years ago

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

matteematt commented 2 years ago

@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