-
Notifications
You must be signed in to change notification settings - Fork 239
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
Monspace 1.1: VS Code prefers semiwide extralight for some reason #205
Comments
Well, the reason can be in the naming. Lets see what is set: $ fontforge ~/git/nerd-fonts/bin/scripts/name_parser/query_name MonaspaceKrypton-SemiWideLightItalic.otf
Examining 1 font files
======== MonaspaceKrypton-SemiWideLightItalic.otf ========
SFNT Fullname ID 4 Monaspace Krypton SemiWide Light Italic
SFNT Family ID 1 Monaspace Krypton SemiWide Light
SFNT SubFamily ID 2 Italic
SFNT Pref Family ID 16 Monaspace Krypton
SFNT Pref Styles ID 17 SemiWide Light Italic
SFNT PS Name ID 6 MonaspaceKrypton-SemiWideLightItalic
SFNT Compatible ID 18 Monaspace Krypton SemiWide Light Italic
SFNT CID findfont ID 20 -
SFNT WWS Family ID 21 -
SFNT WWS SubFamily ID 22 -
PS fontname MonaspaceKrypton-SemiWideLightItalic
PS fullname Monaspace Krypton SemiWide Light Italic
PS familyname Monaspace Krypton SemiWide Light
fondname None Font grouping is done by
Some explanation is maybe in [1]. As we see above Monaspace has the Width in ID 17. That is usually not supported by application if I'm not mistaken. If they really want to support the widths axis the full WWS model should probably be used additionally. [1] https://learn.microsoft.com/en-us/typography/opentype/spec/stat#alternate-font-family-models |
Counterexample, they put the width part (
(These comments are of course no solution for the problem per se, but should be a hint for the Monaspace team) |
Some of the fonts have the wrong |
Investigating! |
Good find @kenmcd ! In fact the Nerd Font patcher complains about the font: $ fontforge font-patcher --debug 2 monaspace-v1.100/fonts/otf/MonaspaceArgon-SemiWideExtraLight.otf
Nerd Fonts Patcher v3.2.1-34 (4.14.3) (ff 20230101)
...
Done with Patch Sets, generating font...
WARNING: Possible problem with the weight metadata detected, check with --debug
DEBUG: Weight approximations: OS2/PS/Name: 400/400/200 (from 400/'Regular'/'ExtraLight')
... (It was already the case with v1.000.) Note that not only the OS2 weight is wrong, but also the PS weight, which all three should match somehow. Not that there are fixed rules how they all interact (*), but certainly you should not have the same weights for different weights ;-D (*) There are some general agreements which number ranges match which weight names, but that is not fix and differs from font foundry to font foundry What I commented on yesterday ... this is just my opinion.
('Face' is probably used wrongly here, but it is clear what is meant.) I usually prefer to have only all the weights on one selectable font family (group), and have the different widths (or whatever other axis there are) as different families, but as you see that varies. Some (When I say "PS weight" I mean the weight name in the CFF table, see above) Edit: Show version 1.100 in ttx instead of 1.000 😬 |
No comment ;-) NAME table copyright (SFNT) has been set but not "PS" copyright. Hmm, and while I look there, was the goal not to have isFixedPitch set? |
Should be fixed in e6f6278! Thank you for the report 🥰 |
@idan This does not appear to be fixed for me. I'm using 1.101 and when I set VSCode's fontWeight to 300, the text is suddenly very wide. |
@floriancargoet This is inline with an unexpected behavior that @idan and I noted recently, not entirely sure what is causing it but we're investigating. It seems to have something to do with VSCode being unsure of which 300 weight font to use, from the family (which width, in other words). |
Thank you for these details. Is there an issue I could subscribe to? |
@floriancargoet Also, can you please use the Monaspace private use unicode glyph () into your editor, to confirm you're seeing the correct fonts, and not a caching issue? |
It displays v1.101. |
I don't think you should use a weight setting with the static fonts. Or set the Font Family to the name of the variable font, Not sure how that affects the Bold and Italic text. |
There's a lot I don't understand in your comment (I know very little about the technical details of fonts) but I've set the VSCode font to 'Monaspace Neon Light', with the default weight and it displays correctly. Thanks. |
After looking at this a bit more it appears VSCode does need a standard Regular/Italic/Bold/BoldItalic font family to work as expected. The same thing happened with another font family, but with Notepad++. So be aware and note if you see fake bold or fake italic. |
I suppose an easy fix would be to remove the extrawide and semilight variants of the fonts, but…
This is what fonts look like on my laptop running Sonoma, in the latest version of VS Code:
And this is what I get on my desktop, with all the old versions of Monaspace removed and the new ones copied from the
otf
folder in 1.1:Is there an obvious fix to this, other than by taking out the wider and thinner font variants? VS Code only seems to give me a way to control weight (
editor.fontWeight
), not the condensed/expanded axis.The text was updated successfully, but these errors were encountered: