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

@chordlang/font

v0.1.1

Published

ChordFont — OpenType engraving font for jazz chord symbols (SIL OFL)

Readme

ChordFont

An OpenType font that renders properly-engraved single-line chord symbols (Cmaj7, F#m7b5, G13) from plain ASCII input, via GSUB contextual substitution. No JavaScript runtime is required — the font does the work in the shaping engine.

npm install

npm install @chordlang/font
@font-face {
  font-family: "ChordFont";
  src: url("node_modules/@chordlang/font/fonts/ChordProof.ttf") format("truetype");
}

Exports: @chordlang/font/ChordProof.ttf, @chordlang/font/NOTICE (OFL).

This is distinct from chord-diagram fonts (TabFont et al.): we compose symbols from glyph parts, not look up pre-drawn fretboard grids.

How it works

  1. Type ASCII chord text in any app that supports OpenType features (liga, calt).
  2. The shaping engine (HarfBuzz, CoreText, DirectWrite, etc.) applies GSUB rules.
  3. Ligatures and contextual substitutions transform the glyph stream into an engraved symbol.

Handwritten glyph outlines are extracted from Petaluma (SIL OFL) via a data-driven pipeline. The OpenType feature code is the asset; outlines are swappable without touching GSUB rules (see ADR-003, ADR-005).

Difficulty tiers

| Tier | Mechanism | Status | |------|-----------|--------| | EASY | Single-sequence ligature (F# → F♯) | Straightforward liga | | MAYBE / HARD | Contextual superscripting, chained multi-digit extensions, post-accidental digits | Proven in HarfBuzz — this is our scope | | WALL | 2D vertical stacking of parenthesized tensions (G7(♯11)(♭13)) | Out of scope for the font |

The wall is real: OpenType GSUB operates on a 1D glyph stream. Parenthesized tension stacks require 2D layout that a shaping engine cannot provide. For those symbols, fall back to a JS/SVG renderer (see Roadmap).

Project structure

src/build_font.py         # Font builder (imports extracted outlines + GSUB features)
tools/fetch_sources.py    # Download pinned Petaluma OTFs + OFL license
tools/extract_glyphs.py   # Extract/normalize outlines from source_map.json
glyphs/source_map.json    # Glyph name → source font/key/scale/dx/dy
glyphs/extracted_glyphs.py # Generated outline module (make extract)
tests/shape_test.py       # HarfBuzz shaping assertions — this is the spec
grammar/INPUT_GRAMMAR.md  # ASCII chord dialect (shared with any future normalizer)
DECISIONS.md              # Architecture decisions and OSS-vs-build log
NOTICE                    # Petaluma (OFL) attribution for derived outlines
dist/                     # Built .ttf output (gitignored)
sources/petaluma/         # Fetched Petaluma fonts (gitignored except OFL.txt)

Three separate concerns (Godot-style data/logic separation):

  • Glyph outlines — what each component looks like when drawn (glyphs/source_map.json + extract)
  • Feature grammar — OpenType GSUB rules that compose glyphs
  • Input-string grammar — the ASCII dialect users type (see grammar/INPUT_GRAMMAR.md)

Quick start

make setup    # create .venv and install deps (first time)
make fetch    # download pinned Petaluma sources + OFL license
make extract  # extract outlines → glyphs/extracted_glyphs.py
make build    # → dist/ChordProof.ttf
make test     # fetch + extract + build + run shaping assertions

How to play

make play     # build font, copy to playground/, serve at http://localhost:8000

Open the printed URL in a browser. Type chord strings in the large input or click the example chips (Cmaj7, Dm7b5, F#m7, G13, Bb). Toggle features off to A/B the raw glyph stream against the shaped result (composed symbol with liga + calt on).

Glyphs are handwritten outlines derived from Petaluma (OFL). To nudge alignment, edit per-glyph scale, dx, and dy in glyphs/source_map.json, then make build && make play.

Shaping test cases (current scope)

| Input | Expected glyph stream | |-------|----------------------| | Cmaj7 | C maj.tri d7.sup | | Dm7b5 | D m d7.sup flat.alt d5.sup | | F#m7 | F sharp.root m d7.sup | | G13 | G d1.sup d3.sup | | Bb | B flat.root |

Every new feature must land with a passing assertion in tests/shape_test.py. CI fails on any mismatch.

Roadmap

Product vision (not built yet):

  • ChordFont — sellable engraved symbol font (TabFont-style ~$45 license model; requires redrawing outlines — see ADR-005)
  • Playground web component — type → live engraved symbol, copy-to-SVG, transpose, Nashville-number toggle
  • JS normalizer — maps real-world ASCII variants to the font's input dialect (see grammar/INPUT_GRAMMAR.md)
  • SVG fallback renderer — for WALL-tier symbols with parenthesized tension stacks

Attribution / License

Glyph outlines in the proof font are derived from Petaluma (Steinberg Media Technologies GmbH), licensed under the SIL Open Font License 1.1. See NOTICE and ADR-005 for the OFL fork decision and reserved-name constraints.

Project license: TBD (font derivative must remain OFL-compatible while Petaluma outlines are in use).