`astro-font` will automatically optimize your Custom Fonts, Local Fonts, Fonts over any CDN and Google fonts for performance.
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.
Published by rishi-raj-jain 7 months ago
In astro-font@^0.0.79, there are type values introduced for the following CSS properties, allowing you to choose the values based on standard web practices in your IDE.
To keep it backward compatible, any kind of string or number value is allowed.
Published by rishi-raj-jain 7 months ago
Published by rishi-raj-jain 9 months ago
Published by rishi-raj-jain 9 months ago
verbose
to create less noise in terminalsPublished by rishi-raj-jain 9 months ago
fallbackName
per config flag to allow customizing fallback font's namePublished by rishi-raj-jain 9 months ago
pathe
for relativizing the paths to get POSIX like output for font paths (thanks to @florian-lefebvre for suggesting it & @pi0 for making pathe
)Published by rishi-raj-jain 9 months ago
pathe
instead of relying on node:path
to support all environmentsPublished by rishi-raj-jain 9 months ago
axisIndex:o,axisIndex:o
bug of the core fontkit
library (thanks to @lukasborawski for reaching out and suggesting the fix)Published by rishi-raj-jain 9 months ago
Published by rishi-raj-jain 9 months ago
github-slugger
as the package dependencyPublished by rishi-raj-jain 9 months ago
Published by rishi-raj-jain 10 months ago
cssVariable
per config optional flag to ship font-family
style in a CSS variableselector
per config optional
Published by rishi-raj-jain 10 months ago
fetch
per config flag to decide which set of fonts to be localized.astro_font
directory for caching (less things to see/learn)