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

It seems that fontWeight is not being taken into account #146

Open
lucaspetes opened this issue Feb 28, 2021 · 1 comment
Open

It seems that fontWeight is not being taken into account #146

lucaspetes opened this issue Feb 28, 2021 · 1 comment

Comments

@lucaspetes
Copy link

Hey,

In addition to the color variables (#141 ), I'm having some trouble exporting text styles, more specifically fontWeight.
I couldn't make something like this work:

sketch.addTextStyle({
        name: test ,
        textStyle: {
          fontName: "IBM Plex Sans" ,
          fontWeight: 9,
          fontSize:  15 ,
          lineHeight: 24
        },

I noticed from Sketch's API that a value between 0 and 12 would be expected, but even converting "700" to "9" also didn't work.

Context
I have been trying to combine style-dictionary with sketch-constructor for a design system.
I'm making my main Sketch library (with all the components) to read Layer and Text styles from this file generated from the tokens.
This will be very helpful because I have a multi-brand/single-platform (themes) token setup.

@randombitsUK
Copy link

I had to specify the font name to be the bold version if that help? i.e. try IBMPlexSans-Bold

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