Skip to content

Commit 22c260d

Browse files
fix: uri encode break material+icons font
1 parent 6bf0b14 commit 22c260d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

example/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default defineConfig({
55
plugins: [
66
ViteFonts({
77
google: {
8-
families: ['Crimson Pro', 'Open Sans'],
8+
families: ['Crimson Pro', 'Open Sans', 'Material+Icons'],
99
},
1010
}),
1111
],

src/google-fonts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function injectFonts({
3333
if (families.length >= 0) {
3434
for (const family of families) {
3535
if (typeof family === 'string') {
36-
deferedSpecs.push(encodeURIComponent(family))
36+
deferedSpecs.push(family)
3737
continue
3838
}
3939

@@ -51,7 +51,7 @@ function injectFonts({
5151
continue
5252
}
5353

54-
let spec = encodeURIComponent(name)
54+
let spec = name
5555

5656
if (typeof styles === 'string')
5757
spec += `:${styles}`

0 commit comments

Comments
 (0)