monaspace icon indicating copy to clipboard operation
monaspace copied to clipboard

These fonts are unusable in modern IDEs and editors.

Open zd-dalibor opened this issue 1 year ago • 48 comments

Hi, Thanks for this grate work, but this is not usable at all.

  1. It is not recognized as monospace font by modern IDEs like IntelliJ and Visual Studio. Only VS Code is working fine with these fonts.
  2. Under windows is not visible by IDEs if it is not installed for all users, most developers working in controlled environments where using admin privileges is denied and installing fonts for all users requires admin rights
  3. It is not rendering correctly in windows terminal, also it is not recognized as monospace fonts in windows terminal (for other terminal emulators I do not know)
  4. There is no Nerd Font version (I do not know if this font is possible to be patched with nerd-font patcher), so it is not usable for all variants of oh-my-... and for Neovim

zd-dalibor avatar Nov 14 '23 14:11 zd-dalibor

This seems to be a platform-specific issue, because macOS recognizes the fonts as fixed width, and they can be used in Xcode and other developer tools.

atomicbird avatar Nov 14 '23 17:11 atomicbird

They can be used with Xcode, but as mentioned in issue #23 most of the fancy font features don't work.

jbehrens94 avatar Nov 14 '23 20:11 jbehrens94

@jbehrens94 have you dug around the typography settings? I found them helpful in Monterey, where they even showed the texture healing as an option by name. Ventura, less so, but I'll post some screen shots so people know where to look after they open the Fonts dialog:

Font dialog with midline ellipsis in circle (⋯) button highlighted Menu with Typography… option highlighted Typography dialog

These work in Terminal.app. I have not checked them in XCode.app.

garthk avatar Nov 14 '23 23:11 garthk

@garthk They don't work in Xcode. You can open and change typography settings but @jbehrens94 is correct, they have no effect.

atomicbird avatar Nov 15 '23 00:11 atomicbird

I have to agree - these fonts, as-is, are nearly useless on Windows. Only those very few applications that have a convenient configuration file AND are willing to use variable-pitch fonts (iow: VS Code and very little else) can use Monaspace; everything else doesn't recognize it as a valid monospace font.

The PANOSE "Proportion" field in all the fonts is currently unset (or set to "Any", same net effect) whereas it needs to be set to "Monospace" to be visible in most editors/terminal emulators.

I'm unsure how to change this in the Monaspace build, but in FontForge at least, the setting can be found at Element->Font Info->OS/2->Panose->Proportion. I'm just not willing to manually edit 100+ files...

athompson-merlin avatar Nov 15 '23 16:11 athompson-merlin

Ah, someone beat me to it, on #17.

athompson-merlin avatar Nov 15 '23 16:11 athompson-merlin

Nerd Font automatically fixes the Panose flags on patching. The patched font seems to be working on Windows, at least it shows.

Resources:

The results on Windows are kind of mixed. While it shows in bold (i.e. monospaced) in Visual Studio it does not in Windows Terminal.

Maybe you can try things out and report.

Screenshots:

grafik Visual Studio 2022

grafik Windiows Terminal 1.18.2822

P.S.: The archive is tar.xz for good compression and gz because Github does not support xz, sorry for the incenvenience

Finii avatar Nov 16 '23 06:11 Finii

Hi @Finii

The patched font is visible in windows terminal.

In IntelliJ ligatures are missing, and it is only visible if it is installed for all users (required admin rights). I think this is because it is OTF type. ~~It will be nice if we can get TTF type version for windows, this will work for current user install~~ (This is wrong statement, I do not know why but for some reason some fonts installed only for current user under windows 10/11 are visible in IntelliJ and some fonts do not and require installation for all users - https://youtrack.jetbrains.com/issue/JBR-2567 The bug is marked as fixed).

The other font wights are missing (Extra Light, Light, Semi Light, Medium, Semi Bold...).

Also, other flavors are missing (Argon, Xenon, Radon, Krypton). This is only Neon.

image

zd-dalibor avatar Nov 16 '23 07:11 zd-dalibor

@zd-dalibor

Well, for Nerd Fonts you just need to add --ext ttf to get a ttf font out of the patcher. But the problem is the hints. Postscript fonts (.otf) have far less advanced hinting, just by 'blue zones', while Truetype fonts (.ttf) use instructions that can differ glyph by glyph. There is no way to automatically convert otf to ttf hints and it is impossible to convert ttf to otf hints at all.

So usually you need to stay in the realm that the original font manufacturer choose, because the look will be different (in small details).

As font designer I also would not want to support both, because usually the look will be different. But I would choose ttf over otf nowadays, because specifically of the hinting. Both (ttf and otf) are OpenType fonts and the other capabilities are comparable.

Some weights I did not include [1] in the Nerd Font set, because I deemed them 'not useful' for terminal use. But Medium is there:

image

If you think other weights are useful, let me know. I just want to limit the number of sub-fonts in Nerd Fonts.

Also, other flavors are missing (Argon, Xenon, Radon, Krypton). This is only Neon.

Correct. I just put one style here, as that should be sufficient to check if this threads problem (not usable in IDEs) would be fixed with the Nerd Fonts versions, because then we specifically know what needs to change in the original (this repo's) font to make them work. The Nerd Fonts patcher tells users what quirks it fixes in to-be-patched fonts to make them usable ;-)

For example, as mentioned already in a lot places, Panose:

$ fontforge font-patcher --debug 2 --dry src/unpatched-fonts/Monaspace/Krypton/MonaspaceKrypton-MediumItalic.otf --makegroups 4
Nerd Fonts Patcher v3.0.2-167 (4.7.1) (ff 20230101)
DEBUG: Naming mode 4
DEBUG: Monospace check: Panose is invalid ([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); glyph-width-mono True
INFO: Setting Panose 'Family Kind' to 'Latin Text and Display' (was 'Any')
INFO: Setting Panose 'Proportion' to 'Monospaced' (was 'Any')
INFO: Redistributing line gap of 400 (200 top and 200 bottom)
DEBUG: Extended glyphs wider bounding box than basic glyphs
DEBUG: Font has negative right side bearing in extended glyphs
DEBUG: Final font cell dimensions 1240 w x 2400 h
...

So the aim here was not to provide people with a Nerd Fonts version but to help Githubnext fix bugs.


Addendum:

You note this:

image

These ligatures (I guess you expected them there) are not active by default but are extended typographic features [2], like stylistic set (SS), that you need to activate in your IDE (I have no clue about IntelliJ). If that can not be done you can also 'burn them in' (make them default) for example with https://github.com/MuTsunTsai/fontfreeze or similar tools

[1] https://github.com/ryanoasis/nerd-fonts/pull/1405/commits/05c751441d9be98bab3ad9f9f4c49a25be496338 [2] https://github.com/githubnext/monaspace#coding-ligatures

Edit: Add missing word 'Panose' :-D Edit: Add addendum

Finii avatar Nov 16 '23 08:11 Finii

Hi @Finii thanks for the response.

For me the normal/400 weight is too thick for my taste, it will be nice that patched fonts keep all weights from original font. But this is only my opinion. Nevertheless, nerd font patcher is available to everyone, so anyone can build their own version.

zd-dalibor avatar Nov 16 '23 12:11 zd-dalibor

That means SemiLight combined with SemiBold? Or SemiLight combined with Medium?

Finii avatar Nov 16 '23 14:11 Finii

@Finii In my current setup I am combining Cascadia Code light/300 and semi-light/300 (windows terminal does not have option to select font weight for bolded text).

And only to mention, Cascadia font is installed for current user only and it is accessible from all below apps.

Windows Terminal image

Visual Studio Code image

IntelliJ IDEA image image

Visual Studio image

zd-dalibor avatar Nov 16 '23 17:11 zd-dalibor

windows terminal does not have option to select font weight for bolded text

If you self patch I can show you how you create a RIBBI font group of whatever weights you want. With renaming the weights... Thin -> Regular ThinItalic -> Italic Light -> Bold LightItalic -> BoldItalic

Finii avatar Nov 17 '23 14:11 Finii

@Finii ,

I am using docker nerd font patcher image to quickly patch all fonts in the folder:

docker run --rm -v /path/to/fonts:/in:Z -v /path/for/output:/out:Z nerdfonts/patcher [OPTIONS]

Maybe, I can use --name option to create separately Regular, Italic, Bold and Bold Italic from specific originals font I want. But, maybe I am wrong, because the font patcher always appends internal font weight to the name of patched font. But again, this will require to patch each font separately.

It will be nice if you can share some easy way for this. Some applications, especially on windows, does not understand these in the middle font weights.

zd-dalibor avatar Nov 17 '23 17:11 zd-dalibor

share some easy way for this

There is a new feature in font-patcher since this commit Make sure you have the latest docker image. The in-parens version of the patcher needs to be >= 4.7.0

  • Create additional directory for example my_dir, that will be later used for -v ..."/in
  • Rename the fonts on copying into my_dir:
    • MonaspaceNeon-Thin.otf -> MonaspaceNeon-Regular.otf
    • MonaspaceNeon-ThinItalic.otf -> MonaspaceNeon-Italic.otf
    • MonaspaceNeon-Light.otf -> MonaspaceNeon-Bold.otf
    • MonaspaceNeon-LightItalic.otf -> MonaspaceNeon-BoldItalic.otf
  • Instruct font-patcher to detect the font name/weight/style based on filename instead of internal data: Add --name filename
  • I have not tested that, but font-patcher usually 'heals' source fonts, so that now it will set all the needed flags for the patched fonts to be detected as RIBBI set.
  • Of course you can give the patched font any name, so maybe this is more reasonable: MonaspecialNeon-Regular.otf etc, so that you can distinguish it from the 'original' NF

[1] https://github.com/ryanoasis/nerd-fonts/wiki/ScriptOptions

Finii avatar Nov 17 '23 18:11 Finii

Installed the TTF flavors from release version 1.000 in Windows 11, and there are a number of immediate issues trying to use them with Terminal:

  • do not appear in the list of monospace fonts; need to enable "show all fonts" which then results in a warning
  • fonts are rendered in italics for some reason, and Terminal does not provide a way to select this (only weights)

Seems like Windows support just didn't get much attention, which is ironic.

HunterZ avatar Nov 17 '23 18:11 HunterZ

fonts are rendered in italics for some reason

I guess this is #117. Maybe try the static versions.

Finii avatar Nov 17 '23 18:11 Finii

Seems like that would sacrifice a lot of the novelty of these fonts though.

HunterZ avatar Nov 18 '23 18:11 HunterZ

@HunterZ That Monaspace is a variable font is the novelty for you? :thinking: I thought VF is the new normal :grimacing: For me the novelty is the texture healing - and as that works via calt is also possible in static fonts. Maybe misunderstanding?

Finii avatar Nov 18 '23 18:11 Finii

Whoops, GH auto closed this when I merged #125

We'll produce a new build soon and check that this (and related issues) are solved.

idan avatar Nov 30 '23 02:11 idan

Apparently the font still has this issue, it doesnt really work with gnome terminal (not detected) or any jetbrains ide (no ligatures or texture healing), when will a build be made with that fixed?

Ryuuji159 avatar Dec 18 '23 13:12 Ryuuji159

Hi, there is only two issues here for me:

  1. Applications do not detect these as a monospace fonts
  2. Jetbrains IDE detect these fonts under windows only if they are installed for all users (but this is not the case with other fonts e.g. Cascadia - you can install Cascadia for current use and Jetbrains IDEs will detect it)

All other features like ligatures, texture healing, variable width... are specific open type font standard features, which are relatively new, are only supported with small number of editors and terminals (I think under windows those features are fully supported in vscode and wizterm, but need to be explicitly enabled, e.g. for vscode "editor.fontLigatures": "'ss02' on", other application will ignore those features).

In general, those open type standard features only work for web-based rendering engines, native apps still do not support them (maybe because need to be implemented on OS level). And by me, this is disappointing because this gives advantage to electron-like instead of native applications.

zd-dalibor avatar Dec 18 '23 14:12 zd-dalibor

All other features like ligatures, texture healing, variable width... are specific open type font standard features, which are relatively new

While "texture healing" is a novel concept it uses the very old contextual alternatives calt iirc. A lot programming fonts have these since ... at least 2010 I guess. Like Fira Codes ~~arrays~~ arrows for example. calt is supported in almost all terminals if I'm not mistaken.

I believe we have found out why the font is not detected by Gnome Terminal, but the actual fixing will probably take some time. Meanwhile you could check if the Nerd Font Mono (NFM) variants in https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/Monaspace.tar.xz do work as you expect, because some issues are autocorrected there.

Maybe you can try MonaspiceNe NFM Regular or some other NFM and report back, that would help finding the underlying issue.

Why JetBrains does not show the "texture healing" is beyond me. This is technically no "advanced" feature like ligatures or variable fonts.

With this electron versus 'native', I have no clue, I work only in terminals with real native (i.e. textmode) applications :-D

Finii avatar Dec 18 '23 17:12 Finii

but need to be explicitly enabled, e.g. for vscode "editor.fontLigatures": "'ss02' on"

If you like a stylistic set (for example SS02: Special rendering of <= and >=) and your IDE does not support stylistic sets, I believe you can just "turn it on as default" in the font file with for example https://github.com/MuTsunTsai/fontfreeze.

Finii avatar Dec 18 '23 17:12 Finii

Thanks, the NFM version works on gnome terminal, but on jetbrains, it still doesnt work properly, I can't really be sure if texture healing is working, but ligatures definitely aren't image

It shouldn't be a problem with jetbrains because it works with other fonts, like Fira Code image

Ryuuji159 avatar Dec 18 '23 17:12 Ryuuji159

Thanks for reporting back!

Ligatures are indeed a problem as I pointed out in https://github.com/githubnext/monaspace/issues/132. The reason is that the ligatures here are really ligatures, while other font's ligatures are not technically ligatures but contextual alternatives. This can not be easily changed but needs a lot of manual editing. I do not know why Githubnext implemented the ligatures as ligatures, though.

But that the NFM works in principle is good, because a) Nerd Fonts' fonts work, which is my responsibility, and b) all necessary steps of change here at Monaspace are already layed out (I mentioned them in for example 132). I mentioned all I know of, which is all that Nerd Font does, which seems to be sufficient ;-)

Finii avatar Dec 18 '23 17:12 Finii

This is from your upper image...

Texture healing is active, at least in the preview on your image's right side.

To make this more obvious I copied ini from the word maximize and put it just below pme of development. Very visible the wider m next to two small i and a smaller m next to non-small p and e.

Also look at the word maximize itself in the first row, the m next to the a is smaller than the m next to the i within that one word.

So it does work (as expected ;-) Ligs are a different thing, maybe. But the technology behind texture healing is very old, but noone ever came up with this concept of texture healing (as far as I know).

Screenshot 2023-12-18 at 22 59 40

Edit: Typo

Finii avatar Dec 18 '23 22:12 Finii

I just discovered Monaspace and as many other I'm excited to give it a try but to discover that the ecosystem might not have caught up yet to use it properly. Seeing all issues open asking to help use it or people saying it doesn't work in "X", what do you think of improving the support section in the README to list the support in various terminals or other IDE so we know were it stands at a glance?

Nargonath avatar Jan 11 '24 19:01 Nargonath

Whoops, GH auto closed this when I merged #125

We'll produce a new build soon and check that this (and related issues) are solved.

Hi @idan , any ETA on the new version? Cheers. :blush:

mrclayman avatar Jan 14 '24 15:01 mrclayman

What's the status on the font being recognized as monospaced? Right now, I can't use this font with the Kitty terminal because it is an absolute requirement that the font be recognizable as monospaced.

justDeeevin avatar Jan 19 '24 04:01 justDeeevin