Do you know if theres any way of getting that information? I mean, when I open font selection, there is a filter of google fonts, installed by you etc.
What is available in the Figma UI does not mean that it will be available through the API. So—no, Figma does not have any public APIs that provide information about font sources or selectors in the font picker. But I can suggest you the following way: create your own list of fonts based on available fonts (listAvailableFontsAsync()), and compare it with this list of available fonts when necessary.
To prevent custom and shared fonts from appearing in the list of available fonts, you need to stop or delete Figma Agent (if you have it installed and running), and call figma.listAvailableFontsAsync() directly in a file that does not belong to the organization (not located in the organization's workspace). And the best way to do this is in the browser console. This way, your list will contain only Google Fonts.
The disadvantages of the above method are obvious:
- Creating your own list of fonts;
- Periodic updating of this list;
- Inability to determine the source (system, custom or shared fonts).
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank