Files
agent-skills/skills/unocss/references/preset-web-fonts.md
Jason Woltje f5792c40be feat: Complete fleet — 94 skills across 10+ domains
Pulled ALL skills from 15 source repositories:
- anthropics/skills: 16 (docs, design, MCP, testing)
- obra/superpowers: 14 (TDD, debugging, agents, planning)
- coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth)
- better-auth/skills: 5 (auth patterns)
- vercel-labs/agent-skills: 5 (React, design, Vercel)
- antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo)
- Plus 13 individual skills from various repos

Mosaic Stack is not limited to coding — the Orchestrator and
subagents serve coding, business, design, marketing, writing,
logistics, analysis, and more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:27:42 -06:00

1.6 KiB

name, description
name description
preset-web-fonts Easy Google Fonts and other web fonts integration

Preset Web Fonts

Easily use web fonts from Google Fonts and other providers.

Installation

import { defineConfig, presetWebFonts, presetWind3 } from 'unocss'

export default defineConfig({
  presets: [
    presetWind3(),
    presetWebFonts({
      provider: 'google',
      fonts: {
        sans: 'Roboto',
        mono: 'Fira Code',
      },
    }),
  ],
})

Providers

  • google - Google Fonts (default)
  • bunny - Privacy-friendly alternative
  • fontshare - Quality fonts by ITF
  • fontsource - Self-hosted open source fonts
  • coollabs - Privacy-friendly drop-in replacement
  • none - Treat as system font

Font Configuration

fonts: {
  // Simple
  sans: 'Roboto',
  
  // Multiple (fallback)
  mono: ['Fira Code', 'Fira Mono:400,700'],
  
  // Detailed
  lato: [
    {
      name: 'Lato',
      weights: ['400', '700'],
      italic: true,
    },
    {
      name: 'sans-serif',
      provider: 'none',
    },
  ],
}

Usage

<p class="font-sans">Roboto</p>
<code class="font-mono">Fira Code</code>

Local Fonts

Self-host fonts:

import { createLocalFontProcessor } from '@unocss/preset-web-fonts/local'

presetWebFonts({
  provider: 'none',
  fonts: { sans: 'Roboto' },
  processors: createLocalFontProcessor({
    cacheDir: 'node_modules/.cache/unocss/fonts',
    fontAssetsDir: 'public/assets/fonts',
    fontServeBaseUrl: '/assets/fonts',
  })
})