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

Lilex fonts' "Thin" and "Bold" weights all are labeled "Normal", thus not installable next to the "Regular" weight #1333

Closed
3 tasks done
LeoniePhiline opened this issue Aug 4, 2023 · 13 comments · Fixed by #1356 or #1357
Labels
Ready ⛱ Ready to merge but waiting to be merged near a release

Comments

@LeoniePhiline
Copy link

LeoniePhiline commented Aug 4, 2023

🗹 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:

Lilex fonts' "Thin" and "Bold" weights all are labeled "Normal", thus not installable next to the "Regular" weight.

This applies to "Lilex", "Lilex Mono" and "Lilex Propo".

Expected behavior:

Each file should contain a font labelled with the according font weight. E.g. the File called "LilexNerdFont-Bold.ttf" should contain a font named "Lilex Nerd Font, Bold", not "Lilex Nerd Font, Normal".

Example symbols:

Not relevant

🔧 Your Setup

  • Which font are you using (e.g. Anonymice Powerline Nerd Font Complete.ttf)?
    • LilexNerdFont-Bold.ttf
    • LilexNerdFont-Regular.ttf
    • LilexNerdFont-Thin.ttf
    • LilexNerdFontMono-Bold.ttf
    • LilexNerdFontMono-Regular.ttf
    • LilexNerdFontMono-Thin.ttf
    • LilexNerdFontPropo-Bold.ttf
    • LilexNerdFontPropo-Regular.ttf
    • LilexNerdFontPropo-Thin.ttf
  • Where did you get the file from (download link, self patched, source downloaded from link...)
    • GitHub, Release 3.0.2 Assets section
  • Which terminal emulator are you using (e.g. iterm2, urxvt, gnome, konsole)?
    • Konsole, but that's not relevant. Installation fails.
  • Are you using OS X, Linux or Windows? And which specific version or distribution?
    • OpenSUSE Tumbleweed

★ Screenshots (Optional)

grafik
grafik

Can't install "Bold" as it has the same internal font name as "Regular", namely "Normal":

grafik

Each weight needs its own name.

@LeoniePhiline
Copy link
Author

LeoniePhiline commented Aug 4, 2023

Same problem on a different font: "Thin" is labelled "Light".

Thus, "Thin" is not installable next to the actual "Light" font weight:

grafik

This is the case for all M+1 / M+2 "Thin" font weights.

@Finii
Copy link
Collaborator

Finii commented Aug 6, 2023

Sorry to hear of your problems.

Unfortunately I can not reproduce.

Quick check on MacOS, which is normally very picky about fonts. I installed the 3 (Regular, Bold, Light) Nerd Font versions only:

Screenshot 2023-08-06 at 07 50 19

Fontbook

And looking into the naming, this looks good. Here the Bold variant, there is not even a mention of Normal:

Screenshot 2023-08-06 at 07 54 12

Fontforge

And the Thin font:

Screenshot 2023-08-06 at 07 54 32

Fontforge

You see the Thin font has two possible names, for old "just RIBBI names" applications it is Lilex Nerd Font Thin-Regular and for applications that can work with more than 4 styles it is Lilex Nerd Font-Thin (preferred names).

ID1 and ID2 ("Family" and "Styles (SubFamily)") form one name.
ID16 and ID17 ("Preferred Family" and "Preferred Styles") form another naming scheme.

I usually work with Linux, but I can not make out what (which application) Schriftenbetrachter is. From what I see in the screenshots it is strange too 😬 It tries to translate font names (transmogrifies Thin to the German Leicht).

Maybe you can try a different font manager, or install the fonts just by throwing them into ~/.local/share/fonts via command line cp. Then try if you can see the fonts in e.g. LibreOffice Writer. It is like 25 years ago that I ever used Suse, so I do not know if you need to manually trigger a font cache update after copying the font files. And Writer needs to be restarted when fonts have been installed.

Edit: Add application names below images

@LeoniePhiline
Copy link
Author

Thanks for your response!

Would it be ok to keep the issue open? I need to find time to figure out the details with the new awesome information you gave me.

Maybe it's a bug in KDE's font viewer / fonts configuration app. I'd be curious to find out more and report in their bug tracker (linking to here) if that's the case.

Do you happen to know / like to recommend a Linux app to view font detail properties like the label-pairs you've show in your screenshots?

@Finii
Copy link
Collaborator

Finii commented Aug 6, 2023

Shure, let it open.

To examine font files

  • fontforge (on Github) (used for images above) (open a font, Element -> Font Info -> TTF Names)
  • showttf or ttfdump (part of fontforge resp texlive)
  • fontTools, maybe ttx

But they all just give you some name parts, and you need a understanding how they are to be used.
Maybe this is good to read https://learn.microsoft.com/en-us/typography/opentype/spec/name (kind of reference manual) or this as a more learning centric explanation.
In boils down to know how the ID1/2, ID16/17, and ID21/22 are to be used and maybe what ID4 should be.
You can also find various discussions on the names in font forums. Important is to know that the IDs have different names attached to them in different applications, the only reliable referebne is the ID number not the "ID Name" like "Preferred Family".

Also worth to know that Nerd Fonts never sets ID21/22. It created RIBBI fonts sets in ID1/2 (of course) and the full style is only available in ID16/17. For ID1/2 the unrepresentable styles are represented via Family names instead.

RIBBI means Regular-Italic-Bold-BoldItalic. That is the "classic set" for applications that have an "Italics" and "Bold" button for the selected font. Sometimes that applications automatically generate missing styles (creates an oblique version of a font with no Italic style by slanting the glyphs, with ... mixed results).

What you maybe should examine is if the unpatched Lilex has the same problem. Its naming is about the same as the patched font, see

Screenshot 2023-08-06 at 14 14 25 Screenshot 2023-08-06 at 14 12 18

@LeoniePhiline
Copy link
Author

Hi! Thanks for all the resources!

I believe the issue is the very basic "Font Weight" value in "PS Names".

Here's some good examples (Sauce/Source Code Pro Nerd Font):

Extra Light

grafik

Regular = Book

grafik

SemiBold = Demi

grafik

Bold

grafik

Here's bad examples (Lilex)

Lilex Bold showing as Book (= Normal)

grafik

Lilex Thin showing as Book (= Normal)

grafik

Lilex Bold and Thin have an incorrect weight value of "Book", which clashes with the actual Normal/Regular/Book weight font file.

M+1 Code Thin and Extra Light both show as Light

grafik

grafik

Comparing with Source Code Pro Nerd Font Extra Light, it seems like the "PS Names" font weight ("Strichstärke") should be "Extra-Light".

Both Thin and Extra Light use "Light", which clashes with the actual "Light" weight font file.

@LeoniePhiline
Copy link
Author

LeoniePhiline commented Aug 11, 2023

You had mentioned I should investigate the original Lilex font.

I downloaded Lilex.zip from https://github.com/mishamyrt/Lilex/releases/tag/2.200 from Apr 13.

Other than in the NF version ("Book"), the original Lilex Bold font uses the correct PS font weight ("Bold"):

grafik

The same is true for the Thin weight, which contains the wrong PS font weight value ("Book") in the NF version, but the correct value in the original font ("Thin"):

grafik

--

The M+1 Code font appears to be broken upstream on Google Fonts. The files from https://fonts.google.com/specimen/M+PLUS+1+Code have the same wrong PS font weight ("Light") for the Thin and ExtraLight font files, as the Nerd Font variant does.

Maybe Lilex had been broken when NF imported it, and was fixed in the mean time?

Edit: M+1 Code ExtraLight from Google Fonts is broken, but the real upstream (according to the Google Fonts "about" page) appears to be https://github.com/coz-m/MPLUS_FONTS/blob/master/fonts/ttf/Mplus1Code-ExtraLight.ttf - which is correct:

grafik

=> Maybe old versions of Lilex and M+1 Code were broken, and the latest versions just need to be re-imported into the NerdFonts project?

@Finii
Copy link
Collaborator

Finii commented Sep 26, 2023

Thanks for the input, I will investigate (sorry for the delay)

@Finii
Copy link
Collaborator

Finii commented Sep 26, 2023

You are right, the unpatched font already has book where it should have bold:

image

We do not tough the weight, assuming it is correct in the source.

I will check most recent source fonts and update NF accordingly if that is the case.

Finii added a commit that referenced this issue Sep 26, 2023
Apart from all the usual fixes and expansion in the source font the
weight metadata has been fixed.

Fixes: #1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii mentioned this issue Sep 26, 2023
2 tasks
@Finii
Copy link
Collaborator

Finii commented Sep 26, 2023

This is not in the 2.200 release, but we do not have medium anyhow ;-D

mishamyrt/Lilex#13

Finii added a commit that referenced this issue Sep 26, 2023
They renamed
    M Plus Code Latin          -> M Plus Code Latin50
    M Plus Code Latin Expanded -> M Plus Code Latin60

The versioning is rather divers, add more information into the font
specific README file.

Fixes: #1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii mentioned this issue Sep 26, 2023
2 tasks
Finii added a commit that referenced this issue Sep 27, 2023
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue #1333 and PR #1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
@Finii
Copy link
Collaborator

Finii commented Sep 27, 2023

Implemented a check for weight inconsistencies.

There are quite some more, but Lilex was the worst:
#1358 (comment)

Thanks again for the thorough analysis here!

@Finii
Copy link
Collaborator

Finii commented Sep 27, 2023

@allcontributors please add @LeoniePhiline for bug

@allcontributors
Copy link
Contributor

@Finii

I've put up a pull request to add @LeoniePhiline! 🎉

Finii added a commit that referenced this issue Sep 27, 2023
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue #1333 and PR #1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit that referenced this issue Sep 27, 2023
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue #1333 and PR #1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
@Finii Finii added the Ready ⛱ Ready to merge but waiting to be merged near a release label Oct 2, 2023
liziqiang pushed a commit to liziqiang/nerd-fonts-forked that referenced this issue Oct 13, 2023
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue ryanoasis#1333 and PR ryanoasis#1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit that referenced this issue Nov 11, 2023
They renamed
    M Plus Code Latin          -> M Plus Code Latin50
    M Plus Code Latin Expanded -> M Plus Code Latin60

The versioning is rather divers, add more information into the font
specific README file.

Fixes: #1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
Finii added a commit that referenced this issue Nov 11, 2023
Apart from all the usual fixes and expansion in the source font the
weight metadata has been fixed.

Fixes: #1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
Windows seems to construct the font names including the PS weight.
We have some sourcefonts that are broken (i.e. have in fact different
weights but have the same PS weight and/or OS2 weight.

That raises problems with the fonts on Windows.

[how]
Check and compare all weight metadata (except CID) and issue a warning
if they differ too much. That might fail with unusual weight names,
though.

See Issue ryanoasis#1333 and PR ryanoasis#1358.

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
They renamed
    M Plus Code Latin          -> M Plus Code Latin50
    M Plus Code Latin Expanded -> M Plus Code Latin60

The versioning is rather divers, add more information into the font
specific README file.

Fixes: ryanoasis#1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
Apart from all the usual fixes and expansion in the source font the
weight metadata has been fixed.

Fixes: ryanoasis#1333

Reported-by: LeoniePhiline
Signed-off-by: Fini Jastrow <[email protected]>
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 May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ready ⛱ Ready to merge but waiting to be merged near a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants