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.6k stars 3.59k forks source link

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

Closed LeoniePhiline closed 7 months ago

LeoniePhiline commented 11 months ago

🗹 Requirements

🎯 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

★ 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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

Shure, let it open.

To examine font files

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 commented 10 months ago

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 commented 10 months ago

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 commented 9 months ago

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

Finii commented 9 months ago

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 commented 9 months ago

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

https://github.com/mishamyrt/Lilex/pull/13

Finii commented 9 months ago

Implemented a check for weight inconsistencies.

There are quite some more, but Lilex was the worst: https://github.com/ryanoasis/nerd-fonts/pull/1358#issuecomment-1736605509

Thanks again for the thorough analysis here!

Finii commented 9 months ago

@allcontributors please add @LeoniePhiline for bug

allcontributors[bot] commented 9 months ago

@Finii

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

github-actions[bot] commented 1 month ago

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.