Anton Bulakh
2025-01-05 b7a945e034cd34798eed8806a9e0957716e5c598
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