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

Have the fonts had their monospaced flag omitted? #909

Closed
3 tasks done
redactedscribe opened this issue Sep 2, 2022 · 29 comments
Closed
3 tasks done

Have the fonts had their monospaced flag omitted? #909

redactedscribe opened this issue Sep 2, 2022 · 29 comments

Comments

@redactedscribe
Copy link

redactedscribe commented Sep 2, 2022

🗹 Requirements

  • I have searched the issues for my issue and found nothing related and/or helpful
  • I have searched the FAQ for help
  • I have searched the Wiki for help

🎯 Subject of the issue

Experienced behavior:
A program I use called Directory Opus limits the selection of selectable fonts to those that have been marked or flagged in some way as being true monospaced fonts. With the NF 2.1.0 release of 2020, the program could see the Nerd Fonts in its list, but there was a problem with them being displayed if the non- "mono" suffixed Nerd Fonts of the same name were installed too. Previously, I just uninstalled all fonts and then installed only the "mono" suffixed fonts and the problem was solved, but now with 2.2.1, it doesn't matter if the "mono" suffixed fonts are the only ones installed, Directory Opus is unable to see them. The program can see the fonts when it's not limiting the font list to true monospaced fonts, but whatever method it was using to detect the flag doesn't work for 2.2.1 as far as I can tell. I assume something has changed regarding the Nerd Fonts' monospaced flags and not Directory Opus.

🔧 Your Setup

  • Mononoki NF Mono, Liberationmono NF Mono, Hack NF Mono, and others: All cannot be seen by Directory Opus when searching for "real" monospaced fonts.
    • Full filename: Whatever the NF Scoop bucket below is fetching.
    • Source: NF Scoop bucket (example manifest).
  • Directory Opus 12.29
  • Windows 11

★ Screenshots (Optional)

Installed NF fonts according to Windows:

ApplicationFrameHost_2022-09-02_21-39-57

Fonts absent from Directory Opus' monospaced fonts list:

dopus_2022-09-02_21-38-16

The Directory Opus developers have also been notified about the issue.

Thanks.

@Finii
Copy link
Collaborator

Finii commented Sep 2, 2022

Do you by chance know if there is a test version or test periode for Opus? So that I could reproduce...

Can you check Caskaydia Cove? Because it is handled a bit differently.

Do you install all fonts? Like Nerd Fond and Nerd Font Mono and the two Windows Compat ones?

@Finii
Copy link
Collaborator

Finii commented Sep 2, 2022

Literation looks bad :-o

Is that really 2.1.1 and rebooted after update?

Sorry Im not on Windows normally, so no quick check.

@redactedscribe
Copy link
Author

Do you by chance know if there is a test version or test periode for Opus? So that I could reproduce...

60 day free evaluation: https://www.gpsoft.com.au/

Can you check Caskaydia Cove? Because it is handled a bit differently.

I will have to try this tomorrow.

Do you install all fonts? Like Nerd Fond and Nerd Font Mono and the two Windows Compat ones?

I've installed both options that the NF Scoop bucket provides, e.g. for Mononoki: Mononoki-NF-Mono.json and Mononoki-NF.json. I've tried uninstalling all NF fonts and only installing the "Mono" versions via Scoop, but that didn't do the trick (which is what worked for me last year to get Opus to see the monospaced fonts, at least, that seemed to be what I did right). I've tried numerous times, uninstalling, reinstalling, rebooting between each step, and Opus won't see them on my system, that is, specifically in its monospaced-only fonts lists.

Literation looks bad :-o Is that really 2.1.1 and rebooted after update?

I assume Literation is the same as Liberation: There is no LiteratinSans manifest so I assume it was installed via one of the LiterationMono manifests: Mono, Non-mono. Using "LiterationSans NF" as a font in VS Code does show that the font is double wide.

Fonts 2022-09-03_00-13-27

@Finii
Copy link
Collaborator

Finii commented Sep 3, 2022

Good information, will check that all out, thanks!

@jgeorge300
Copy link

I believe I'm seeing this issue on macOS with the JetBrains fonts as well. In Terminal.app, you can see a change in which fonts are listed under the "Fixed Width" filter under Profiles -> Fonts. Prior to 2.2.1, the JetBrains mono font was listed. Now it is not.

@Finii
Copy link
Collaborator

Finii commented Sep 4, 2022

I believe one problem is that the Family names are wrong after patching, at least for the Windows Compatible versions.

This is hard to read, but anyhow. Here we see just the 'JetBrainsMono Ligatures Nerd Font Regular'. This includes 4 variants, 'Nerd Font non-MonoandNerd Font MonoandWindows Compat` - you know what I mean:

image

Have a close look at the Family name. For both Windows Compatible versions (i.e. Nerd Font and Nerd Font Mono) the Family is JetBrainsMono NF. That means that both, the mono and the non-mono font are in the same Family and so the whole Family is not Monospaced anymore.

Do you see the problem also in the non-Windows-Compat fonts? @jgeorge300 on Mac I assume you do not use the Windows Compat fonts?

And still the question... is the problem als existing in CaskaydiaCove Nerd Font Mono? Because that font uses a new algorithm to set the Family names...

Edit:
Compare the naming to Caskaydia Cove, where the Nerd Font Mono has a distinct Family, also as Windows Compat:

image

@redactedscribe
Copy link
Author

Have a close look at the Family name. For both Windows Compatible versions (i.e. Nerd Font and Nerd Font Mono) the Family is JetBrainsMono NF. That means that both, the mono and the non-mono font are in the same Family and so the whole Family is not Monospaced anymore.

I think I do recall seeing two distinct fonts families (mono and non-mono) listed per NF font in the Windows Fonts settings window before the last two release, so it sounds like this could be the issue. Should the fix be relatively easy then?

@Finii
Copy link
Collaborator

Finii commented Sep 4, 2022

Another problem is that the Mono font is not strictly monospaced... (600 vs 612)

image

@redactedscribe that is all relatively easy to fix, and all solutions are already implemented as PRs.

So the Family naming would be fixed if --makegroups is added to the patching command line or font specific config file.

The monospace-iety would be fixed by #764, but that needs a lot of consideration (#900)

It would be quite helpful if you could just look Caskaydia Cove up.
I'm still without machine to test anything, and tomorrow is already completely full with day-job work :-(

@redactedscribe
Copy link
Author

redactedscribe commented Sep 4, 2022

that is all relatively easy to fix, and all solutions are already implemented as PRs.

If I've understood you correctly, the wait may be long.

It would be quite helpful if you could just look Caskaydia Cove up.

I just installed CascadiaCode-NF-Mono.json and looked at Directory Opus and those NF mono fonts are displaying in the monospaced fonts only list. Nice, I guess that new algorithm works.

dopus_2022-09-04_20-53-41

@jgeorge300
Copy link

Correct. I'm not using the Windows compat versions. I was able to upgrade the Caskaydia Cove fonts on macOS from 2.1.0 to 2.2.1 and see the same issue as I'm seeing with Jetbrains font.

@Finii
Copy link
Collaborator

Finii commented Sep 4, 2022

Thank you both.

If I've understood you correctly, the wait may be long.

Depending on my day work workload I hope for another bugfix release within September. (Of year 2022 ;-> )

@Finii
Copy link
Collaborator

Finii commented Sep 5, 2022

@redactedscribe

I just found some time to install Opus on my windows test box.

Then I installed just ONE of the Mononoki fonts:
https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Mononoki/Regular/complete/mononoki-Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf

And it shows up in Opus:

image

I guess what you suffer is the Family naming problem. Will check that.

I had the wrong item (File display vs Code editor) ... it does not show up:

image

That's something I can work with.

Interestingly Delugia shows up, and that is a font I also patch with font-patcher 🤔

@Finii Finii added the confirmed label Sep 5, 2022
@redactedscribe
Copy link
Author

Interestingly Delugia shows up, and that is a font I also patch with font-patcher 🤔

Apparently SpaceMono Nerd Font also shows up, but I didn't test this myself, and I don't know if it uses the newer algorithm or not that you mentioned.

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

Opus seems to be fixed after

which I more and more believe is the way to go (#900)

I have no Mac (well I have a mac build machine, but just ssh access so can not 'see'), someone willing to test it on mac?

image

@redactedscribe
Copy link
Author

I have no Mac (well I have a mac build machine, but just ssh access so can not 'see'), someone willing to test it on mac?

Maybe @jgeorge300 would be able to take a look.

@jgeorge300
Copy link

@Finii I can test. I normally install my fonts via Home-brew. Can you point me to the version of the fonts that I can test manually.

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

Ah great. If you can test and it is 'good' we can release a new bugfix version 2.2.2.

The patching (via CI) is running here: https://github.com/Finii/nerd-fonts/actions/runs/3000805081

I will point you to the resultant archive (which you have to manually install, all individual font files), once it finishes, which is in about 20 minutes?

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

in about 20 minutes?

I broke something :->

Edit: See 64d53b8

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

@jgeorge300 You can find the complete zip package with all font files here:
https://github.com/Finii/nerd-fonts/releases/tag/v2.2.2-RC

Or select individual single ones here:
https://github.com/Finii/nerd-fonts/tree/v2.2.2-RC/patched-fonts/JetBrainsMono

The Family naming there is not touched (i.e. probably wrong), so it could be helpful to manually select just some fonts and not install all. Of course an additional test with all fonts would also be nice.

Maybe @redactedscribe can do the same on Windows; or I can do that tomorrow.

Edit: typo and correct release link

@jgeorge300
Copy link

jgeorge300 commented Sep 6, 2022

@Finii I've manually installed the two non windows fonts from JetBrainsMono.

The macOS Font Book now shows the fonts correctly. My broken app is now able to see the font as well. Terminal.app also lists it under fixed width fonts as well.

fixedwidth

full

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

@Finii I've manually installed the two non windows fonts from...

Thank you for testing!

@redactedscribe
Copy link
Author

redactedscribe commented Sep 6, 2022

Since the previous test was for a NoLigatures on Mac, I tried "JetBrains Mono Regular Nerd Font Complete Mono Windows Compatible.ttf" from JetBrainsMono/Ligatures/Regular/complete on Windows. After installing it, it showed up in Directory Opus immediately:

jetbrainsnf

@Finii
Copy link
Collaborator

Finii commented Sep 6, 2022

Thanks to you also for testing :-)

another bugfix release within September

Looks like real soon now ;-)

@Finii Finii closed this as completed Sep 7, 2022
@sarim
Copy link

sarim commented Sep 17, 2022

Is this issue solved? I downloaded v2.2.2 but CaskaydiaCove NF Mono isn't really mono, it still renders ligatures. Windows 11. Windows Terminal. I installed the Windows Compatible files.

@Finii
Copy link
Collaborator

Finii commented Sep 18, 2022

CaskaydiaCove NF Mono isn't really mono, it still renders ligatures

It is monospaced and has ligatures. Being monospaced has something to do with the cell width for each character, not if two consecutive characters are rendered differently (in their respective) cells.

Nerd Font 'in general' does not tough ligatures; there are exceptions and misleading information about this in the documentation.

What you probably want is CaskaydiaMono NF Mono?
Or just turn ligature rendering off in your client? Most clients that know ligatures and do render them can be told to not do that.

CaskaydiaMono (from Cascadia Mono) is not prepatched for the Nerd Fonts release and you have to patch it yourself. Self patching is not very hard, if you need help with that.

(Or maybe use Delugia Mono from another project.)

@Finii
Copy link
Collaborator

Finii commented Sep 18, 2022

How to turn off ligatures in Windows Terminal (result of a quick search, I do not use it):
microsoft/terminal#759 (comment)

(I do not know if that is current information or if they implemented an easier way to disable ligatures in the meantime.)

@Finii
Copy link
Collaborator

Finii commented Sep 18, 2022

@sarim see also #520 (comment)

@sarim
Copy link

sarim commented Sep 18, 2022

Nerd Font 'in general' does not tough ligatures; there are exceptions and misleading information about this in the documentation.

Yeah, I don't know much about how fonts work, I googled "nerd font without ligatures" and got this

https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/font-info.md#ligatures

By the Nerd Font policy, the variant with the 'Mono' suffix is not supposed to have any ligatures. Use the non-Mono variants to have ligatures.

How to turn off ligatures in Windows Terminal (result of a quick search, I do not use it):

Yeah, it worked. That was the easiest solution. Thanks :)

@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 Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants