tkrkt / text2png

text-to-png generator for Node.js
MIT License
187 stars 51 forks source link

text2png : OLED 64x32 #40

Open yboujraf opened 4 years ago

yboujraf commented 4 years ago

Dear @tkrkt , @adityapatadia , @bashaus , @greyvugrin , @philipeachille

I 'd like to use your library to generate 1 or 2 or 3 or 4 lines in a 64x32 pixels picture. Each line could have different fonts and sizes depending of the number of lines.

the ouput file could be an array or buffer.

This a layout I am looking to do by using javascript or typescript to generate on the fly the png to display to a oled display

TEXT264x32_PIXELS_PNG_OR_BITMAP_1_COLOR_DEPTH_AND RGB_8BITS.pdf

Best Regards Youssef

philipeachille commented 4 years ago

Hi @yboujraf ! I have only contributed a few lines of code to "text2png", I used it in another project's context, where it was helpful.

What you are looking to do is quite simple with the Jimp library, eventually in combination with text2png (for my purposes last time, Jimp's text processing was inferior to text2png).

yboujraf commented 4 years ago

@philipeachille

Thanks for your quick reply.

Here I have 51 OLED BUTTONS on a remote panel and all are subscribing to a parameter. This parameter has properties (name, description, value, format, ....) Then each time the value change, I need to update the oled.

I am looking for performance converter text to png or bitmap buffer. If you know any other library you are welcome.

Best Regards, Youssef

philipeachille commented 4 years ago

I am afraid, I can't recommend any other libs