Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text2png : OLED 64x32 #40

Open
yboujraf opened this issue Feb 5, 2020 · 3 comments
Open

text2png : OLED 64x32 #40

yboujraf opened this issue Feb 5, 2020 · 3 comments

Comments

@yboujraf
Copy link

yboujraf commented Feb 5, 2020

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

@philipeachille
Copy link
Contributor

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
Copy link
Author

yboujraf commented Feb 5, 2020

@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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants