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

How to make 3 lines of text as large as possible #114

Open
tobivan opened this issue Oct 29, 2023 · 2 comments
Open

How to make 3 lines of text as large as possible #114

tobivan opened this issue Oct 29, 2023 · 2 comments

Comments

@tobivan
Copy link

tobivan commented Oct 29, 2023

Hi there,

first: thanks a lot for this great library which saves a lot of space, too.

Using a 128x64 0.96" SSD1306 OLED, I wonder how I could have 3 lines with text as large as possible. If I set "oled.set2X();" there are only 2 full lines possible, as far as I can see. If I instead set a larger font e.g. "Cooper26" there is a lot of space between the lines so there can only be a little more than 2 lines on the display.

Any idea on how to do that?
Thanks a lot!
Tobias

@greiman
Copy link
Owner

greiman commented Oct 29, 2023

The basic hardware has eight rows that are each 8-bits high. SSD1306Ascii doe not use an internal bit map buffer so lines must be a multiple of row height.

Your only choices are eight lines with one row each, four lines with two rows per line or two line with either three or four rows per line.

You could use another library with an internal 1 KB buffer. Here are two popular libraries:

https://github.com/adafruit/Adafruit_SSD1306

https://github.com/olikraus/u8g2

@tobivan
Copy link
Author

tobivan commented Oct 29, 2023

I see, thanks a lot for your answer.
Best regards

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