Skip to content

astro-font@0.0.80

Choose a tag to compare

@rishi-raj-jain rishi-raj-jain released this 06 Apr 08:01

In astro-font@^0.0.80, the CSS font parser for fonts loading over CDN such as Google Fonts, TypeKit, etc. has improved. It's now able to map over each attribute of font-face property returned by CDN, and creates an equivalent CSS.

To create in-browser like requests, each outgoing request is appended with the 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' header. This helps obtain the unicode-range which optimizes the in-browser font downloading as if the page doesn't use any character in that range, the font is not downloaded at all.