0.0.6 • Published 5 years ago

jimpfont v0.0.6

Weekly downloads
18
License
Apache-2.0
Repository
github
Last release
5 years ago

A Simple module for using .ttf font on Jimp

Installation

To use JimpFONT, install GraphicsMagick.

$ npm install jimpfont

Example usage

const Jimp = require("jimp");
const JimpFONT = require("jimpfont");
const jimpFONT = new JimpFONT();

new Jimp(80, 30, async(err, image) => {
	let text = await jimpFONT.CreateFont("Sworder", 80, 30, "./assets/fonts/Font.ttf", 20, "#FFFFFF"); //Text, width, height, path, size, HexaColor
	image.composite(text, 0, 0);
	image.getBuffer(Jimp.MIME_PNG,  async (err, buffer) => {
		if (err) console.log(err);
		return buffer; //Buffer
	});
});
0.0.6

5 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago

0.0.2

6 years ago