The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: use Google Fonts API v2 to get fonts for ogp (#1705)

authored by

Akihiro Saiki and committed by
GitHub
dc3323b5 c98ef7e8

+3 -1
+3 -1
quartz/util/og.tsx
··· 35 35 async function fetchTtf(fontName: string, weight: FontWeight): Promise<ArrayBuffer> { 36 36 try { 37 37 // Get css file from google fonts 38 - const cssResponse = await fetch(`https://fonts.googleapis.com/css?family=${fontName}:${weight}`) 38 + const cssResponse = await fetch( 39 + `https://fonts.googleapis.com/css2?family=${fontName}:wght@${weight}`, 40 + ) 39 41 const css = await cssResponse.text() 40 42 41 43 // Extract .ttf url from css file