Skip to main content
Question

Get the custom font file


DonMiket

Is there a way to get the custom font file used by a layer?

14 replies

Gleb
  • Power Member
  • 4706 replies
  • February 22, 2021

The font file itself? Definitely no. Why?


DonMiket
  • Author
  • 6 replies
  • February 23, 2021

Hi Gleb.
Because I’m doing a tool which exports from Figma design. Not having the font file becomes an issue.

It the plugin API doesn’t have it, maybe the REST API has it?
Otherwise, do you have suggestion?

Thanks!


Gleb
  • Power Member
  • 4706 replies
  • February 23, 2021

What kind of export is it? Why do you need the font in it? No, REST API can’t do that either.


DonMiket
  • Author
  • 6 replies
  • February 23, 2021

Without the font file, obviously the export is not going to have all the information.

So there’s no way to get the font by code in any way? (either plugin API, REST API, etc.)

Thanks


Gleb
  • Power Member
  • 4706 replies
  • February 24, 2021

Again, what kind of export are you doing that needs the font files? None of the common export formats (png, svg, pdf) need the font files.


Merajatul_Ferdous

Any solution to this problem? I am facing the same .


Gleb
  • Power Member
  • 4706 replies
  • September 18, 2022

No, still not possible. What do you need this for? You can ask the user to upload the font file to your plugin if you or they really need it.


DonMiket
  • Author
  • 6 replies
  • September 18, 2022

Hi Gleb,

As I mentioned before, the reason I need this is because I’m working on an export functionality, and I’d like to have all the exported data, including the font.

I know some fonts are subject to licensing terms, and I’m thinking to highlight that as a foot note in my UI. A font is just a file in the end, the user can anyway copy the font file.


Chris_Wall
  • 3 replies
  • September 21, 2022

Hi Gleb,

I have a valid use case for this.

I am creating a white label web application. We connect to Figma in the release pipeline to download the client’s “theme”, which is bundled into the build. Each brand has a Figma file, which follows strict design system (of text, buttons, inputs, etc in addition to some more complex components) and we are extracting everything from spacings to font weights to component dimensions from the Figma design. Literally all styling control comes from this file.

The one thing we are not able to get from Figma is the font. This means we will have to add each new client’s fonts to our application codebase, requiring dev time and a product release, new version, etc. The intention is that our design team can produce a design system and a new client can be onboarded without the need for further work on the codebase.

TL;DR the fonts do not belong in our codebase which is a brand agnostic, white label application. I want to fetch them at build time, along with the rest of the theme.

Look forward to your response and appreciate any advice you might have!

Chris


Gleb
  • Power Member
  • 4706 replies
  • September 21, 2022

Even if Figma allowed you to fetch the fonts somehow, they would be desktop fonts which are useless on the web. So the only solution I see is to have the designer provide the link to the font somewhere or upload it manually to your server. What’s the issue with that? Not sure why you need to add the font to the codebase, you can just store it in a DB.

requiring dev time

Well, this is not the problem of Figma. You are developing your product, not Figma. 😛


Chris_Wall
  • 3 replies
  • September 21, 2022

“they would be desktop fonts which are useless on the web”

I don’t understand your point. Or you don’t understand how fonts work on web. Not sure which. Fonts can be converted.

Our designers are restricted to font sets the client specifies, often proprietary assets - or do you think we should we tell CocaCola to use Roboto?

“have the designer provide the link to the font somewhere”

A good suggestion and this is already the workaround we are implementing. But it’s another point of failure and uploading to an S3 bucket is more technical than most CX designers are comfortable with.

“upload it manually to your server”

Erm… not an option. This is a commercial grade SAAS, not a personal web page. We expect to have hundreds of existing clients consuming the application by end of next year. The solution needs to be centralised. And scalable.

I appreciate your feedback and prompt reply but my point remains: the font appears to be the only element of the design that we can’t access via the API. I expect that this is due to copyright concerns, rather than a reluctance to further develop the API. I do not see a way to download the custom fonts once uploaded in the UI, either.

Do you work for Figma, @Gleb, or are you providing blunt and sarcastic responses to this community for free? If the latter, I will open a support ticket about this, since this is obviously a dead end.

Cheers,

Chris


Gleb
  • Power Member
  • 4706 replies
  • September 21, 2022

Of course, but it’s not a legal thing to do due to how font licensing and copyright works.


I didn’t realize you were talking about fonts uploaded to Figma, which is something available only in Organization and Enterprise plans. In this case you can definitely talk to the team regarding extending the API in this direction. The previous discussion indicated that people want to get fonts which are used in the design, not uploaded to the org, which are two different things in my mind.

Of course I don’t work for Figma, it’s even said in my profile. They would never speak like this haha.


Chris_Wall
  • 3 replies
  • September 21, 2022

Both the opening post and the title of the post refer to the “custom font file” 😂

Anyway, thanks for your input. I’ll open a support ticket.


tank666
  • 4857 replies
  • September 21, 2022

By the wording “custom fonts” can be understood as “local fonts” (from the user’s OS) that are not uploaded to the Figma server, but are used in design files. And for fonts that are uploaded to an organization or organization team (that is, to the Figma server), the wording “shared fonts” is used.


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