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

@morphemeris/armilla-export

v0.1.2

Published

Print export for armilla scenes (WASM): PDF documents and PNG, JPEG, and WebP images, with the chart's fonts embedded.

Readme

@morphemeris/armilla-export

Print export for armilla chart scenes: PDF documents and PNG, JPEG, and WebP images, with the chart's text embedded in real fonts. It renders the same SVG that paintSvg from @morphemeris/armilla-core draws, so every theme property reaches the file. It's Rust compiled to WASM, dual-target for Node and the browser from one API, with no system fonts, no network access, and no filesystem access beyond the package's own files.

Install

npm install @morphemeris/armilla-core @morphemeris/armilla-export

Use

import { init as initCore, layout } from '@morphemeris/armilla-core';
import { init, exportImage, exportPdf } from '@morphemeris/armilla-export';

await initCore(); // no-ops on Node; load the WASM in the browser
await init(); // the export artifact is about 1.5 MB gzipped: load it on first use

const scene = layout(chartInput, [], view, environment, { kind: 'wheel' });

const png = exportImage(scene, [], [], { format: 'png', scale: 2, dpi: 300 });
const pdf = exportPdf([scene, gridScene], [], [], { page: 'a4', title: 'Natal chart' });
// png.data / pdf.data: Uint8Array; .notes: what was substituted, e.g. a missing font
  • exportImage(scene, packs, fonts, options):

    • format: 'png' | 'jpeg' | 'webp'.
    • scale: pixels per scene unit, default 1.
    • quality: JPEG only, default 90.
    • dpi: recorded in PNG and JPEG.
  • exportPdf(scenes, packs, fonts, options?): one page per scene.

    • page: 'fit' (each page is its scene's size, the default), 'a4', 'letter', or { width, height } in points.
    • orientation: 'auto' by default, which turns each sheet to its scene; or 'portrait' / 'landscape'.
    • margin, title, author.
  • background: every file lies on the theme's paper, as the chart is designed. Pass 'transparent' or a #rrggbb[aa] color to change that.

  • packs: the glyph packs the scene was drawn with, as for paintSvg.

  • Errors throw ArmillaError from @morphemeris/armilla-core (0.7.1 or later), with code, document, and path.

  • Limits (LIMIT errors):

    • images up to 16,384 px on a side and 2²⁶ px in area, and at least 1 px;
    • PDF pages up to 14,400 pt on a side, where a fitted page is the scene plus its margins;
    • at most 1,000 pages.

    A scene must be at least 0.001 units on a side (SHAPE).

Fonts

The default theme's family, Inter, is built in. Other fonts are inputs: pass TrueType or OpenType files as fonts, and they take precedence over the built-in faces. The /fonts entry point ships a catalog of open-licensed faces and loads them on demand:

import { catalogFamilies, loadCatalogFonts } from '@morphemeris/armilla-export/fonts';

catalogFamilies; // [{ family: 'Inter', weights: [400, 600] }, { family: 'Outfit', … }, …]
const fonts = await loadCatalogFonts(['Lora']); // Uint8Array[]
exportPdf([scene], [], fonts);

When a font the scene names is missing, export renders with the next family in the stack and records the substitution in notes (font:Lora→Inter). It never fails over a font.

The catalog faces are subsets of the Google Fonts originals, under the SIL Open Font License 1.1; each family's license ships beside its faces in fonts/.

License

MIT. Font licenses are listed under Fonts.