Skip to content

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

License

Notifications You must be signed in to change notification settings

PeculiarVentures/Font.js

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •