adobe-fonts / source-code-pro

Monospaced font family for user interface and coding environments
https://adobe-fonts.github.io/source-code-pro/
SIL Open Font License 1.1
19.85k stars 1.62k forks source link

Variable font has wrong weights for Regular and Italic styles #315

Open jastko opened 1 year ago

jastko commented 1 year ago

Font version: variable 1.026R (otf/ttf) OS: Linux WM: KDE

When selecting Regular/Italic styles, they are displayed as ExtaLight/ExtraLight Italic styles, while ExtaLight/ExtraLight Italic styles are not present for selection. Picture below. There is additional style(red selection): Normal, which have regular weight. otf_ttf_variable

kenmcd commented 1 year ago

What application is being used in your image?

jastko commented 1 year ago

Konsole - KDE's Terminal Emulator

kenmcd commented 1 year ago

Konsole - KDE's Terminal Emulator

Did you install the TTF or the OTF variable fonts?

Do any other variable fonts work as expected in that application? If yes, please provide font name and version number.

jastko commented 1 year ago

First I have installed the ttf format and the described issue occurred, then i uninstalled it and installed the otf version and the same issue happened.

Cascadia Code 2111.01 works as expected.

eugenesvk commented 1 year ago

Have a similar issue on a mac Ventura in TextEdit (italic version is too light) also noticed the misnaming, font OTF from this release , Cascadia also works fine

Source Code Pro, version 2.042 (uprights), version 1.062 (italics), version 1.026 (variable)— Re-compiles all fonts so that the static instances correspond to the Variable Font versions.

kenmcd commented 1 year ago

Have a similar issue on a mac Ventura in TextEdit (italic version is too light) also noticed the misnaming, font OTF from this release , Cascadia also works fine

Are you saying that TextEdit also displays the word "Normal"? And does not display the ExtraLight instances?

Nothing is "misnamed" inside the font. In fact the word "Normal" does not exist inside the fonts. So that word is being added by the application. The question is why? Is the application for some reason confused by a perfectly valid font? Or is the way they are constructing this font not 100% valid? Or simply not 100% cross-platform friendly?

eugenesvk commented 1 year ago

Are you saying that TextEdit also displays the word "Normal"?

No, on Italic texts it displays "Italic"

And does not display the ExtraLight instances?

Yes, it only shows 12 styles total instead of 14 with the ExtraLight missing

Nothing is "misnamed" inside the font.

I saw "1.026;ADBO;SourceCodeVF-ExtraLight;ADOBE" for a Regular font, and then ExtraLight was also part of the name in each style in Mac's default Fontbook, so that's what I was referencing as misnaming

kenmcd commented 1 year ago

I saw "1.026;ADBO;SourceCodeVF-ExtraLight;ADOBE" for a Regular font, and then ExtraLight was also part of the name in each style in Mac's default Fontbook, so that's what I was referencing as misnaming

Above you said you are using the OTF variabl

eugenesvk commented 1 year ago

Above you said you are using the OTF variabl

and? SourceCodeVF is a variable OTF font

codeman38 commented 1 year ago

There's definitely something broken in the latest italic variable font. From the ttx decompilation:

    <NamedInstance flags="0x0" postscriptNameID="285" subfamilyNameID="284">
      <coord axis="wght" value="200.0"/>
    </NamedInstance>
    <NamedInstance flags="0x0" postscriptNameID="288" subfamilyNameID="2">
      <coord axis="wght" value="400.0"/>
    </NamedInstance>

And looking at those name IDs:

    <namerecord nameID="285" platformID="3" platEncID="1" langID="0x409">
      SourceCodeVF-Italic
    </namerecord>
    <namerecord nameID="288" platformID="3" platEncID="1" langID="0x409">
      SourceCodeVF-Italic
    </namerecord>

i.e., both weight 200 and weight 400 have a PostScript ID of SourceCodeVF-Italic.

Edit: This is the case for the weight 200 and weight 400 instances in both the .ttf and .otf variable fonts.