3.0.1 • Published 2 years ago

fontjs v3.0.1

Weekly downloads
5
License
BSD-3-Clause
Repository
github
Last release
2 years ago

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);
}

Related

3.0.1

2 years ago

2.2.0-beta.4

3 years ago

2.2.0-beta.5

3 years ago

2.2.0-beta.3

3 years ago

2.2.0-beta.2

3 years ago

2.2.0-beta.1

3 years ago

2.2.0-beta.0

3 years ago

2.1.0-beta.0

3 years ago

2.1.0

3 years ago

2.0.1

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago