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

Exporting to OTF font with Regular results in a weight of 500 #348

Open
matteopolak opened this issue Aug 19, 2023 · 2 comments
Open

Exporting to OTF font with Regular results in a weight of 500 #348

matteopolak opened this issue Aug 19, 2023 · 2 comments

Comments

@matteopolak
Copy link

When exporting to an OTF font using a font-style of Regular, the weight of the font is 500 (instead of 400). This is the same result as using Medium (also 500), which seems to be strange and likely unintentional?

I tried using Light to hopefully get a weight of 400, but it correctly exports as a weight of 300.

@mattlag
Copy link
Member

mattlag commented Aug 20, 2023

Thanks for the note - OpenType.js, which we use to read and write font files, has limited support for metadata. I think an immediate thing you could do as a work-around is to open your exported font in something like Font Forge that has full metadata writing support, then you'll be able to adjust any value you want.

I did confirm - OpenType.js defaults Regular to equal 500. It does look like with a bit of work I can update Glyphr Studio to pass more metadata to OpenType.js, basically enabling some additional OS2 table values, namely usWeightClass in this case.

For my reference, here's what OpenType.js supports:
image

Here are the defaults they are using:
image

@matteopolak
Copy link
Author

That seems to have worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants