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

xterm-addon-ligatures-tmp

v0.1.0-beta-2

Published

Add support for programming ligatures to xterm.js

Downloads

5

Readme

xterm-addon-ligatures

Build status

Add support for programming ligatures to xterm.js when running in environments with access to Node.js APIs (such as Electron).

Requirements

  • Node.js 8.x or higher (present in Electron 1.8.3 or higher)
  • xterm.js 3.6.0 or higher using the default canvas renderer

Usage

Install in your project by running:

npm install xterm-addon-ligatures

Then, modify the location where you initialize the terminal to enable ligature support after opening. If you enable ligatures prior to opening the terminal, they will not function properly.

Your code should look something like this:

import { Terminal } from 'xterm';
import * as ligatures from 'xterm-addon-ligatures';

Terminal.applyAddon(ligatures);

const terminal = new Terminal();
terminal.open(document.getElementById('terminal-mount'));
terminal.enableLigatures();

Importing in TypeScript

If you use TypeScript, you will need to cast the terminal variable as any when you enable ligatures because TypeScript does not know that the addon is available on the terminal object. It will look like this:

(terminal as any).enableLigatures()

Alternatively, you can import the addon directly as a function and pass the terminal as an argument:

import { Terminal } from 'xterm';
import { enableLigatures } from 'xterm-addon-ligatures';

const terminal = new Terminal();
terminal.open(document.getElementById('terminal-mount'));
enableLigatures(terminal);

How It Works

In a browser environment, font ligature information is read directly by the web browser and used to render text correctly without any intervention from the developer. As of version 3, xterm.js uses the canvas to render characters individually, resulting in a significant performance boost. However, this means that it can no longer lean on the browser to determine when to draw font ligatures.

This package locates the font file on disk for the font currently in use by the terminal and parses the ligature information out of it (via the font-ligatures package). As text is rendered in xterm.js, this package annotates it with the locations of ligatures, allowing xterm.js to render it correctly.

Since this package depends on being able to find and resolve a system font from disk, it has to have system access that isn't available in the web browser. As a result, this package is mainly useful in environments that combine browser and Node.js runtimes (such as Electron).

Fonts

This package makes use of the following fonts for testing: