Socket
Book a DemoInstallSign in
Socket

fontjs

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fontjs

FontJS (Font.js) is a packages for TrueType font parsing and manipulation

3.0.1
latest
Source
npmnpm
Version published
Weekly downloads
20
100%
Maintainers
2
Weekly downloads
 
Created
Source

Font.js (FontJS)

Node.js CI Coverage Status npm version

Font.js (FontJS) is library helping parse/encode and manipulate TrueType font files. In a future there is a plan to extend support to OpenType fonts as well.

Example

import * as fontjs from "fontjs";
import { SeqStream, ByteStream } from "bytestreamjs";

async function fontTest()
{
	const fontFetchResult = await fetch("./fonts/times.ttf");
	const fontFetchBuffer = await fontFetchResult.arrayBuffer();

	const font = fontjs.Font.fromStream(new SeqStream({ stream: new ByteStream({ buffer: fontFetchBuffer }) }));

	const fontStream = new SeqStream();

	const toStreamResult = font.toStream(fontStream);
}

Keywords

TrueType

FAQs

Package last updated on 30 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.