forked from GitHub/quartz
fix(og): make sure to replace space in fonts with +
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
7e828252bb
commit
3e9be39851
@ -36,7 +36,7 @@ async function fetchTtf(fontName: string, weight: FontWeight): Promise<ArrayBuff
|
|||||||
try {
|
try {
|
||||||
// Get css file from google fonts
|
// Get css file from google fonts
|
||||||
const cssResponse = await fetch(
|
const cssResponse = await fetch(
|
||||||
`https://fonts.googleapis.com/css2?family=${fontName}:wght@${weight}`,
|
`https://fonts.googleapis.com/css2?family=${fontName.replace(" ", "+")}:wght@${weight}`,
|
||||||
)
|
)
|
||||||
const css = await cssResponse.text()
|
const css = await cssResponse.text()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user