yuanqing / create-figma-plugin

:battery: The comprehensive toolkit for developing plugins and widgets for Figma and FigJam
https://yuanqing.github.io/create-figma-plugin/
MIT License
902 stars 85 forks source link

Stop importing `Inter` font from googleapis #188

Closed gluck closed 9 months ago

gluck commented 10 months ago

Hi,

default css injected by create-figma-plugin-ui base.css will import Inter font from googleapis: https://github.com/yuanqing/create-figma-plugin/blob/8f5246aa76899f081f9cf89b1a7b59a1b449fb3a/packages/ui/src/css/base.css#L1

This is unnecessary as figma already injects/defines Inter in plugin iframe: image

Since the introduction of plugin network restrictions, it also forces plugin authors to add fonts.googleapis.com (and fonts.gstatic.com) to manifest allowedDomains to avoid network errors on the font request (but even without, the text is properly rendered because the fontface is injected by figma, pointing to static.figma.com allowed hosting).

Can we remove it ?

Thanks.

yuanqing commented 10 months ago

@gluck – Thanks for raising this; TIL! Will be sure to include in the next release :+1: