Tokens Studio for Figma
  • Getting Started
    • Tokens Studio Plugin for Figma
    • Install the Figma Plugin
    • Pro Licence for the Figma Plugin
    • Join the Slack Community
    • Feature Requests - Featurebase
    • Changelog - Featurebase
  • Design Token Fundamentals
    • Intro to Design Tokens
      • Token Anatomy - Type
      • Token Anatomy - Value
      • Token Anatomy - Description
      • Token Anatomy - Name
  • Token Management
    • Token Types
      • Asset
      • Boolean
      • Border - Composite
      • Box Shadow - Composite
      • Color
        • Modified Colors (pro)
        • Gradient Colors
      • Dimension
        • Border Radius
        • Border Width
        • Sizing
        • Spacing
      • Number
      • Opacity
      • Other
      • Text (string)
      • Typography - Composite
        • Font Family
        • Font Weight
        • Font Fallbacks
        • Font Size
        • Line Height
        • Letter Spacing
        • Paragraph Indent
        • Paragraph Spacing
        • Text Case
        • Text Decoration
      • Composition (legacy)
    • Token Values
      • Token Values with References
      • Using Math in Token Values
    • Token Names
      • Token Name Technical Specs
      • Token Groups
      • Edit Token Names
    • Token Description
    • Token Sets
      • JSON View
  • Themes management
    • Themes (pro)
    • Themes that switch
  • Working in Figma
    • Variables and Tokens Studio
    • Styles and Tokens Studio
    • Export to Figma Guide
      • Export Options
      • Export Using Themes (pro)
      • Export Using Token Sets
      • Variables Skipped on Export
      • Styles with Variable References
    • Import from Figma Guide
      • Import Styles from Figma
      • Import Variables from Figma
        • Connect Themes to Imported Variables
        • Imported Variable Types and Token Types
    • Non-local Variables and Styles (pro)
    • Remove Tokens from Figma elements
    • Dev Mode in Figma
  • Settings Management
    • Plugin Settings
    • Base Font Size Setting
    • Token Format - W3C DTCG vs Legacy
  • Token Storage and Sync Integrations
    • Local Document - Figma File Token Storage
      • Figma Data Limits
    • Remote Token Storage Integrations
      • GitHub - Git Sync Provider
      • GitLab - Git Sync Provider
      • Bitbucket - Git Sync Provider
      • Azure DevOps - Git Sync Provider
      • JSONBin - Cloud Sync Provider
      • Supernova - Cloud Sync Provider
      • Tokens Studio Platform - Cloud Sync Provider
      • URL - Server Sync Provider
      • Generic Versioned Storage - Server Sync Provider
    • Multi-file Sync to Remote Storage (pro)
    • Manage Sync Providers
      • Edit Sync Provider
      • Change Active Sync Provider
      • Remove Sync Provider
    • Sync Changes to Remote Storage - Push and Pull
    • Branch Switching (pro) - Version Control
  • Inspect and Debug Tokens
    • Inspect Tokens
    • Remap Tokens
  • Transform Tokens for Development
    • Style Dictionary + SD Transforms
    • Official docs for Style Dictionary
  • Style Dictionary Playground
  • Troubleshooting
    • Reset Tokens from Dev Console
    • Tokens Studio Status
  • Open Source
    • Contribute
    • Shared Plugin Data
Powered by GitBook
On this page
  • Font Weight - Token Type
  • Design decisions
  • Possible values
  • Values that reference another Token
  • W3C DTCG Token Format
  • Transforming Tokens
  • Resources

Was this helpful?

Edit on GitHub
Export as PDF
PreviousFont FamilyNextFont Fallbacks

Last updated 4 months ago

Was this helpful?

Font Weight - Token Type

Font Weight Tokens define the thickness and styling of the characters related to the Font Family as an individual property to be composed within a . It is not intended to be applied to text elements directly.


Design decisions

Font Weight defines the thickness of each character/glyph in the Font Family. Font Weight design decisions are typically used to communicate visual hierarchy or emphasize text elements.

  • bold

  • bold-italic

  • bold-wide

  • bold-wide-italic


Possible values

The value of a Font Weight Token must be identical to the text string value for Font weight (plus styling) in the Figma design panel due to limitations from Figma (plugin API).

When writing your Font Weight Token values, pay close attention to:

  • Spelling

  • Spacing

  • Punctuation

  • Use of capital letters

Hard-coded values

To ensure your Font Weight Token values are an exact match to what Figma has, you can:

  • Carefully type it out, paying attention to the syntax in Figma.

  • Save your Font Family and Font Weight pairs as text styles in Figma, then import them into the plugin to see how they appear.

  • Select the value from the Tokens Studio menu (works for Typography composite Tokens only), pictured below.

Numeric weights

Text Styles in Figma don't accept a numeric value for Font Weight, only a string value.

Text Variables in Figma has limited support for numeric values for Font Weights.

You can enter any of these numeric raw values in the table below into the Font Weight Token, and the plugin will convert them to the corresponding resolved value for the Font Family Token they are paired with.

  • Keep in mind that your chosen Font Families may not support all Font Weights.

  • If you enter an incompatible value with your Font Family, the plugin will send an error message when you try to apply the Token or Export as Styles in Figma.

Raw Numeric Value
Resolved Value

100

Thin Hairline

200

Extra Light ExtraLight Ultra Light UltraLight extraleicht

300

Light leicht

400

Regular Normal buch

500

Medium kraeftig kräftig

600

Semibold SemiBold Semi Bold DemiBold Demi Bold halbfett

700

Bold dreiviertelfett

800

ExtraBold Extra Bold UltraBold Ultra Bold fett

900

Black Heavy extrafett

950

Extra Black Ultra Black

If your system uses italics or other styling properties that Figma has combined into its Font Family and Font Weight pairing, we suggest using the text string value instead of the numeric value.

Recall that Figma combines the thickness of letters with other text styling properties, like the slant or posture of the glyphs/characters, to create their unique Font Weight property.

This is written differently depending on the Font Family.

For example, 600 from the chart above and italic style would appear in Figma's Font Weight property as

  • Inter = Semi Bold Italic

  • Source Sans Pro = SemiBold Italic

  • SF Pro = Semibold Italic

This doesn't match the way font weights, font families, and their styles typically work in code. It also means that if you use the numeric value, the plug-in cannot communicate any additional styling properties (like italics) that Figma combines.

Converting from numeric to string values

If you are converting your Tokens between numeric and string values and you've already exported to Figma as a Style with Variable References, you may need to delete the Variable from the Figma collection.

Figma doesn't allow the changing of a Variable type, so by deleting that single Variable in Figma, when you export the Typography Token as a Style with Variable References, the Plugin will create the variable with the new Token Type.

Values that reference another Token

When trying to reference another Token as the Value for a Font Weight Token, you will see Tokens in the dropdown list that are:

  • Living in Token Sets that are currently active.

    • In the left menu on the plugin's Tokens page, a checkmark is visible next to the Token Set name.

  • Token Type is compatible:

    • The same = fontWeights

    • number

    • dimension


W3C DTCG Token Format

"The weight of the typography. The value of this property MUST be a valid font weight or a reference to a font weight token." - 9.7. Typography

Tokens Studio has approached Font Weight Token differently than how they are defined in the current spec to support the unique way that Figma combines the Font Weight and additional styling properties.

When you use Style Dictionary as a part of your design-to-code pipeline, these text string values will be transformed into numeric values which align with the W3C specification and how these properties work in CSS.

Token Type syntax

In Tokens Studio, the Font Weight Token has a unique syntax in code which identifies if the token is:

  • An independent property Token

  • Part of a Typography Composite Token

Looking at the JSON format, the "type" is written in plural "fontWeights" when the Font Weight Token is defined as an independent property Token.

This example shows a Font Weight property Token named font-weight-default with its value as a text string "bold" (see line 2).

  "font-weight-default": {
   "value": "Bold",
   "type": "fontWeights"
 }

This is in contrast to the Typography Composite Token, which has the property "type" written in the singular "fontWeight".

This example shows a Typography Composite Token with the Font Weight property Token named font-weight-default referenced as the value (see line 5).

{
  "paragraph-3": {
 "value": {
   "fontFamily": "{font-family-sans}",
   "fontWeight": "{font-weight-default}",
   "lineHeight": "{line-height-classic}",
   "fontSize": "{font-size-small}",
   "letterSpacing": "{letter-spacing-tight}",
   "paragraphSpacing": "{paragraphSpacing.none}"
   "paragraphIndent": "{paragraphIndent.none}"
   "textCase": "{textCase.none}",
   "textDecoration": "{textDecoration.none}"
 },
 "type": "typography"
  }
}

Transforming Tokens

When transforming Font Weight Tokens, there are specific configurations to be aware of.

Recall that Figma combines the fontStyle and fontWeight properties into a single text string value. If this is true within your tokens, you'll want to look into the optional transform to add a separate fontStyle token to be included in the CSS shorthand.

The preprocessor in the SD-Transforms package will automatically convert the Tokens Studio specific Token Type of fontWeights to align with the DTCG Format Token Type of fontWeight.

Font Weight Token entered as a text string that needs to be converted to its numeric value so it matches CSS.

Font Weight as a part of Typography Composite Tokens require the SD-Transforms option to expand composite Tokens into multiple Tokens.

Make sure you look at the generic SD-Transforms package to include this option, which allows you to further customize this transformation further using Style Dictionary.

"object, object"

When you transform your Typography Tokens, and they show "object, object" it means your SD-Transforms configuration needs to be adjusted to include "expand".


Resources

Mentioned in this doc:

  • Style Dictionary - https://styledictionary.com/

Figma resources:

CSS resources:

Community resources:

Known issues and bugs

  • None yet

Requests, roadmap and changelog

  • None

In this property is called font-weight.

Font Weight in is written differently for each Font Family. It also combines the font-style property. So, for one Font Family, you might see several Font Weights:

In , font-style and font-weight are defined as independent properties.

To work around this limitation, we've into the plug-in, which allows the value of a Font Weight Token to be written in its numerical value, like 400 or 700, and the plugin translates it into a text string that Figma recognizes.

Font Weight is an official Token Type in the in the W3C Design Token Community Group specifications.()

It is mentioned as a required part of a

→

→

→

→

SD-Transforms -

Design Tokens Community Group -

Design Tokens Community Group -

Design Tokens Community Group -

Design in Figma -

MDN Web Docs -

MDN Web Docs -

Font Weight + Font Family Pairs explained by

Import Typography Styles from Figma into Tokens Studio -

Tokens Studio Plugin GitHub -

CSS
Figma
CSS
written a conversion
8.4 Font weight
typography token
SD-Transforms Read-Me Doc, alwaysAddFontStyle
SD-Transforms Read-Me Doc, Using the preprocessor
SD-Transforms Read-Me Doc, Font Weight
SD-Transforms Read-Me Doc, Generic - expand composite Tokens
Read Me
W3C Draft
9.7 Typography
8.4 Font Weight
Explore Text Properties, Font Weight
font-weight
font-style
Sam I am Designs
It took me 2 years to figure out that Typography in Figma is not how text properties work in code.
Video Tutorial by Sam I am Designs
Open issues for Token Type Font Weight
Typography Token

💡 Something to share?

💌 Visit to contribute or subscribe to updates.

🐞 If you are experiencing an issue not listed here, please reach out to us on the Troubleshooting channel of our , , or send us an email support@tokens.studio

Submit it here!
community Slack
submit it on our feedback tool
→ Jump to the Typography Token guide for more details.
https://feedback.tokens.studio/
Page cover image
Cover

Font Weight Tokens can be attached to String or Number Variables in Figma.

Once the Font Weight Token form is open, select the value dropdown to open the menu. The Token tab shows compatible Font Weight Tokens available to reference as the value.
Once the Typography Token form is open, select the Font Weight value dropdown to open the menu. The Weights tab shows compatible Font Weights for the selected Font Familily from Figma to set as the hard-coded value.
The Typography Composite Token form is open, with each property referencing another Token. The Font Weight property is highlighted.
Creating a new Font Weight Token in the Tokens Studio Plugin for Figma.

However, like all Token Types, you can "force" a reference by manually entering the Token Name between curly brackets.

For example {token.name.here}

The value will show a broken reference until the originating Token Set is marked as enabled.

Jump to the guide on Token Values with References by selecting the card below to learn more.

Token Values with References

Font Family and Font Weight Tokens work as a pair in Figma.

Figma's unique approach to combining Font Weight and Style as a single property written as a string value requires an exact match to the Font Family it is paired with.

This means you must apply both Font Family and Font Weight Tokens at the same time to interact with Figma's text properties and see a visual change.

Engineers typically transform Tokens used in code with , which is tool-agnostic. Tokens coming from Tokens Studio require an additional step: , an npm package that prepares Tokens for Style Dictionary.

Style Dictionary
@Tokens-studio/sd-transforms