var gr = Graphics.createArrayBuffer(H,digits.length*W+2,1,{msb:true});
gr.setRotation(3,1);
//...
var font = gr.asImage().buffer;
var widths = E.toString(widths);
g.setFontCustom(font, 46, widths, H);
If there's somewhere you think I can improve the docs around setFontCustom let me know though - I know it's not great.
I guess there's the possibility that something that renders direct from flash could be built into Graphics, or that setFontCustom could have extra options?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ahh - I think this is what you need - this code creates the font in Graphics directly: https://github.com/espruino/EspruinoDocs/blob/master/modules/Font5x7Numeric7Seg.js
If there's somewhere you think I can improve the docs around
setFontCustom
let me know though - I know it's not great.I guess there's the possibility that something that renders direct from flash could be built into Graphics, or that
setFontCustom
could have extra options?