Getting a list of the available fonts

Hello,

I am building an extension that allows the user to build some custom components that will be exported to frontend frameworks like React. I need to allow the user to select the font they want to use in the component. I am trying to find a way to get a list of all fonts available to use but I can’t find anything like that in the documentation. Is it possible to do that or not?

Thank you

According to this thread, it was planned but apparently it was never added.

It probably needs to be able to read local files, which requires the helper application.

I read the source code for the Figma plugin FontLabelJP. It finds fonts with system-font-families, and fontkit to get the name.

It may also be available in some other way, such as parsing Adobe XD’s cache.

~/Library/Application Support/Adobe/Adobe XD/CTCache/AdobeFnt_OSFonts.lst

In the case of Photoshop, the file can be accessed using the fs module. But for Adobe XD, the Windows version has strict File access permissions because it is a UWP app. It may be difficult to require the same fs as Photoshop in the future.

1 Like