text2png icon indicating copy to clipboard operation
text2png copied to clipboard

text2png : OLED 64x32

Open yboujraf opened this issue 5 years ago • 3 comments

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.

  • Is it possible to extend the library to define the high and width of the png ?
  • There is a way to calculate the font size to be sure the text will fit in the line ?
  • There is a way to dis/enable wrapping the text to the next line if text is bigger than the width.

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

yboujraf avatar Feb 05 '20 00:02 yboujraf

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).

philipeachille avatar Feb 05 '20 08:02 philipeachille

@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

yboujraf avatar Feb 05 '20 13:02 yboujraf

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

philipeachille avatar Feb 05 '20 17:02 philipeachille