Skip to content

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

@lucaspetes

Description

@lucaspetes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions