We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 673c009 commit a4a5cedCopy full SHA for a4a5ced
1 file changed
src/utils/loadGoogleFont.ts
@@ -15,7 +15,7 @@ async function loadGoogleFont(
15
).text();
16
17
const resource = css.match(
18
- /src: url\((.+)\) format\('(opentype|truetype)'\)/
+ /src: url\((.+?)\) format\('(opentype|truetype)'\)/
19
);
20
21
if (!resource) throw new Error("Failed to download dynamic font");
@@ -26,8 +26,7 @@ async function loadGoogleFont(
26
throw new Error("Failed to download dynamic font. Status: " + res.status);
27
}
28
29
- const fonts: ArrayBuffer = await res.arrayBuffer();
30
- return fonts;
+ return res.arrayBuffer();
31
32
33
async function loadGoogleFonts(
@@ -44,7 +43,7 @@ async function loadGoogleFonts(
44
43
},
45
{
46
name: "IBM Plex Mono",
47
- font: "IBM+Plex+Mono:wght@700",
+ font: "IBM+Plex+Mono",
48
weight: 700,
49
style: "bold",
50
0 commit comments