Feature request: support variable fontWeight tokens

When entering numbers for font weight tokens, it’s currently only possible to enter a number that’s already aliased to a named weight (e.g. 400/normal/regular). Trying to enter a number other than an already-aliased one causes a validation error. E.g. 333 is invalid, but 300 is not.

The DTCG Format Module spec allows any number in the [1, 1000] range as a valid value for a token of type fontWeight.

A key practical benefit of fontWeight tokens is to alias ‘magic’ numbers of a variable weight axis to more memorable aliases, e.g. font.weight.default: 420 font.weight.thicc: 744. Given that the standard 100–step values (up too 900) are already well-aliased in most tools and languages, it almost feels pointless to set weight tokens in Penpot.

This is still by far the best, most complete token feature in a design tool right now (as you can tell from the niche request) and I’d love to see it be just a little better aligned to the DTCG format module!

4 Likes

I don’t think this is a niche request for typography lovers!

We’d need variable font support first. (User story here if anyone wants to add their use cases! It’s on the roadmap!) Right now, you can use variable fonts from Google fonts or upload variable fonts, but only use them at the predefined weights and styles.

Such a great point.

1 Like