1.2.1 • Published 4 years ago

text2image v1.2.1

Weekly downloads
21
License
GPL-3.0
Repository
github
Last release
4 years ago

text2image

Hits

Installation:

npm i text2image

Usage:

const text2image = require('text2image')

Load font

const font = text2image.loadFont('path/to/font.ttf')

Converting text to image

// PNG
text2image.convert(font, 'Hello, World!', 0, 0, 72).then(buffer => {
    fs.writeFileSync('hello_world.png', buffer) // <Buffer 89 50 4e ...
})
 
// SVG
text2image.convert(font, 'Hello, World!', 0, 0, 72, { useSvg: true }).then(buffer => {
    fs.writeFileSync('hello_world.svg', buffer) // <Buffer 3c 73 76 ...
})
1.2.1

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago