monego icon indicating copy to clipboard operation
monego copied to clipboard

Monego-Nerd-Font not recognized as Fixed Width

Open gtintika opened this issue 3 years ago • 9 comments

Can you please correct the Nerd fonts with Fixed Width property ? It will allow the font to be available for programs which are searching only for Fixed Width fonts

Thanks in advance !

gtintika avatar Aug 21 '22 10:08 gtintika

It seems this is not possible since Nerd Fonts script from Version 2.0 upwards, since some of the included characters are double width, see https://github.com/ryanoasis/nerd-fonts/issues/270

cseelus avatar Aug 21 '22 20:08 cseelus

Thanks for the feedback...

Looks a really long issue, one question please since i'm a little bit confused :

the mentioned issue ryanoasis-nerf-fonts#270 looks solved at 2.1.0 with PR #283 Fixed monospace overlapping

Thanks in advance !

gtintika avatar Aug 26 '22 08:08 gtintika

At Nerd Fonts:

Main topic for this maybe https://github.com/ryanoasis/nerd-fonts/pull/764 Also relevant https://github.com/ryanoasis/nerd-fonts/issues/731

This has been going back and forth for a while :sob:

But we came up the idea to make the behavior a font-patcher switch; I guess you use that to create the NerdFonts version, and that could help you?

Finii avatar Aug 29 '22 13:08 Finii

Hmm, the font naming seems a bit ... off :grimacing:

image

If you use --complete instead of individual glyph sets the name will be more useful.

Hmm, and maybe use the (new with v2.2.0) switch --makegroups for better family naming.

Finii avatar Aug 29 '22 13:08 Finii

@cseelus Monospaced fonts re-fixed with Nerd Fonts v2.2.2

Finii avatar Sep 07 '22 07:09 Finii

Hey @gtintika, check out the font files in this pull request: https://github.com/cseelus/monego/pull/10

cseelus avatar Oct 01 '22 17:10 cseelus

Hello @cseelus ! Thank you a lot for your time and your efforts !!

I have tested at macOS Catalina both families: Monego Monego-Nerd-Font

For some reason (unknown to me) the Monego-Nerd-Font family at font book application is not appearing at "Fixed Font" collection only Monego family appears at "Fixed Fonts"

So at SecureCRT program the Monego-Nerd-Font fonts are not available for choice :

secureCRT

Thanks a lot once more.

gtintika avatar Oct 05 '22 04:10 gtintika

The problem is that the font is not monospaced:

$ showttf MonegoNerdFontRegular.otf | grep Width
Required tables: glyf and loca have been replaced by CFF => OpenType
	advanceWidthMax=3212
	 avgWidth=1526
	 underlineWidth=141
  1229 DefaultWidthX
  1626 NominalWidthX

As counterexample

$ showttf Inconsolata\ Regular\ Nerd\ Font\ Complete\ Mono.otf | grep Width
Required tables: glyf and loca have been replaced by CFF => OpenType
	advanceWidthMax=500
	 avgWidth=500
	 underlineWidth=50
  500 DefaultWidthX
  0 NominalWidthX

The pickier applications check the Max Advance Width and compare that to the 'regular' one, and that must be of course equal on monospaced fonts.

Here you see, the 'letter' advance width is 1229, but the symbols are wider (and different from each other). image

The font is (technically) proportional and not monospaced.

As for the flags, some applications look at the Panose flags, and it is not set:

image

In fact I know of no application that looks at the PFM stuff. Maybe you have more info on that for me? Anyhow, it is NOT set in the font, although the commit claims it to be set:

image

The family naming looks good (scroll to the right).

 fontforge ~/git/nerd-fonts/bin/scripts/name_parser/query_names MonegoNerdFont* 2>/dev/null
Examining 4 font files
 |Filename                                           | | Fullname                                                          | | Family                                                  | | Subfamily                      | | Typogr. Family                           | | Typogr. Subfamily
 |-------------------------------------------------- |-| ------------------------------------------------------------      |-| ------------------------------------------------------- |-| ------------------------------ |-| ---------------------------------------- |-| ----------------------------------------
 |MonegoNerdFontBoldItalic.otf                       | | Monego Nerd Font BoldItalic                                       | | Monego Nerd Font                                        | | Bold Italic                    | | Monego Nerd Font                         | |
 |MonegoNerdFontBold.otf                             | | Monego Nerd Font Bold                                             | | Monego Nerd Font                                        | | Bold                           | | Monego Nerd Font                         | |
 |MonegoNerdFontItalic.otf                           | | Monego Nerd Font Italic                                           | | Monego Nerd Font                                        | | Italic                         | | Monego Nerd Font                         | |
 |MonegoNerdFontRegular.otf                          | | Monego Nerd Font Regular                                          | | Monego Nerd Font                                        | | Regular                        | | Monego Nerd Font                         | |

Technically you do not need a Typogr. Family if it is equal to the Subfamily, but it does not interfere with anything if you set it anyhow.

(Hope you do not mind that I try to help diagnosing font issues.)

Finii avatar Oct 05 '22 05:10 Finii

Anyhow, it is NOT set in the font

Ah, PFM family is only relevant for writing .pfm files (meta info for PS fonts). It's not existing in Open Type, so it is never saved to the Monego font files.

Finii avatar Oct 05 '22 06:10 Finii