the-dataface / figma2html

Export Figma frames as responsive HTML and CSS
https://www.figma.com/community/plugin/1109185297790825980/figma2html
MIT License
48 stars 8 forks source link

Check if Google Fonts are present #43

Open sawyerclick opened 2 years ago

sawyerclick commented 2 years ago

We currently have includeGoogleFonts shipping true by default with a user input to turn it false. Is there a case where a file wouldn't have any Google Fonts, and would we have a way to check that? The ideal flow there would be that the Google Fonts toggle would be disabled and stuck on false

svickars commented 2 years ago

I have so far been unable to find a way to do this. Do think it would be a great add though

sawyerclick commented 2 years ago

It seems like this uses an API key or something of the sort - but something like this would get us all fonts that Google has, which we could then check local fonts against:

https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyBwIX97bVWr3-6AIUvGkcNnmFgirefZ6Sw

svickars commented 2 years ago

Great find, let me look into this!