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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@liiift-studio/sanity-font-data-extractor

v2.0.1

Published

Font analysis utility for Sanity Studio — inspect OpenType metadata, variable font axes, and compare multiple fonts side by side

Downloads

57

Readme

sanity-font-data-extractor

Inspect OpenType metadata, variable-font axes, and font metrics directly inside Sanity Studio — drag in one or more .otf / .ttf / .woff / .woff2 files and read their internals without leaving the CMS.

npm license

A client-side React component for Sanity Studio (v3 / v4 / v5). Upload font files and the component parses them in the browser with fontkit, then surfaces the family/style/version, glyph count, metrics (units-per-em, ascent, descent, line gap), and the full parsed font object — including variable-font fvar axes and the name table — in an expandable inspector. Upload two or more fonts to compare their metrics side by side.

Privacy: font bytes never leave the browser. Files are read with FileReader and parsed client-side via fontkit; nothing is uploaded to Sanity or any server.

How it works

Install

npm install @liiift-studio/sanity-font-data-extractor

Install the peer dependencies if your Studio does not already provide them:

npm install sanity @sanity/ui @sanity/icons react fontkit

| Peer dependency | Supported range | Notes | |---|---|---| | sanity | ^3 \|\| ^4 \|\| ^5 | Sanity Studio | | @sanity/ui | ^1 \|\| ^2 \|\| ^3 | UI primitives | | @sanity/icons | ^2 \|\| ^3 | Icons | | react | ^18 \|\| ^19 | | | fontkit | ^2 | optional peer — required at runtime to parse fonts |

@devtools-ds/object-inspector (the metadata tree view) ships as a direct dependency, so you do not install it yourself.

Usage

The package's default export is the GetFontData component. Mount it anywhere in your Studio — most commonly as a custom Structure tool or a desk view:

import GetFontData from '@liiift-studio/sanity-font-data-extractor'
import { useClient } from 'sanity'
import { SearchIcon } from '@sanity/icons'

export function FontInspector() {
	const client = useClient({ apiVersion: '2024-01-01' })

	return (
		<GetFontData
			icon={SearchIcon}
			client={client}
			displayName="Font Inspector"
		/>
	)
}

Then add it to your Studio's structure, for example:

// sanity.config.js (structure tool)
S.view
	.component(FontInspector)
	.title('Font Inspector')

Props

| Prop | Type | Description | |---|---|---| | icon | React.ComponentType | Icon component rendered next to the heading (e.g. a @sanity/icons icon). | | client | SanityClient | A Sanity client instance. Accepted for forward compatibility; the current upload-and-parse flow runs entirely in the browser and does not query the client. | | displayName | string | Heading shown above the upload area. |

Features

  • Upload or drag & drop one or many .otf / .ttf / .woff / .woff2 files.
  • Summary cards — family name, style name, glyph count, version at a glance.
  • Full metadata inspector — the entire parsed fontkit object in an expandable, dark/light-aware ObjectInspector tree, including variable-font fvar axes/instances and the OpenType name table.
  • Side-by-side compare — upload 2+ fonts and switch to Compare view for a metrics table (family, style, full name, version, glyph count, units-per-em, ascent, descent, line gap), with differing values highlighted.
  • Copy metadata — copy the parsed font object as formatted JSON to the clipboard.

A live screenshot of the inspector running inside Sanity Studio is welcome — the component is an interactive upload UI and cannot be captured headlessly. Maintainers/users: a Studio screenshot or GIF would slot in above.

Requirements

  • A Sanity Studio v3, v4, or v5 project.
  • A browser environment (the component is client-side React; it is not a CLI or server utility).

Regenerating the diagram

The pipeline diagram is generated from a committed Mermaid source — no manual editing of the image:

npm run capture   # scripts/extraction-pipeline.mmd -> assets/extraction-pipeline.svg

License

MIT © Quinn Keaveney / Liiift Studio