npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@skelekit/font

v0.1.5

Published

Optimize web fonts (including Google Fonts) by subsetting, hosting them locally, and preventing layout shifts with metric-matched system font fallbacks.

Readme

@skelekit/font

Optimal fonts for static sites — zero external runtime dependencies.

@skelekit/font is a post-build tool that:

  1. Scans your static site for font references.
  2. Downloads them locally if they're external (e.g., Google Fonts).
  3. Subsets each font to only the characters actually used.
  4. Generates accurate fallback system fonts to eliminate layout shift (CLS).
  5. Outputs both WOFF and WOFF2 variants.
  6. Rewrites your CSS with optimized @font-face rules.

Built entirely with JavaScript — no Python, no native bindings, no external binaries.

Perfect for static site generators like Eleventy, Hugo, Jekyll, and more.

Installation

npm install @skelekit/font

Usage

skelekit-font --site path/to/site

For additional options:

skelekit-font --help

Command-Line Options

  • --site=path/to/site: Specify the directory containing your site files.
  • --verbose: Enable verbose logging.
  • --whitelist-chars=chars: Specify a string of characters to be included in the font subset even if they are not found in the HTML source. For example, --whitelist-chars=abc will ensure that the characters 'a', 'b', and 'c' are included in the subset.

Features

Layout Shift Prevention

Skelekit Font automatically adds a system font fallback for each web font that matches the original font's metrics. This prevents layout shifts during font loading by:

  1. Creating a fallback font-face using Arial with the same metrics as your web font
  2. Automatically applying this fallback to all font-family declarations
  3. Using CSS size-adjust and metric overrides to match the system font exactly

For example, if you have:

.title {
    font-family: "My Font";
}

It will be transformed to:

.title {
    font-family: "My Font", "My Font override";
}

@font-face {
    font-family: "My Font override";
    src: local("Arial");
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: normal;
    size-adjust: 100%;
}

This ensures text maintains the same dimensions and layout both before and after the web font loads.

Limitations

  • Only processes built, static HTML/CSS/JS — does not support dynamic font loading via JS
  • Does not currently support variable fonts (coming soon)
  • Font subsetting accuracy may be reduced if text is injected via JS
  • Only supports fonts loaded from Google, Bunny CDN, or local.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.

License

This project is licensed under the MIT License - see the LICENSE file for details.