In security-sensitive or privileged contexts like browser extensions, avoid directly loading fonts (or other static assets) from arbitrary remote URLs at runtime. Remote loading can break due to CORS and may create long-term reliability/security-review issues.
Do this instead:
Example (bundle locally, don’t fetch remote):
SpaceGrotesk-Bold.ttf in your extension assets.// content script / extension code
const fontUrl = chrome.runtime.getURL('fonts/SpaceGrotesk-Bold.ttf');
// then use in CSS (e.g., injected stylesheet)
const css = `@font-face { font-family: 'Space Grotesk'; src: url('${fontUrl}') format('truetype'); font-weight: 700; }`;
If a remote font is truly required, treat it as a security dependency: enforce HTTPS, validate sources, confirm CORS behavior, and ensure your CSP and extension review requirements are satisfied.