Skip to main content

Letter spacing units should be returned through REST API

  • November 27, 2023
  • 1 reply
  • 341 views

There is inconsistency between what is shown in Figma UI and what is sent in response for Figma file (GET /v1/files/:key - https://www.figma.com/developers/api#get-files-endpoint) related to letter spacing for Typography token.

It’s possible to declare letter spacing using either pixels or percents, but in API response we always receive values in pixels. It would be really nice to know original letter spacing unit.

Here are 2 different typography with 12px and 12% letter spacing and their representation in API (GET /v1/files/:key):

As you can see, we can’t build our interface for this letter spacing unit that would match values configured in Figma UI. So, it leads to inconsistency for our users that see percent values in Figma but pixel values in our UI. Or vice versa: if we convert all pixel letter spacing to percents, then people created letter spacing in pixels would see another value in percent units.

1 reply

Celine_D
Figmate
  • Community Support
  • 3376 replies
  • November 27, 2023

Hey Yevhenii_Kuznetsov, thank you for sharing you feedback. We’ll pass along to our team for consideration!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings