Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
enhancement for drawString - add a font size multiplier #978
Normally I use the vectorfont to draw large strings on oleds.
Using oled-i2c-bus on beaglebone brings a nice feature that allows a font size multiplier as parameter for writeString
This is how it is done Oled.prototype._drawChar - not sure how complex this will be - but like to try.
Benefit: use one fixed font in multiple size like 1:4x6, 2:8x12, 3:12x18 ......
Thought this could be a smart enhancement to have.
@gfwilliams What do you think ?
Have you used
I'd try using that first and see how it goes?
The actual draw code is here: https://github.com/espruino/Espruino/blob/master/libs/graphics/jswrap_graphics.c#L625
There are 3 different paths though:
The easiest option would be to add a way to set custom fonts with a scale factor - I'm not sure how much use that would be.
Maybe the most useful enhancement would be to add a scaling option to