Anton Bulakh
2025-01-07 c90dbacab05d2ceab84b53c66c7be77b4dda47ef
quartz/util/og.tsx
@@ -35,7 +35,9 @@
async function fetchTtf(fontName: string, weight: FontWeight): Promise<ArrayBuffer> {
  try {
    // Get css file from google fonts
    const cssResponse = await fetch(`https://fonts.googleapis.com/css?family=${fontName}:${weight}`)
    const cssResponse = await fetch(
      `https://fonts.googleapis.com/css2?family=${fontName}:wght@${weight}`,
    )
    const css = await cssResponse.text()
    // Extract .ttf url from css file