Self-Hosted CSS @font-face & Zero-CLS Generator

Self-hosting your open-source fonts eliminates third-party DNS lookups, guarantees privacy compliance, and prevents Cumulative Layout Shift (CLS).

Ready-to-Use Production CSS

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('DejaVu Sans');
  size-adjust: 100%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --font-primary: 'Bricolage Grotesque', 'Bricolage Grotesque Fallback', system-ui, sans-serif;
}

Why Self-Host Fonts Instead of External CDNs?

  • Faster First Contentful Paint: Reusing your existing HTTP/2 or HTTP/3 TLS connection avoids extra DNS and handshake round-trips on mobile networks.
  • Zero Privacy & GDPR Risk: No visitor IP addresses are leaked to external font CDNs.
  • Offline & Intranet Reliability: Your Windows, Linux, and mobile apps render identically even in restricted or firewalled networks.
  • Full Core Web Vitals Control: Pair font-display: swap with size-adjust and ascent-override fallback descriptors so paragraphs never jump when fonts finish loading.