datacute / Tiny4kOLED

Library for an ATTiny85 to use an SSD1306 powered, double buffered, 128x32 pixel OLED, over I2C
MIT License
247 stars 36 forks source link

Make printDoubleSize more convenient #37

Closed fijam closed 2 years ago

fijam commented 2 years ago

I'm a total noob when it comes to c/c++ so bear with me please, but from what I understand oled.printDoubleSize() and oled.printDoubleSizeSmooth() either takes a string from flash with the F macro or needs to be fed byte-by-byte. Would it be possible to make it behave like regular oled.print() so I could easily print a variable? Or perhaps add an example demonstrating the right way to do it?

datacute commented 2 years ago

You are right - there isn't at the moment a way to use it other than directly calling those methods.

datacute commented 2 years ago

I started a wiki page to record some details about this. https://github.com/datacute/Tiny4kOLED/wiki/Refactoring-to-support-double-sized-rendering

datacute commented 2 years ago

I just released v2.2.0 where the printDoubleSize and printDoubleSizeSmooth methods are replaced with setFontX2, setFontX2Smooth, setUnicodeFontX2, and setUnicodeFontX2Smooth so that the full variety of normal print methods can work with double sized text.