Compare commits

...

2 Commits

Author SHA1 Message Date
Aaron Pham
2a1e58ebda
Merge 3e9be39851b26f966ea26d92050d4ac68e24728d into 4e4930ef9c2e2ddb9bcb1436660d3a3002c19844 2025-01-24 05:56:37 +02:00
Aaron Pham
3e9be39851
fix(og): make sure to replace space in fonts with +
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
2025-01-17 07:52:03 -05:00

View File

@ -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()