Skip to main content
AZ1
New Member
April 23, 2024
Question

Font Variables breaking font styles

  • April 23, 2024
  • 22 replies
  • 2598 views

I created variables for weight, font family, and sizes.

In our design library, I updated all our font styles with variables. The variables are listed below.

The problem is that sometimes, the fonts would show up as “Open Sans Condensed” instead of “Open Sans”. The only way to correct it was to break the link to the style and then reapply it. It broke many components and styles where this library was used.

I disconnected all the variables from the font styles and defined them as one would normally. I published the library again. Updated the library within the file and the font on the text was still wrong. The fix is to select the component. Reset changes and then undo.

Not sure what I did wrong or why it broke so much stuff. But, I would like to resolve it as we plan on making several different modes for different accessibility needs and this would save us a considerable amount of time.

Note: Open Sans is not installed locally. The problem occurs on Mac and PC using Chrome, Firefox, and the Figma app.

Variables:

#:Number, T:String

Weights:
#Light | 300
#Regular | 400
#Semibold | 600
#Bold | 700

Font Family:
T: Default | Open Sans

Sizes:
#H1 | 40
#H2 | 32
#H3 | 24
#H4 | 20
#H5 | 16
#Body | 14

etc…

This topic has been closed for replies.

22 replies

hcarn
New Member
July 2, 2025

I’m currently having this problem in our design system. I’ve set up a font-weight variable in the published system to 350, which is regular. When the component is imported, the text styles are attached to the correct variables, but they look thinner. When detached from the font styles it falls back to “Light”, i.e. a weight of 250. So there’s a mismatch between the attached weight variable from the design system as to what gets applied in the file when imported.

In the published file, the root file for the design system, it looks as intended. It just seems to break when importing the component.

 

Any ideas?

Omar Carreon
New Member
July 17, 2025

Hi! I had this exact same problem and after a couple days I figured out the whole mess was caused because the font in Google Fonts is called “SemiBold” and not “Semibold” like pretty much the rest of fonts. 

Since Figma couldn’t find the “Semibold” font weight for Open Sans its response was to update to the next available that in this case was Open Sans Condensed. You just need to update your font style to match this naming (maybe deleting for a moment the .ttf/.otf files from the system) and it should be fixed.

I manage a +700 components library and now I can change the font with variables.