ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
52.86k stars 3.6k forks source link

font-patcher script gives MapleMono-Light regular weight #1510

Closed Roger-Roger-debug closed 4 months ago

Roger-Roger-debug commented 5 months ago

πŸ—Ή Requirements

🎯 Subject of the issue

Experienced behavior: I've used the font-patcher script to add symbols to MapleMono. This works correctly for the regular and bold / italic versions, but breaks for light. Instead of keeping its light style, it gets turned into regular.

Expected behavior: Light font stays light

Example symbols: All of them

πŸ”§ Your Setup

Got

Copyright (c) 2000-2024. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20230101
 Based on sources from 2024-01-23 16:51 UTC-ML-D-GDK3.
PythonUI_Init()
copyUIMethodsToBaseTable()
Program root: /usr
Nerd Fonts Patcher v3.1.1 (4.8.2) (ff 20230101)
DEBUG: Naming mode 1
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The glyph named periodcentered is mapped to U+2022.
  But its name indicates it should be mapped to U+00B7.
The glyph named hyphen is mapped to U+2010.
  But its name indicates it should be mapped to U+002D.
DEBUG: Monospace check: Panose says "monospaced"; glyph-width-mono True
DEBUG: Extended glyphs wider bounding box than basic glyphs
DEBUG: Final font cell dimensions 1200 w x 2600 h
Adding 185 Glyphs from Seti-UI + Custom Set
β•’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•Ÿ 100%
Adding 6 Glyphs from Heavy Angle Brackets Set
β•’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•Ÿ 100%
Adding 198 Glyphs from Devicons Set
β•’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•Ÿ 100%
Done with Patch Sets, generating font...
DEBUG: Weight approximations: OS2/PS/Name: 300/300/300 (from 300/'Light'/'Light')
DEBUG: =====> Family (ID 1)      ok       (25 <=31): MapleMono Nerd Font Light
DEBUG: =====> SubFamily (ID 2)   ok       ( 7 <=31): Regular
DEBUG: =====> Fullname (ID 4)    ok       (25 <=63): MapleMono Nerd Font Light
DEBUG: =====> PSN (ID 6)         ok       (17 <=63): MapleMonoNF-Light
DEBUG: =====> PrefFamily (ID 16) ok       (19 <=31): MapleMono Nerd Font
DEBUG: =====> PrefStyles (ID 17) ok       ( 5 <=31): Light
DEBUG: Tweaking 1/1
DEBUG: Changing lowestRecPPEM from 8 to 10
   MapleMono Nerd Font Light
   \===> 'MapleMonoNerdFont-Light.otf'

As you can see, the SubFamily is Regular instead of Light.

Finii commented 4 months ago

Well, the complete name of a font is either ID1 + ID2 or ID16 + ID17.

Some applications do not know ID16/17 which is more flexible with grouping, so both is given. ID1/2 can only represent RIBBI font sets, meaning a set of 'regular - italic - bold - bolditalic'. If there are other weights they must be represented in he family.

See here

ID1/2: MapleMono Nerd Font Light Regular -> The basis font of the Maple Mono Light family

ID16/17 MapleMono Nerd Font Light -> The light style of the Maple Mono font

Everything is well and as expected. :+1:

Finii commented 4 months ago

The basis font of the Maple Mono Light family

The only other member of the Maple Mono Light family apart from Regular will be Italic. That is the Maple Mono Light Italic.

Maple Mono Light Italic and Maple Mono Light Regular (where regular means not-italic)

See, the grouping with 1/2 is a bit more to the right than expected. And you can not say Maple Mono Light <nothing>. If there is nothing there must be Regular.

Finii commented 4 months ago

https://learn.microsoft.com/en-us/typography/opentype/spec/name#name-ids

image