lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
357 stars 51 forks source link

Set different sizes on one Font #47

Closed Danixu closed 3 years ago

Danixu commented 3 years ago

Hello,

I'm migrating from Adafruit library to this library to control an ST7735 display, because uses less RAM and Program space and my program need it.

My question is if is possible to use one font and change their size, because If not I will have to use two different fonts and uses more program memory. I've found that exists a function called printFixedN, but or I don't know how to use it, or is not available to my display.

Thanks!

Danixu commented 3 years ago

Looking into another issue I have seen this:

Can the font size be changed in this function?

No, the only supported feature is for monochrome displays. printFixedN

So I think that maybe my question is answered...

lexus2k commented 3 years ago

HI @Danixu,

Unfortunately printFixedN works only for monochrome displays. I can try to do quick porting of this function for color displays, but the speed of printFixedN will not be as fast, as it could.

Danixu commented 3 years ago

Thanks!!, I will try to figure out which letters are being used on my project to remove the others and try to free some space. Without do it I have already saved about 14% of Program Memory just changing the library, so maybe is enough for my program.

lexus2k commented 3 years ago

Please, check latest commit with printFixedN support for 16-bit displays

Danixu commented 3 years ago

Oh, thanks!!. I'll take a look

Best regards.

EDIT: Looks fine. I don't know if is slower, but for me is enough ;) (and surely for most projects). Thanks again!