Skip to content

perf: bundle OG image font instead of fetching from Google on cold start #120

@rohilsurana

Description

@rohilsurana

Problem

src/server/routes/og.tsx fetches the Inter font from fonts.gstatic.com on every cold start. This adds latency to the first OG image request and creates an external dependency.

If the fetch fails, it falls back to an empty ArrayBuffer, rendering text with a broken/missing font.

Suggested Fix

  • Bundle a subset of Inter (Regular 400 + Bold 700) as a local woff2 file
  • Load from disk instead of network
  • Eliminates external dependency and cold-start latency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions