0.0.9 • Published 5 months ago

node-text-to-png v0.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

node-text-to-png

基于node的文本转png图片支持自动换行,竖排

Building and Installing

npm install node-text-to-png

Example

const nodeTextToPng = require('node-text-to-png')

const dataBuffer = nodeTextToPng({
    text: 'Hello World',
    fontSize: 24,
    mode: 'row',
    vertical: true
})

fs.writeFileSync('./test.png', dataBuffer)

Attributes

参数说明类型可选值是否必填默认值
text内容String-'测试'
mode模式Stringparagraph(段落模式)/ row(行模式)paragraph
vertical是否为竖排Boolean-false
fontSize文字大小Number-24
width段落宽(仅段落模式生效)Number-200
height段落高(仅段落模式生效)Number-200

License

MIT

0.0.9

5 months ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago