New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fastfont

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastfont

Serve Google Fonts locally and use within TailwindCSS with ease!

latest
npmnpm
Version
0.0.4
Version published
Maintainers
0
Created
Source

fastfont 🎨

Download Google Fonts locally and configure them with TailwindCSS in one command. Entirely made by AI. React me at palazski@gmail.com

Features

  • 📦 Downloads font files locally with optimal directory structure
  • 🔄 Supports variable fonts and all variants (weights, styles)
  • 🌐 Preserves language subsets (latin, cyrillic, etc.)
  • ⚡ Automatically configures TailwindCSS
  • 🎯 Project-aware (detects Next.js, Vite, Vue, etc.)
  • 💪 Handles complex font configurations

Directory Structure

For a font named "Inter", fastfont will create:

fonts/
└── inter/
    ├── inter.css           # Font-specific CSS file
    └── inter/             # Font files directory
        ├── Inter-latin.woff2
        ├── Inter-cyrillic.woff2
        └── ...other variants

Project Detection

Automatically detects your project type and uses appropriate paths:

  • Next.js: public/fonts
  • React/Vite: public/fonts
  • Vue: public/fonts
  • Angular: src/assets/fonts
  • Generic: fonts

After Installation

Add the generated CSS import to your main CSS file:

import url("public/fonts/inter/inter.css");

Use the font in your HTML/JSX:

<div class="font-inter">Hello World!</div>

License

MIT

Keywords

fonts

FAQs

Package last updated on 06 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts