@bug-on/m3-fonts
v1.1.3
Published
Optional self-hosted font assets for Bug On Material Design 3 Expressive
Readme
@bug-on/m3-fonts
Optional self-hosted font and icon assets for @bug-on/m3-expressive. Designed for applications requiring offline capability, privacy compliance (GDPR/air-gapped networks), or zero external CDN font dependencies.
📦 Installation
pnpm add @bug-on/m3-fonts
# or
npm install @bug-on/m3-fonts🛠️ Usage
Import the desired font stylesheets into your main CSS stylesheet (globals.css or app.css):
/* 1. Self-hosted Material Symbols Outlined icons */
@import "@bug-on/m3-fonts/material-symbols.css";
/* 2. Self-hosted typography font faces (Roboto / Outfit / Material Fonts) */
@import "@bug-on/m3-fonts/typography.css";Next.js & Modern Bundler Integration
Most modern bundlers (Next.js 16, Vite, Webpack 5, Turbopack) automatically process font file assets linked inside these CSS imports (.woff2).
// app/layout.tsx
import "@bug-on/m3-fonts/material-symbols.css";
import "@bug-on/m3-fonts/typography.css";
import "@bug-on/m3-expressive/index.css";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}💡 When to Use @bug-on/m3-fonts
- Offline Web Apps & PWA: Applications that operate without active internet access.
- Enterprise / Privacy Compliance: Strict privacy rules prohibiting external requests to Google Fonts CDNs.
- Consistent Font Rendering: Guaranteed font asset stability without risk of external CDN outages or layout shifts.
📖 Complete Documentation & References
To view live font examples and integration guides:
👉 Official Documentation & Live Demos
👉 GitHub Repository
