Skip to content

Commit

Permalink
fix(google): sort resolved variants when fetching font css (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerzl authored Mar 6, 2024
1 parent daa4de0 commit 5b7d3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function getFontDetails (family: string, variants: ResolveFontFacesOptions
const weights = variableWeight
? [`${variableWeight.min}..${variableWeight.max}`]
: variants.weights.filter(weight => String(weight) in font.fonts)
const resolvedVariants = weights.flatMap(w => [...styles].map(s => `${s},${w}`))
const resolvedVariants = weights.flatMap(w => [...styles].map(s => `${s},${w}`)).sort()

let css = ''

Expand Down

0 comments on commit 5b7d3a8

Please sign in to comment.