Patsagorn Y.
2025-01-16 8cf3e3001f2cbd18da73fcc92ae5f4b76d3ecf21
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