Skip to main content

I’m developing figma plugin using ReactJS and want to get list of font families that’re installed in computer. Is there any way to get them?

Do you want to get list of font families installed on the computer or the ones that are available in Figma? These are two separate things. I’m not sure how you can get all installed on computer (try to search the web, it won’t be different in a plugin from a normal website. But getting all fonts available in Figma is easy: https://www.figma.com/plugin-docs/api/figma/#listavailablefontsasync


Thanks @Gleb for reply. I want to get list of font families installed on the computer not which are available in figma. I searched a lot in web but didn’t find any solution.


I noticed that figma is using this route for getting local system font families. http://127.0.0.1:44950/figma/font-files which is of local computer path. Can I use that one for the same?


You probably can’t get local fonts, this is not something web browsers allow you to do. That’s probably why Figma is using the Font Installer app which allows them to use this local system path to get fonts. So if Font installer is installed on the computer, you may be able to use this in the plugin, otherwise no. So your plugin would only work for a portion of users, if this idea would work at all.


Thanks @Gleb ,

Will it be good if I use this path to get fonts http://127.0.0.1:44950/figma/font-files ?


I’d say no because there are no official apis for this and it could always change without your knowledge and your plugin would stop working entirely, not only for the portion of people.


Okay Thanks.

Then I think there’s no other way to get system fonts right?


correct


Thanks @Gleb


Hi all, hi @Gleb,


I am trying to list all the fonts used in a Figma Files (or in a frame). This would be a subset of the value returned by listAvailableFontsAsync.


Would it be possible to do this without looping over every bit of every texts ?


Thanks a lot !


No, the only way is to loop through all texts. Luckily you can do that pretty quickly using findAllWithCriteria | Plugin API


Hi @Gleb , thanks a lot for your quick reply. i’ll try this.


Bests


Reply