Use the custom fontWeights tokens as words to combine into the names of Figma font styles
For example:
Roboto Condensed ExtraBold Italic
We can split this name into it's font properties.
Family: Roboto
Stretch: Condensed
Weight: ExtraBold
Style: Italic
Combined in Figma Tokens we would have a typography token like so:
"My Typography Preset": {
"value": {
"fontFamily": "Roboto",
"fontWeight": "Condensed ExtraBold Italic",
},
"type": "typography",
},
We can replace those words with the tokens in the font-properties.json
gist
"My Tokenised Typography Preset": {
"value": {
"fontFamily": "{fontFamily.roboto}",
"fontWeight": "{stretch.030} {weight.800} {style.italic}",
},
"type": "typography",
},
The Style Dictionary formatter example above will strip the properties out of the font weight - and add each as a property into the token output.