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

signetix

v2.0.0

Published

Transform text into signature images (SVG, BMP, PNG) with a hexagonal, port-driven core.

Readme

✍️ SIGNETIX

Transform text into beautiful handwritten signature images.

Signetix is a TypeScript library that converts a name or text into a signature image (SVG, BMP, or PNG) using a real handwriting font, with optional signature-style effects (slant, baseline wobble, per-letter size variation). The core is structured with hexagonal architecture (ports & adapters).


🚀 Features

  • Convert text to signature: svg, bmp, png
  • Real script font (Great Vibes, SIL OFL 1.1) embedded into every output
  • Anti-aliased raster rendering (TrueType outlines, no bitmap font)
  • Signature effects: italic, jitter, letterVariation
  • Custom font support via fontPath (TrueType/OpenType .ttf/.otf)
  • Adjustable size, color, background, letter spacing and vertical offset
  • Synchronous saveSignature() helper with automatic file extension
  • Typed API with explicit, catchable errors
  • Swappable infrastructure through ports (renderer, font engine, file writer)

📦 Installation

npm install signetix

Usage

import { textToSignature, saveSignature } from "signetix";

// In-memory buffer (default format: svg)
const svg = textToSignature("Wahyu Saputra", {
  width: 400,
  height: 150,
  fontSize: 48,
  color: "#000",
});

// Write to disk - the extension is added from the format when missing
const path = saveSignature("Wahyu Saputra", "signature", {
  format: "png",
  width: 500,
  height: 200,
  color: "#12355b",
  backgroundColor: "#ffffff",
  jitter: 6,             // baseline wobble in px
  letterVariation: 0.12, // per-letter size variation (0..1)
});

Options

| Option | Type | Default | Notes | | ----------------- | ------------------------------------- | -------------- | -------------------------------------------- | | width | number | 400 | Positive integer, px | | height | number | 150 | Positive integer, px | | fontSize | number | 48 | px for every format | | color | string | "#000000" | #RGB or #RRGGBB | | backgroundColor | string | "transparent"| #RGB, #RRGGBB, or transparent/none | | fontFamily | "cursive" \| "monospace" \| "serif" | "cursive" | SVG fallback when the embedded font is off | | fontWeight | "normal" \| "bold" | "normal" | SVG only | | format | "svg" \| "bmp" \| "png" | "svg" | | | letterSpacing | number | 0 | Extra spacing between characters, px | | offsetY | number | 0 | Vertical shift, applies to every format | | fontPath | string | bundled font | Path to a .ttf/.otf file | | embedFont | boolean | true | SVG: embed the font as base64 @font-face | | italic | boolean | true | Slant the text like handwriting | | jitter | number | 0 | Baseline wobble amplitude, px | | letterVariation | number | 0 | Per-letter size variation, 0..1 |

Errors

import {
  FontLoadError,
  InvalidColorError,
  InvalidOptionError,
  InvalidSizeError,
  UnsupportedFormatError,
} from "signetix";

All library errors extend SignetixError and expose a stable code.

Custom infrastructure (ports)

import {
  createSignetix,
  type FontPort,
  type FileWriterPort,
  type SignatureRendererPort,
} from "signetix";

const app = createSignetix({
  fontEngine: myFontEngine as FontPort,
  renderer: myRenderer as SignatureRendererPort,
  fileWriter: myFileWriter as FileWriterPort,
});

🧱 Architecture

src/
├── domain/          # models, color parsing, validation, layout noise, errors
├── ports/           # inbound (use cases) + outbound (font/renderer/file) contracts
├── application/     # CreateSignature / SaveSignature services
└── adapters/
    ├── primary/     # public API (SignatureApi)
    └── secondary/   # SVG/BMP/PNG renderers, TrueType rasterizer, font engine, fs

src/index.ts is the composition root: it wires the adapters and exports the public API. The application layer only depends on ports, so every adapter (including opentype.js) can be replaced.


🛠️ Development

npm install
npm run typecheck
npm test
npm run build
npm run demo

The signature font is inlined as base64 in src/adapters/secondary/font/signature.font.base64.ts; regenerate it with:

npm run font:embed

The font is a subset of Great Vibes (SIL Open Font License 1.1), kept in assets/signetix-signature.ttf.